Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Remove the choices of currency type of field

Priyanka_77
Tera Contributor

I have a field of type currency. It has choices of INR,Euro, dollar,etc. Now i want only euro symbol, others i need to remove somehow. I cannot directly set these currencies to false. How to achieve this?

Attached is for reference.

1 ACCEPTED SOLUTION

Sid_Takali
Kilo Patron

Hi @Priyanka_77 Write a onLoad Client Script and use below code

Add your currency field name and modify script accordingly

 

    g_form.removeOption('currency_field_name.currency_type', 'CHF');
    g_form.removeOption('currency_field_name.currency_type', 'GBP');
    g_form.removeOption('currency_field_name.currency_type', 'JPY');
    g_form.removeOption('currency_field_name.currency_type', 'EUR');

 

 

This script will remove choices from Currency field specifically on field from one table not globally.

Sid_Takali_0-1719923867312.png

 

Please mark my answer Correct/helpful,

Regards,

Sid

View solution in original post

5 REPLIES 5

Priyanka_77
Tera Contributor
 

Sid_Takali
Kilo Patron

Hi @Priyanka_77 Write a onLoad Client Script and use below code

Add your currency field name and modify script accordingly

 

    g_form.removeOption('currency_field_name.currency_type', 'CHF');
    g_form.removeOption('currency_field_name.currency_type', 'GBP');
    g_form.removeOption('currency_field_name.currency_type', 'JPY');
    g_form.removeOption('currency_field_name.currency_type', 'EUR');

 

 

This script will remove choices from Currency field specifically on field from one table not globally.

Sid_Takali_0-1719923867312.png

 

Please mark my answer Correct/helpful,

Regards,

Sid

Thankyou Sid!

This only works in Native view. It's not working in workspace experience. Any suggestions how to make it work in workspace?