Client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2024 09:48 AM
I have created a display business rule which return the following value
g_scratchpad.sitecode=["SIT1001","SIT1002"];
i have a written on change cline script, which will be triggered when we select the sitecode on incident table.
if following code satisfy then ,
if(g_scratchpad.sitecode.includes(newValue);
hide fields
its getting failed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2024 09:58 AM
- Ensure the syntax of the if statement is correct.
- Check that g_scratchpad.sitecode is properly defined and contains the expected array of values.
- try to use Use - console.log(g_scratchpad.sitecode);
if my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2024 10:01 AM
it return the value like g_scratchpad.sitecode[0]; //return "SIT1001"
it return value with quotes ,this is causing the issue