web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / looping through certai...
Power Apps
Unanswered

looping through certain datacards and only grabbing those to display

(0) ShareShare
ReportReport
Posted on by 432

im not sure if i need to use powerapps or powerautomate for this, but either will work for me, but what i would like to do is loop through all my data cards and grab only certain ones.

 

say i have many datacards with yes/no options

id like power apps or power automate to loop through and only display the ones where 'no' was selected, for example, consolidate them all in one screen/form

im assuming i can use power automate to traverse through the sharepoint list and look for all values that equal 'no', and display that in someway, but is there a way for that to be done within power apps?

 

so at the end of my app I can have a page/form/screen or whatever that only shows those yes/no datacards that contain 'no' value?

Categories:
I have the same question (0)
  • LaurensM Profile Picture
    12,516 Moderator on at

    @dperez13 You could list all records with "no" selected in a Power Apps gallery control.
    This can be done by adding the following code to the Items property of that gallery:

    Filter(SharePointList, yesNoColumn = false)

     
    If this solves your question, would you be so kind as to accept it as a solution.
    Thanks!

  • dperez13 Profile Picture
    432 on at

    can you filter a form viewer in the same way?

  • dperez13 Profile Picture
    432 on at

    I think what this does is grab one column where the row has a no value and list those records. what i want to do is show all the columns in one row that have a no in there. 

    so i have a row with 3 columns. and 2 of them have no as the value. i want both of those to show up on the last page. or how ever many had no chosen. 

     

    in summary: i go into a row item, and from one screen or whatever I can see all the columns that have a no value for that particular row/line item

  • dperez13 Profile Picture
    432 on at

    id like to collect all columns where value = no

     

    edit: here is a solution im seeing

     

    have a display form with all the datacards in it (theres a lot unfortunately). have each of their visible properties be . IF value = no , true 

    caveat, anyway to do this en masse? 

    If(thisitem.value = no)

    and changing the visible property of all the datacards in one go?

     

    what i cant do, as it would take forever is right 300 unique visible lines of code

    if datacard #23432423.value = 'no', true

    id rather have a shorthand writing it for all the cards.

     

    any suggestions appreciated

     

     

  • dperez13 Profile Picture
    432 on at

    can you elaborate on this solution? how does this bring in all the columns where no is selected?

  • dperez13 Profile Picture
    432 on at

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Show-columns-in-gallery-based-on-a-condition/td-p/658893 anyway to do this but with a for each loop for every column?

  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @dperez13 my apologies for the delay and confusion.

    Judging by my initial answer, I clearly did not understand the requirement fully.

     

    If you only want to show the datacards in the edit form with the value 'No'.

    The only 'in bulk' way I currently know of is:

     

    1. Select all Yes/No data cards (not the DataCardValue/toggle) by Shift + selecting from the tree view (ignore the data card names):
      LaurensM_0-1671474871735.png
    2. Going to the Visible property and adding the following statement:

     

    Self.Default = false

     

    This way you will bulk update all selected data cards at once. All selected data cards will have that statement in the Visible property. The default value will be the value the record has in SharePoint.

     

    You can change the no values to yes and then submit the form, updating the record and making these fields disappear as well.

     

    Could you test this and see if it meets your requirements?
    Thanks!

  • dperez13 Profile Picture
    432 on at

    im still not clear on how i can have a form that only shows datacards of a certain value.. on screen 1 i want yes/no choices and on screen 2 id like for only the choices that were no to show up..

  • dperez13 Profile Picture
    432 on at

    i was thinking, how about a button on a form that when pressed, modifies all datacards visible property to only show those with a certain value remaining? with a revert feature somewhere, as well

  • LaurensM Profile Picture
    12,516 Moderator on at

    @dperez13 due to the datacards having the visible formula 'Self.Default = false'.

    This will check and only show the data card (that column) if the current record has 'No' as value to that column.

     

    Let's take a fictive selected record:

     

    Column AColumn BColumn C
    yesnono

     

    The visible code of my previous comment would only show the data cards of column B and C in the edit form.

    I made a test SP List and created a form according to the record above.
    This form has Visible property of true on the data cards:

    LaurensM_0-1671477885555.png

    This Form has Self.Default = false on the visible property of all 3 columns:

    LaurensM_1-1671477948504.png

     

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard