I want to add a generated unique key column to a collection, using integers in an ascending order.
I had asked this question before, and got an excellent and workable answer from @RandyHayes , but can't find it under my previous account, BenDonahue, nor anywhere else online. I remember that Last(FirstN()) was used, but haven't been able to figure out how, exactly.
Thank you for your assistance.
Solved! Go to Solution.
Was it this post?
Doesn't seem like it has what you are thinking of, but that was the closest one I could find from you.
If you are trying to add a index column to your collection, then you can use this formula:
With({_items: yourCollection},
ClearCollect(yourCollection,
ForAll(Sequence(_items),
Patch(Last(FirstN(items)), {_index: Value})
)
)
)
I hope this is helpful for you.
Was it this post?
Doesn't seem like it has what you are thinking of, but that was the closest one I could find from you.
If you are trying to add a index column to your collection, then you can use this formula:
With({_items: yourCollection},
ClearCollect(yourCollection,
ForAll(Sequence(_items),
Patch(Last(FirstN(items)), {_index: Value})
)
)
)
I hope this is helpful for you.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
204 | |
97 | |
60 | |
51 | |
46 |
User | Count |
---|---|
255 | |
158 | |
87 | |
79 | |
59 |