Skip to main content

Hi All,

 

Good Day!

 I’m Facing Issues in Lookup XML filter is not working in FSM Web client. The same Filter is working fine in Smart Client but which is not working in Web client.

Do we have any other way to filter the dropdown in web client via client script ? or can we have any way to work with lookup xml in web client?

Kindly assist and advise on the same.

Thanks in Advance,

Regards,

Hariharan P

 

 

Hi @Hariharan P 

Please see if below conversation helps you. I have given an example client script to filter a dropdown.

/Sanjeewa


Hi @SanjeewaJ,

as the link is not accessible by customer, could you also please share the answer here?

 

Thanks in advance.

~Juni


Please find extracted answer:

Please see if you are looking for something like this. I just created an example with REQUEST entity. Which I am populating request statuses, based on request type.

Note that, this works only for web client. Since screen events are not working in smart client.

  1. Client script Example - SAJGLK_DYNAMIC_STATUS_DROPDOWN

showProgressIndicator();
var reqType = getControlValue('request','req_type');

var emptyOptions = t];
var options = createCodeTableOption('','');
arrayPush(emptyOptions, options);
setControlOptions('request', 'req_status', emptyOptions);

if(reqType == 'FIX') {
    var opt1 = ];
    arrayPush(opt1, createCodeTableOption('INVESTIGATE','Investigate'));
    arrayPush(opt1, createCodeTableOption('HOLD','Hold'));
    setControlOptions('request', 'req_status', opt1);
} else {
    var opt2 = }];
    arrayPush(opt2, createCodeTableOption('CANCELED','Canceled'));
    arrayPush(opt2, createCodeTableOption('CLOSED','Closed'));
    setControlOptions('request', 'req_status', opt2);
}
hideProgressIndicator();

  1. Attach the client script to screen.

UI Designer → Screen Events

 

  1. Test in WEB Client

 

 

 

Few points,

  • You can populate options from code tables using client script sql, rather hard coding
  • You have to handle the “Create New” record also in the script. Otherwise it will show only few options at creation as well.

/Sanjeewa


Thanks @SanjeewaJ ! 


Hi @SanjeewaJ,

 

Thanks for  Suggestion.

The above Function ”createCodeTableOption” which is working for Code table, Is there any function available for Global Code table for the same Scenarios ? Kindly suggest.

 

Thanks,

Hariharan P


Hi @SanjeewaJ,

 

Thanks for  Suggestion.

The above Function ”createCodeTableOption” which is working for Code table, Is there any function available for Global Code table for the same Scenarios ? Kindly suggest.

 

Thanks,

Hariharan P

Hi @Hariharan P 

No. I dont think there is a separate function for global code table. Did you try the same function for global code? I did not get a chance to try. So cannot confirm if it will work.


Hi @SanjeewaJ ,

 

Thanks for the Update, Yeah the same one is working for global code tables also.

Regards,

Hari


Reply