Hi i have a requirement to show only unique index value while using for each
how can i do that ?
in local!voucher Details have 4 item that is duplicate i need only unique value
Discussion posts and replies are publicly visible
Hi ,
You can use union function to get distinct values .union(local!voucherDetails,local!voucherDetails)
I have tried to replicate your use, plz refer this.
a!localVariables( local!test: { { username: "", buduget: 2023, dept: 123456789 }, { username: "", buduget: 2023, dept: 123456789 }, { username: "Rishikesh", buduget: 2023, dept: 123 }, { username: "Rishikesh", buduget: 2023, dept: 123 }, { username: "Rishikesh", buduget: 2023, dept: 123 } }, union(local!test, local!test) )
How to keep only unique based on the dept value?
you can use the union function, it compares all the fields.