Changing the display value of checkbox variable based on different catalog items.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2024 05:50 AM
Hello All,
I have a checkbox variable in a variable set that was used by three catalog items. Can we change the display value(name of the variable) of the variable in three different catalog items using any client scripts or we should create duplicate variables?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2024 05:53 AM
Hi @Aasrita ,
As the variable is in variable set and used by 3 catalog items, you will have to create duplicates.
Regards,
Sandeep Raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2024 06:11 AM
The purpose of a variable set is that you can use the same variable(s) in different catalog items. When you want a different variable (even if it's referencing to the same table, with the same conditions), you shouldn't use a variable set.
Of course all kind of manipulation can be done to change this, but why? It will never be as performant because you will be loading scripts on load of the page. Just create the variable for those 3 items (we're not talking about changing hundreds of records).
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2024 06:56 AM
Hi @Aasrita
Yes you can change the Label of the variable by using g_form.setLabel('field_name','new_label'). But you need to remeber that this would be a client side change and the original label on server side will always be the same, but you should also note that in Reports or other areas like list editor it will always show the original name
Regards,
Piyush Sain