Catalog Client Script not working on Employee center with g_form add and clear options

Josh Evans
Tera Contributor

Hello,

 

I am having and issue with a Catalog Client Script in the Employee Center that is not populating a choice list with options as it is in the normal Service Catalog. I have set the Client Script UI Type to all as you can see in the screenshot I have provided. 

 

JoshEvans_0-1701845796674.png

As I said, it works exactly as expected in the normal Catalog, but in the Employee Center, the drop down just has None. 

 

Any help would be appreciated.

 

Thanks,

Josh

 

6 REPLIES 6

I don’t think k you need to use variables. When using getValue(), you can just do getValue(‘firldName’)

Hi @Josh Evans 

 

Replace the 

var getReason = g_form.getValue('variables.reason_for_leaving');

with

var getReason = g_form.getValue('reason_for_leaving');

 

and in all g_form.addOption() remove the "variables" , keep the fieldName only.

 

using variables works in workflow, not in catalog client script.

 

-Thanks,

AshishKMishra


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution