Re: Problems with list control
Post 12 describes the setup accurately I think.
I have a button in the UX called "New" the onclick event triggers an ajax callback to run the xbasic function taskguid after it runs in the afterajaxcallback complete section of the ajaxcallback I run the
var lObj = {dialog.object}.getControl('PHONELOG');
lObj.newDetailViewRecord();
{dialog.Object}.setFocus('Company_Name');
var ele = {dialog.Object}.getPointer('CONTAINER_35');
ele.style.display = "none";
code
again, thats what Iw ould normally run prior to realizing that for some reason the default value of a field ONLY gets applied on page load and not for a new record.
That's a huge revelation to me.
It makes me wonder how you would set a default value for a list controls detail view control....for a new record. I am perplexed by that. All along I thought it was simple. I thought a new record, for a list control OR a field value of a UX control with databinding would just always be the default value when you trigger a new record.
Am I wrong in that thinking?
Like I said before I just put
= remspecial(api_uuidcreate())
as the default value for a control in a grid and it worked as expected to me.
Using a list control - it only fires on page load, correct me if I am wrong.
why wouldn't it behave the same?
Post 12 describes the setup accurately I think.
I have a button in the UX called "New" the onclick event triggers an ajax callback to run the xbasic function taskguid after it runs in the afterajaxcallback complete section of the ajaxcallback I run the
var lObj = {dialog.object}.getControl('PHONELOG');
lObj.newDetailViewRecord();
{dialog.Object}.setFocus('Company_Name');
var ele = {dialog.Object}.getPointer('CONTAINER_35');
ele.style.display = "none";
code
again, thats what Iw ould normally run prior to realizing that for some reason the default value of a field ONLY gets applied on page load and not for a new record.
That's a huge revelation to me.
It makes me wonder how you would set a default value for a list controls detail view control....for a new record. I am perplexed by that. All along I thought it was simple. I thought a new record, for a list control OR a field value of a UX control with databinding would just always be the default value when you trigger a new record.
Am I wrong in that thinking?
Like I said before I just put
= remspecial(api_uuidcreate())
as the default value for a control in a grid and it worked as expected to me.
Using a list control - it only fires on page load, correct me if I am wrong.
why wouldn't it behave the same?
Comment