Retrieving field types using script include and client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2022 11:40 PM
Hi Community,
We have created multiple custom tables with multiple different fields. Most of the field type is a decimal type of field. What I want to achieve is to retrieve all those decimal field types in different custom tables that we have created [x_custom_table_1, x_custom_table_2, x_custom_table_3, x_custom_table_4]
Does anyone have sample script include to do the retrieval that will send back the array? Then sample onload client script calling the script include that will check the current form is of table that starts with 'x_custom_table'?
Regards,
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2022 12:04 AM
Hi,
you can query sys_dictionary table with type as Decimal and table as your custom table
Then iterate and store in array
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2022 12:14 AM
Hi Ankur,
Do you have sample scripts?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2022 12:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2022 01:30 AM
Thank you for marking my response as helpful.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader