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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Help with nested colle...
Power Apps
Unanswered

Help with nested collection

(0) ShareShare
ReportReport
Posted on by 25

Help with logic to detemine approval route please - how to determine based on conditions, if a users approval is required.

I have two forms.  One form is a routing configuration form that allows an admin to configure conditions when an approver is required for a given request type.[in this example, Car Rental will have two approvers based on the users input values of the fields on the form "Rental Cost" and "Insurance Coverage"]. I have  provided screen shots and my two collection below

 

Admin Config Form

FlexRouteAA.PNG

User Input Form

UserInput.PNG

Collection FlexApprovalAA show the conditions to meet if the approver is required
[
  {
    "ApproverDisplayName": "Bob Smith",
    "Conditions": [
      {
        "conditionNumber":1,
        "compareOperator": "",
        "comparison": ">",
        "comparisonValue": "500",
        "field": "Rental Cost",
        "fieldType": "Number"
      },
      {
        "conditionNumber": 2,
        "compareOperator": "or",
        "comparison": "=",
        "comparisonValue": "No",
        "field": "Insurance Coverage",
        "fieldType": "Yes/No"
      }
    ],
    "DisplayOrder": 0
  },
  {
    "ApproverDisplayName": "Jane Doe",
    "Conditions": [
      {
        "conditionNumber": 1,
        "compareOperator": "",
        "comparison": "=",
        "comparisonValue": "Yes",
        "field": "Insurance Coverage",
        "fieldType": "Yes/No"
      }
    ],
    "DisplayOrder": 0
  }
]
 
The following is the collection that holds the data for the user input form
jim_beam_0-1681406558869.png

 

 

 

 

Categories:
  • jim_beam Profile Picture
    25 on at

    My attempt [likely the wrong way] was as follows, which is for only one condition on the first row.  It would be a BIG mess if I carry on with this approach.  Any thoughts on how to simplify would be much appreciated

     

    UpdateIf(FlexRouteAA,true,
    {
    ApprovalRequired:If(
    (First(ThisRecord.Conditions).comparison=">") And
    (Value((LookUp(colFormTemplate As a,a.FieldLablel=First(ThisRecord.Conditions).field)).Data)>Value(First(ThisRecord.Conditions).comparisonValue)),
    true,
    false
    )


    }
    );

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard