- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2024 10:33 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2024 11:26 PM
Hi @zx For easier maintainability, keep the condition as short as possible. If the computation is complex, it is difficult to read and understand. Rather than increasing the field length, consider putting your logic in a script include. For example, rather than something like this...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2024 11:29 PM
Hi @zx
You can probably append your condition and call the script include in the condition column.
Mark my response as helpful or accepted.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2024 11:34 PM - edited ‎09-18-2024 11:35 PM
hi @zx
You can use logical operators (like && for AND or || for OR) to combine the existing condition with your new condition.
Suppose existing code is:
current.state == 'open'
you can update the condition like:
current.state == 'open' && gs.hasRole('admin')
For complex conditions, consider moving the logic to a Script Include or a Business Rule for better maintainability and readability.
i hope my answer helps you to resolve your issue, if yes please mark my answer helpful and correct.
thank you
rajesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2024 11:24 PM
Hi @zx You can append your condition using && like refer this
(new GlideRecord(current.getTableName())).canWrite() && RP.isOneToMany() && !RP.getListControl().isOmitEditButton()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2024 11:26 PM
Hi @zx For easier maintainability, keep the condition as short as possible. If the computation is complex, it is difficult to read and understand. Rather than increasing the field length, consider putting your logic in a script include. For example, rather than something like this...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2024 11:29 PM
Hi @zx
You can probably append your condition and call the script include in the condition column.
Mark my response as helpful or accepted.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2024 11:34 PM - edited ‎09-18-2024 11:35 PM
hi @zx
You can use logical operators (like && for AND or || for OR) to combine the existing condition with your new condition.
Suppose existing code is:
current.state == 'open'
you can update the condition like:
current.state == 'open' && gs.hasRole('admin')
For complex conditions, consider moving the logic to a Script Include or a Business Rule for better maintainability and readability.
i hope my answer helps you to resolve your issue, if yes please mark my answer helpful and correct.
thank you
rajesh