Hi Brilliant Team, @Yoichi@supermanPunch@ppr
I am facing an issue to build my expectation. Please assist me.
Here is my dt
Output looks:
What I want to do?
After making the output (Like output image where filter column will be only name). I want to use for each loop activity. In for each loop first bot proceed all “flower” once flower will finish bot will proceed “book” and once book finish bot will proceed “Pen” and so on.
How can I achieve this?
only first column has been sorted and other two columns are unsorted(same as input) , is this your required output??
Seems a bit complicated from logical point of view , can you please explain if there is any relations between the three columns otherwise its confusing …
Go with the approach @saurabhB said. That is the most robust way to get what you want.
I do think you will also want to sort the other two columns when you make such groups corresponding to the name column (Sort which affects all columns).
You can either use the Index ( in your case 1, or the name of the column)
If the column is string, sort goes from a-z or z-a
The above statement will provide you a collection of grouped items (3items for above example) with Name as key
Store the above result in a variable & use it in foreach collection & then you will be going for one more foreach inside it.
What I can suggest is, if you can let us know what’s the actual business logic after grouping what should be done. We can think of or build using Linq itself or may be a better logic than nested for-each just if that’s possible.
Hi Thanks all for your wonderful supports. Can you tell me how can I get the first value from the group? like first flower then book and then pen like this
As @jeevith mentioned, change the Form to From and also add where condition grp.Count > 1. Use the expression I mentioned above and just change the column name as per your input file.
Hi Laksman, @ashwin.ashok
Thanks for your valuable support. Can you tell me
In my for each loop want to do some action. Among all of the action I need to click a button single time and rest of the action will be normal for each loop procedure.
Like
inside for each
Like for row(“Name”).tostring = “Flower” (Each group last item)
Then Click 1 and click 2 and click 3 and so on.
then again row(“Name”).tostring = “Flower” (flower=flower)
ignore click 1 it will click 2 and click 3 and so on.
Again it will check
row(“Name”).tostring = “Book” (Each group last item) (Book = book)
Then Click 1 and click 2 and click 3 and so on.
then again row(“Name”).tostring = “Book” (Book =Book)
ignore click 1 it will click 2 and click 3 and so on.
Continue for all data like this.
Please assist me. I am stuck on this. Any suggestion will be appreciated.