## Comparing Line Items which has Numbered List Format

Previous Contributor

## Comparing Line Items which has Numbered List Format

Hi,  How can I compare two line items of two different modules (Format: Numbered List)?  How to check whether a single entity/ entry is present in two Numbered Lists? (Both lists are Numbered Lists) Thank you

Regular Contributor

## RE: Comparing Line Items which has Numbered List Format

Hi Yashasvi, Are the line items formatted to the same numbered list, or two different numbered lists? If it's the same list then you can just say
`IF Module 1.Line Item 1 = Module 2.Line Item 2 THEN ... ELSE ...`
If they're two different lists then you need to decide how to do the comparison. Typically a numbered list will have some list properties that define the elements in the list. If your two lists are comparable then they should have some of these properties in common - let's say there are two properties Property A and Property B - so you can compare the two line items like this:
```IF Numbered List 1.Property A[LOOKUP: Module 1.Line Item 1] = Numbered List 2.Property A[LOOKUP: Module 2.Line Item 2] AND
Numbered List 1.Property B[LOOKUP: Module 1.Line Item 1] = Numbered List 2.Property B[LOOKUP: Module 2.Line Item 2]
THEN ...
ELSE ...```
The list property you want to compare might be the display name, in which case you can say
`IF Numbered List 1.Display Name[LOOKUP: Module 1.Line Item 1] = Numbered List 2.Display Name[LOOKUP: Module 2.Line Item 2] THEN ... ELSE ...`
Or if you want to compare the codes, then you need to say
`IF CODE(Module 1.Line Item 1) = CODE(Module 2.Line Item 2) THEN ... ELSE ...`
Otherwise, if the properties you want to use to decide whether the two items are the same don't exist, then you'll need to define these properties and then compare them as above. Hope this helps! Pete