Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
joris_lansdaal
Creator
Creator

not expected duplicate lines

Hi all,

There's a field called 'Omschrijving' and when this field contains "accrual" the Field TYPE_2 will be discounts_accrual and otherwise discounts.

I used the below logic that seems to work but gives me duplicate lines when the logic is true.

if(Len(SubField(Lower(Omschrijving),'accrual'))<Len(Omschrijving),'Discounts_accrual','Discounts') as TYPE_2.

Can anyone tell me why this is happening and wether there's a better way then using subfield?

regards Joris

1 Solution

Accepted Solutions
tresesco
MVP
MVP

May be this?

If(WildMatch(Omschrijving, '*accrual'*), 'Discounts_accrual','Discounts') as TYPE_2

View solution in original post

4 Replies
tresesco
MVP
MVP

May be this?

If(WildMatch(Omschrijving, '*accrual'*), 'Discounts_accrual','Discounts') as TYPE_2

its_anandrjs

Provide sample data may be it is due to Subfield that you use on the Logic due that it created two rows better to looking on sample data though.

its_anandrjs

May be this

if( WildMatch(Lower(Omschrijving),'*accrual*','accrual*','*accrual'),'Discounts_accrual','Discounts') as TYPE_2


joris_lansdaal
Creator
Creator
Author

Thanks! Wildmatch is shorter and does not duplicate!