- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2023 04:56 AM
Suppose I have created a catalog item in which there are 4 fields and I am using a catalog UI policy like..
condition 1:-
var1,var2 is visible
condition 2:-
var2,var3 is visible
condition 3:-
var3,var4 is visible.
It is working fine till here.
Now, I want to use a catalog client script because for condition 2. I want the label of field (var2) should be different.
var example = getMessage('XXXXXX');
g_form.setLabelOf('var2', example);
The issue is that:-
from here if I again go to first condition then the label of var2 is remains same.
Please provide me the solution.
Thanks & Regards
Utsav
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2023 05:46 AM
Could you please explain exact scenario.
In general,For catalog client script
you have to use else condition to reverse your logic when condition not met.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2023 05:46 AM
Could you please explain exact scenario.
In general,For catalog client script
you have to use else condition to reverse your logic when condition not met.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2023 05:53 AM
Yes,
if(condition==true){
var example = getMessage('XXXXXX');
g_form.setLabelOf('var2', example);
}
else{
}
In "else" part what should I write so that the label of variable should remain as previous one.
In "if" condition we are changing the label of var2.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2023 06:23 AM
if you are writing onChange client script.
in else part you can write
else
{
g_form.setLabelOf('var2', oldValue);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2023 10:19 PM
Hii @Bharath Kumar A
I have used your condition in else part but in place of var2 the label is empty..
It is showing nothing in that label..please help me out..
Thanks & Regards
Utsav