In FSM TIMESEARCH screen, I would like to set a default value of the logged in user to the search field NON_PART_USAGE.MANAGER_PERSON_ID.
I have created a client script to do the job thats uses the SetControlValue function, but the value is not set on the screen.
The SetControlValue always returns ‘False’
Here is the script used:
var MgrPersonID = getControlValue('NON_PART_USAGE','MANAGER_PERSON_ID');
if (MgrPersonID == '')
MgrPersonID = getUserInfo('PersonID');
alert('Set person id to default ' + MgrPersonID);
var returnvalue = setControlValue('NON_PART_USAGE','MANAGER_PERSON_ID',MgrPersonID);
Best answer by BertelLundgaard
I made it work, thanks. :-)
I am still wondering, even if the default quicksearch is set as default (and displaying the correct rows) when entering the screen, the fields used in the quicksearch is not reflected on the search panel of the screen (f.ex person_mgr.person_id). Would you know why this is the case?
(I just realized it is the same under other screens as well, f.ex. project screen...)