Issue with Data Lookup definition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-14-2023 02:18 AM
Hi,
I have created the data lookup definition called "Cost Lookup", the source table is "Work Order" and the matcher table is the custom table which is "Cost Lookup". In the Cost Lookup table, I have created fields that are category, priority, and total cost and provided the data according to our needs.
When the Priority and Category fields match for both cost lookup and work order table, then the "Flat Rate Cost" field on the Work Order table is set with the "Total Cost" field value from the Cost Lookup table.
Ex: If the category is "A" and the Priority is "1- Critical" then "Total cost" is " $120"
If the category is "C" and the Priority is "2 - High" then the "Total cost" is " $130"
Issue: When the Category is "D" and Priority is "3 - Moderate" then "Total Cost" must be changed to "$40" but this is not happening
This is not working for the number "40". All the other cost values are working as expected.
Please suggest any solution.
Thanks in Advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-15-2023 08:26 AM
Hi @sudha20 ,
One possible solution is to check if the data in the Cost Lookup table for the "D" category and "3 - Moderate" priority is correctly entered. You may want to make sure that the data type and format of the "Total Cost" field in the Cost Lookup table is consistent with the "Flat Rate Cost" field in the Work Order table.
Another possible solution is to check if the data lookup definition is properly configured. You may want to verify if the fields in the data lookup definition are mapped correctly to the corresponding fields in the Work Order table.
Additionally, you may want to check if the data lookup definition is enabled and active. You may also want to check if there are any other data lookup definitions or workflows that may affect the Flat Rate Cost field in the Work Order table.
Thanks,
Ratnakar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2023 08:11 AM
Hi @Ratnakar7
The "Total Cost" and "Flat Rate Cost" field types are the same as "Currency" and also mapping is correct. Also, the data lookup definition is enabled and active.
Here the issue is .. I have 15 different "Total costs" which are mapped to the "Flat rate cost". All are working as expected. The only issue with the "40" digit.
Ex: if we give 41 instead of 40 then it works.
If we give 39 instead of 40 then it also works.
But don't know the reason for 40.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2023 09:43 PM
Hi @sudha20 ,
Try with GlideAggregate to query the "Cost Lookup" table and specifically filter for the conditions where the value is "40". This might help you identify if there are any unexpected records causing the problem.
Here's an example GlideAggregate query:
var gr = new GlideAggregate('cost_lookup');
gr.addQuery('category', 'D');
gr.addQuery('priority', '3 - Moderate');
gr.addQuery('total_cost', '40');
gr.query();
while (gr.next()) {
gs.info(gr.getValue('your_field'));
}
Remember to replace 'your_field' with the actual field name you're interested in.
Thanks,
Ratnakar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2023 01:31 AM
Hi @Ratnakar7
I did the query as you said, but there is only one record with the combination of "Category" as "D" "Priority" as "3 - Moderate" and "Total Cost" as "40", no duplications.
The issue is with only the "40" digit not for others.