- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2018 03:29 AM
Hi,
My my limited coding skills I managed to get a UI Action to pass the DisplayValue from a sys_user reference field on a table form to a UI Page using:
var UserValue = g_form.getDisplayBox('u_business_owner').value;
Using it in the UI Page like this:
<g:evaluate>
var UserValue = RP.getWindowProperties().get('uUserValue');
</g:evaluate>
<g:ui_reference name="user_name" table="sys_user" displayValue="${UserValue}"/>
That correctly copies the user from the table form with the UI Action:
However, if on the UI Page I then want to update with another user by clicking the magnifying glass icon it limits the filter only to the copied user:
How do I get the UI Page to display all the records in sys_user like if I do the same on the table form:
Which despite the set user "AVESA" shows all users in sys_user?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2018 04:54 AM
When you set just the display value, it's like typing a name into a form field without validating it. You can validate this by typing AVESA into the form field without selecting the user name from the dropdown and hitting the magnifying glass, it will only show you AVESA.
But more to the point, to get it to work the way you want, just also give the field a value in addition to a display value. Try this:
var UserDisplayValue = g_form.getDisplayBox('u_business_owner').value;
var UserValue = g_form.getValue('u_business_owner');
And then this on your UI Page:
<g:evaluate>
var UserDisplayValue = RP.getWindowProperties().get('UserDisplayValue');
var UserValue = RP.getWindowProperties().get('UserValue');
</g:evaluate>
<g:ui_reference name="user_name" table="sys_user" displayValue="${UserDisplayValue}" value="${UserValue}"/>
Using this, your field will actually be a resolved value, and the magnifying glass will display all users available.
Hope this helps,
--Dennis R
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2018 04:54 AM
When you set just the display value, it's like typing a name into a form field without validating it. You can validate this by typing AVESA into the form field without selecting the user name from the dropdown and hitting the magnifying glass, it will only show you AVESA.
But more to the point, to get it to work the way you want, just also give the field a value in addition to a display value. Try this:
var UserDisplayValue = g_form.getDisplayBox('u_business_owner').value;
var UserValue = g_form.getValue('u_business_owner');
And then this on your UI Page:
<g:evaluate>
var UserDisplayValue = RP.getWindowProperties().get('UserDisplayValue');
var UserValue = RP.getWindowProperties().get('UserValue');
</g:evaluate>
<g:ui_reference name="user_name" table="sys_user" displayValue="${UserDisplayValue}" value="${UserValue}"/>
Using this, your field will actually be a resolved value, and the magnifying glass will display all users available.
Hope this helps,
--Dennis R