
Announcements
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 Column | Audit for address | Audit for xyz | |
| Item #1 | checks to see if this field is blank.. if so "Fill in the weblink". Otherwise no note is needed | checks 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
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)