Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Robust way to track "false" condition statements

Posted on by 109

To explain in more detail...

I'm referencing a Sharepoint List in Powerapps canvas in order to create a "column auditor".... For each Sharepoint row (which will be rows in a gallery), I will have a list of conditions to audit each column to see if that particular column passes the audit or not. I would like to not have all of these columns in the gallery, I would like to just boil that down to a single column indicating if that row passed the overall audit or not and if not, list out a list of items that need to be fixed to make it pass audit.

 

Example Gallery #1 - Doing this short term to break out all the logic so its manageable and easy to get right before combining it

 Audit for weblink ColumnAudit for addressAudit for xyz
Item #1checks to see if this field is blank.. if so "Fill in the weblink". Otherwise no note is neededchecks to see if this field is blank...if so "Fill in the address". Otherwise no note is needed 
Item #2   

 

Goal Gallery - Simple table.. passed audit or not and if not why

 Passes audit?
Item #1(CHECK MARK)
Item #2(X with a tooltip outlining just a comma delimited failed audit items)

 

So two items I'm trying to understand are:

1) Looking for a best practice method and example to gather all of the failed audit instructions in order to output it for that particular item and row in the gallery....... not sure if a collection is even feasible to use as multiple rows are going to need to reference multiple collections?

2) I don't know why I'm not visualizing this (maybe its too late, idk) but I'm having a hard time figuring out how I would take all of these audits (for simplicity's sake, call them if conditions) and merge them into a single objects text

 

Thanks in advance

  • Verified answer
    Tony_Bowes_BP Profile Picture
    Tony_Bowes_BP 280 on at
    Re: Robust way to track "false" condition statements

    Even though you don't want to show each individual audit condition, you may as well use icons in the gallery to do the individual detections and then just make them invisible. This also has an added bonus of making them visible when debugging

     

    Use each icon in the gallery to detect a specific auditable element and change the icon accordingly. Something like:

    For icon field:

     

    If(ThisItem.'weblink'="", Icon.Cancel,Icon.Check)

     

     

     For Tooltip field:

     

    If(ThisItem.'weblink'="", "Fill in the Weblink. ","")

     

     

    Then create final icon that is visible and simply uses the icon type as the confirmation mechanism: 

    For icon field:

     

    If (
     Or(
     icoCheck1.Icon = Icon.Cancel,
     icoCheck2.Icon = Icon.Cancel
     ),
     Icon.Cancel,
     Icon.Check
    )

     

     

    .. and the tooltip to aggregate any possible tooltips:

    For the Tooltip field:

     

    Concatenate(icoCheck1.Tooltip,icoCheck2.Tooltip)

     

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

October 2024 Newsletter…

October 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #4 How to Conntact Support…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 142,473

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,659

Leaderboard