- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 08:27 AM
Hi, I pretty much explained it in the title, but I've got this UI-button on a related list called 'Enroll for Training', which lets the user enroll the current employee for a training in that list.
If no training is present in that list, I would like to hide that button.
I'm also already using RP.isRelatedList() as a condition, because I don't wat to see this UI action when I'm in my Training table.
Anyone know how to see (preferably in the UI-action condition) if the (related) has any rows?
Cheers Chris
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 09:34 AM
Then you have to code for it, is suggest you write a new Script include and define a function in there that identifies if there are any records present or not, and return true/false based on that.
in the condition you can add new SCRIPTINCLUDENAME().FUNCTIONNAME()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 08:56 AM
Hi Chris,
Quickest solution will be to navigate to list control for the related list and check 'omit if Empty' from there.
PS, in this case the related list itself will not show up if there are no records.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 09:27 AM
Yeah I also tried that solution, sorry for not mentioning it, but since the related list itself then disappears I didn't like the solution...
And to I thought, if that checkbutton can see if the list is empty, why can't I?
But I couldn't find the code for it...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 09:34 AM
Then you have to code for it, is suggest you write a new Script include and define a function in there that identifies if there are any records present or not, and return true/false based on that.
in the condition you can add new SCRIPTINCLUDENAME().FUNCTIONNAME()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 11:42 PM
That should work thanks for the tip!