- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2023 04:32 AM
Hi everybody! I would like to hide some custom tab on my task form until it reaches some states, and after make it appear on the form. Is there a way without script for do that? Or it is possible anyway? If it's possible only with script, could somebody tell me which one should I use?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2023 08:18 AM
Ahh, I see. You're actually updating the record which is re-loading the form. Your client script is not set up to run on load (2nd line of client script). If you need this to run on form load, comment out lines 2-4.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2023 07:30 AM
Try wrapping '127' in quotes (line 11)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2023 07:37 AM
@benn23 even like that it doesn't work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2023 07:56 AM - edited ‎01-12-2023 07:57 AM
Use the alert to get the actual names of the sections. You're using 'Diagnosis' but I believe section names are truly all lowercase (and spaces replaced with underscores).
var secs = g_form.getSectionNames();
alert(secs);
My guess is you will need to change yours to setSectionDisplay('diagnosis',false) (lowercase 'diagnosis')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2023 08:03 AM
@benn23 yeah I've tried with the lowercase name, because I see the actual name is 'diagnosis' but it doesn't work anyway
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2023 08:06 AM
Couple more suggestions.
Add an alert inside your 'if' statement to validate that the conditions are met.
Print off the alert that's throwing the section names... Should be an array of section names. Can you share those here?