We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Which one I should create Normal Custom Table vs custom Data lookup table

Supriya25
Tera Guru

Hi All,

we have one custom table House Hold Plan , There are 4 choice fields and options would be like below.

Supriya25_1-1783131872721.png

 

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 :

Supriya25_2-1783130939983.png


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 ?




9 REPLIES 9

Tanushree Maiti
Tera Patron

Hi @Supriya25 

 

My recommendation  is to go with the 2nd option i.e  creating a custom Data Lookup table and defining Data Lookup definitions. This approach centralizes logic into a data matrix, making future updates easy, preventing hardcoding, and keeping your instance configuration-driven.

 

 

Refer: Custom Table Deep Dive: Data Lookup Matcher

https://www.youtube.com/watch?v=1vQLlHRTv_M&t=17s

 

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
A key factor in making your process easier to maintain is to reduce code and make it more data driven. Data Lookup rules can help you do just that by setting field values based on other field values on the same record without any scripting.

Thanks @Tanushree Maiti , Thanks for your inputs.

Kindly help me 
1. Will ServiceNow  count into Custom table license if I do create Custom Data lookup table (this is also one custom table extending dl_matcher table) ?
2. Can I design Script Includes on Custom Data lookup tables please ? is it advisable?

Hi @Supriya25 

 

1) As per my knowledge, Custom Data Lookup tables do not count against your production custom table limit, provided they are explicitly extended from the dl_matcher table.

However, if they are not extended correctly, they will consume your custom table entitlements, which can be tracked in Subscription Management.

 

Note: For any subscriptionlicense, or entitlement related queries , recommendation is to reach out directly to your ServiceNow Account Executive (AE)  for the clarification.

 

2)  In which use case, do  you need it? 

 

 

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

ajmalmuhamm
Tera Contributor

Hi @Supriya25, I would recommend using a normal custom table instead of a Data Lookup table. Data Lookup is mainly used to automatically populate field values based on matching conditions, not to dynamically filter multiple dependent choice fields. A better approach is to: Create a custom table with Account, House Hold Category 1, House Hold Category 2, and House Hold Category 3. Import the Excel data into this table. Use a Script Include with GlideAjax and Client Scripts to filter each dropdown based on the previous selection. This approach is more scalable and easier to maintain, especially when the combinations change in the future.

Nishant8
Tera Sage

Hello @Supriya25 , If you plan to make a decision based on this data, I suggest exploring Decision Tables. I have listed a couple of articles below to help you get started. If you have any questions, please feel free to reach out and I will be glad to assist you.

https://www.servicenow.com/docs/r/build-workflows/workflow-studio/decision-designer-overview.html

https://www.servicenow.com/community/developer-articles/smarter-assignment-using-decision-tables-flo...

 

If Decision Tables do not fit your needs and you are specifically choosing between a standard custom table and a data lookup table, I recommend going with the lookup approach.
Regarding licensing, the dl_matcher table is exempt from license fees, please refer below:

https://www.servicenow.com/community/servicenow-ai-platform-articles/the-new-servicenow-s-custom-tab...

https://www.servicenow.com/content/dam/servicenow-assets/public/en-us/doc-type/legal/custom-table-gu...

 

Regards,

Nishant