[GF#10] How to manage reference qualifiers across multiple tables with one business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago - last edited an hour ago
This is not a question.
Context
During activation of the Normalization Data Services Client plugin (com.glide.data_services_canonicalization.client), I got to the Update Reference Qualifiers step in the corresponding guided setup. Completing that step wasn't possible and it ended up being skipped.
Why not manual updates
All these 2687 tables have one or more fields referencing values from the Company table [core_company], such as Company, Customer, Vendor, Support Vendor or Manufacturer.
Some example tables:
- cmdb_ci and extended ones
- alm_asset
- ast_contract
- service_offering
- task
Setting the reference qualifiers manually would be overkill and it also wouldn't automatically apply if a reference field is added to another table in the future.
Technical note
Don't be surprised: field labelled Normalized is actually named "canonical"
Solution
With that in mind, my colleague Javi told me about a trick I wasn't aware of and I thought it was worth sharing here:
- create display business rule on the referenced table (Company in this case),
- write desired condition of your reference qualifier to the Script field (checkbox Advanced must be true)
- it was an easy condition for this use case
- display only records with value true in the Normalize (canonical) field
current.addQuery('canonical', true);
Validation
- Go to Company [core_company] table and mark down following numbers:
- how many Company records are there in total,
- how many of them have Normalized (canonical) set to true,
- ensure there's at least one set to false,
- Navigate to a form that references the Company table
- any of the tables mentioned above,
- Open the lookup icon of that field and compare it with the numbers from the step 1:
- it must correspond with the total records marked as true,
- records marked as false cannot be selectable in that reference field
Keywords
reference qualifier, display business rule, company, vendor, customer, manufacturer, normalization, canonical, guided setup
______
EDIT: formatting + typos correction
✂-----Cutting-out-the---✦AI-noise✦---All-replies-written-and-vouched-for-by-GlideFather---