Which one I should create Normal Custom Table vs custom Data lookup table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi All,
we have one custom table House Hold Plan , There are 4 choice fields and options would be like below.
Accounts 10 (Account 1, Account 2.....Account 10)
House Hold Cat 1 = 20 (like House Category 1.1, House Category 1.2..etc ...House Category 1.20)
House Hold Cat 2 = 20 (like House Category 2.1, House Category 2.2..etc..House Category 2.20)
House Hold Cat 3 = 20 (like House Category 3..1, House Category 3.2..etc...House Category 3.20)
Concern :
I have a concern we got excel sheet , that excel sheet has 500+ records combinations . some Account, category values repeated , Like this combination there are 500 + records with different combinations
example :
based on this combination I want to populate dropdown options in above "House Hold Categories" fields on Record.
So Now please help me
in Global scope should I create new normal custom table ( with string type fields Account, House Hold Category 1, House Hold Category 2, House Hold Category 3) to maintain this excel sheet data ? loading data in custom table and creating ScriptInclude and Client script and sort drop-down in target fields ("House Hold Categories" fields ) ?
Or
In Global scope Should I Create new custom Data Lookup table( with string type fields Account, House Hold Category 1, House Hold Category 2, House Hold Category 3) to maintain this excel sheet data ? loading data into custom data lookup table and define Data lookup definitions?
Kindly share your thoughts. How Normal custom table/Datalookup custom table works in this case and which one I have to proceed ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I would suggest you to go with option 2 to maintain the data a bit easier. I would always urge to use non code option where possible to reduce the tech debt going forward.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Thanks @AlpUtkuM , thanks for your inputs .
1. Will ServiceNow cost any Custom table license if I do create Custom Data lookup table ?
2. Can I design Script Includes on Custom Data lookup tables please ? is it advisable?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
1) Normally no but please double check with your account manager
2) Yes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Supriya25 ,
For this use case, I would recommend using a normal custom table rather than a Data Lookup table.
The Data Lookup feature is primarily intended for automatically populating field values based on matching criteria. It's not designed to dynamically filter the available choices in multiple dependent dropdowns based on hundreds of valid combinations.
A better approach would be:
- Create a custom table with fields such as:
- Account
- House Hold Category 1
- House Hold Category 2
- House Hold Category 3
- Import the 500+ combinations from Excel into this table using an Import Set.
- On your target form, use Client Scripts (or Catalog Client Scripts if applicable) with GlideAjax calling a Script Include to:
- Filter House Hold Category 1 based on the selected Account.
- Filter House Hold Category 2 based on the selected Account and House Hold Category 1.
- Filter House Hold Category 3 based on the selected Account, House Hold Category 1, and House Hold Category 2.
- Instead of maintaining hundreds of static choice values, consider using reference fields with reference qualifiers if your requirements allow. Dynamic filtering is much easier to maintain than large choice lists.
This approach is more scalable and easier to maintain. Whenever new combinations are added, you simply import or update records in the custom table without changing scripts or choice lists.
So, in this scenario, I'd recommend using a normal custom table as the source of truth and implementing the dependent dropdown logic through Script Includes and Client Scripts rather than using Data Lookup definitions.