754
Views
2
Comments
Checking if Two Lists are Exactly the Same
Question

Hi Everyone,


I'm trying to see if two lists are exactly the same and I'm having trouble doing it. I have an entity, workorder_extraoptions and another one deal_extraoptions. I need to compare these two lists and check if they are exactly the same. I have lightly tried a hashtable from the forge but I feel like there has to be an easier built in way. If not could someone point me in the right  direction that would be awesome!


Thanks,

Bryan

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Hi Bryan,

If you serialize both list to a json string, then you can compare the two strings.

Regards,

Daniel

2026-01-26 10-25-31
Lennart Kraak
Champion

Hi Bryan,

Daniel's option is a good way to go. There are some components in the forge to help you with the. Alternatively you could sort them by the same order and use a for each to check each item.

Regards,

Lennart

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.