Prefixing the field value is not working on changing the same filed value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2023 01:21 AM
Hi All,
I have a requirement that I need to prefix keyword in one of single line text field when some particular conditions are met in catalog item.
For this I have created a uipolicy and used runscript to set that field value.
When changing the same field value , enter new value then prefix is not working.
For example , I have project title field if I enter some value like test then tab out then project title field value should be Demo Test. When particular conditions are met
Now I am changing the same project title field value like testing, now it should be display Demo Testing but it's not
Please share me your suggestion how can I clear this defect
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2023 01:54 AM
Please share the script you are using, please also check the condition in UI Policy , check what should be the script if the UI Policy is checked to Reverse if False. I would suggest to use Client script instead of UI Policy script
Regards,
Piyush Sain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2023 01:57 AM
Hi msc,
Try by writing an onChange client script on the text field and the field where you are checking for the condition.
Then set the value of your text field something like this,
g_form.setValue('filed_name', 'prefix '+g_form.getValue('field_name'));