I'm new to Power Apps and I'm trying to loop(1) through a collection and then loop(2) through a single row's columns. Within a ForAll, you cannot increment a column's name to loop through the columns of a row. Is there a way to do this using formula language? If not, can I use a flow to achieve this process? If so, can you share some examples with me? Thank you.
Solved! Go to Solution.
Hi @Hector999-0 :
I've made a test for your reference:
1\I assume there is a collection :
ClearCollect(
thecollection,
{column1:1,Column2:2,Column3:3},
{column1:4,Column2:5,Column3:6}
)
2\Create a button and set it's OnSelelct property to:
Clear(TheResult);
ForAll(
thecollection,
ForAll(
Split(
Substitute(Substitute(JSON(ThisRecord),"{",""),"}",""),
","
),
Collect(
TheResult,
Last(Split(Result,":").Result
)
)
)
)
Note:This method is only applicable to specific collections with a simple structure
Best Regards,
Bof
Hi @Hector999-0 :
I've made a test for your reference:
1\I assume there is a collection :
ClearCollect(
thecollection,
{column1:1,Column2:2,Column3:3},
{column1:4,Column2:5,Column3:6}
)
2\Create a button and set it's OnSelelct property to:
Clear(TheResult);
ForAll(
thecollection,
ForAll(
Split(
Substitute(Substitute(JSON(ThisRecord),"{",""),"}",""),
","
),
Collect(
TheResult,
Last(Split(Result,":").Result
)
)
)
)
Note:This method is only applicable to specific collections with a simple structure
Best Regards,
Bof
Thank you so much for helping me in getting the formula you suggested. It worked fine. Now I was wondering if you can help me in figure out a bit complicated problem. Should I post this on a new post or can I posted in a reply? Let me know how to proceed. Thank you again!
Hi @Hector999-0 :
I suggest you consider creating a new thread.(Doing so may get more help and benefit other users in the forum with similar problems)
Best Regards,
Bof
Can I get your opinion on the recent post I made. Is called
"I need your assistance in developing a formula for..." I want to know if a formula can be used to solve the problem or a flow. Thank you.
User | Count |
---|---|
256 | |
103 | |
92 | |
47 | |
37 |