- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2017 03:18 PM
Hi All,
I have having trouble scripting a condition that will check if my value contains a certain value.
This is on incident and the field to check is reference Company name field from core_company table.
I have retrieved the value using Ajax call and now I want to check if it contains a value like Dutch Re
if(g_form.getValue('gr.name') ????? 'Dutch Re')
I have read upon using indexOf but may attempts trying to use it failed. Idea is if IndexOf finds < -1 it should indicate the value is there
and then I want to show or hide section tabs.
If anyone can advise or have another suggestion that be greart.
Thanks
Ellie
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2017 04:27 PM
and correct the condition to --- if(g_form.getValue('gr. name').indexOf('Dutch Re') > -1)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2017 04:27 PM
and correct the condition to --- if(g_form.getValue('gr. name').indexOf('Dutch Re') > -1)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2017 04:40 AM
Thank you very much Sujala is working now