Is there some easier way to get all the field names of a form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2024 11:16 PM - edited 01-28-2024 11:18 PM
Is there some easier way to get all the field names of a form. I suppose to get all the field names
and do something common in a for loop.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2024 11:19 PM
Hi @jieLian123
Where you want to get the form variables ? If you need it in a flow, you can make use of Get Catalog Variables action.
Thanks & Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2024 11:23 PM
I want to use the field names in a client script.
and do some action with g_form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2024 11:31 PM
Hi @jieLian123
Try as below :
var catalogFields = g_form.getFieldNames();
This will give you an array of field names. You can then iterate over them and do the respective actions.
Thanks & Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2024 11:35 PM
Hello @jieLian123,
For a more efficient approach, instead of the usual method of right-clicking on the form and configuring it to view all table fields,
I recommend using the SN Utils Chrome extension. This extension not only simplifies the process but also offers additional benefits.
With SN Utils, you can quickly retrieve field names by double-clicking on an empty space within the form. This action will display both the backend name and the actual display name of the fields on the form itself. Moreover, to obtain a comprehensive list of all field names on the current form, you can utilize the extension by following these steps:
1. Click on the SN Utils extension.
2. A window will appear; navigate to the "GlideRecord" tab.
3. Here, you'll find all the current field values of the form conveniently listed in one place.
4. For a more detailed exploration, clicking on "Open in Background Script" under images will allow you to print all the field values of the current form.
This streamlined process not only enhances efficiency but also provides a user-friendly experience, making field name retrieval a breeze. If you haven't already, consider installing the SN Utils extension for a more convenient and effective workflow.
Let me know your views on this and Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Thanks,
Aniket