cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sujimon
Frequent Visitor

Loop through column values in a record

Hi,

I am loading a record into collection using below code. I want to loop through the columns and perform some action if column value is "No". 

 

Set(varUser, User().Email);

ClearCollect(myCollection,LookUp(tblStaff,Email = varUser));

 

Thanks

Suji

1 ACCEPTED SOLUTION

Accepted Solutions
iAm_ManCat
Super User
Super User

Hi, you can't loop through column values, you have to specify a check for each of the columns

like:

ForAll(myCollection,
   If(Column1 = "No" Or Column2 = "No" Or Column3 = "No",
      DoSomething
   )
)
@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

1 REPLY 1
iAm_ManCat
Super User
Super User

Hi, you can't loop through column values, you have to specify a check for each of the columns

like:

ForAll(myCollection,
   If(Column1 = "No" Or Column2 = "No" Or Column3 = "No",
      DoSomething
   )
)
@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (6,732)