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 / Displaying Approvers N...
Power Apps
Answered

Displaying Approvers Name depending on approval range

(2) ShareShare
ReportReport
Posted on by 1,176

Hi,

I'm creating an app for our purchasing team.

The requirements are depending on the value of the purchased total cost a specific approver will need to be informed.  A flow will be created on the back of this.

I have a SharePoint list with the name and the approval range.  

How can I get this information to display in my app?  

I assume Lookup function will be used by not sure how to get the value issue??

ClarkyPA365_0-1685617379376.png


ClarkyPA365_1-1685617445727.png

 

 

Categories:
  • KeithAtherton Profile Picture
    3,709 Most Valuable Professional on at

    Hi @ClarkyPA365,

     

    To display information from a SharePoint list in the Power App, try the instructions in this article:

    https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/connections/connection-sharepoint-online

     

    Then you can display the data from this data connection as required. One option to display records in a list would be to use the gallery control:

    https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/controls/control-gallery


    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    Follow me online.

  • Chris1968 Profile Picture
    1,176 on at

    Hi @KeithAtherton 

    Sorry I may have mis-lead when I said about 'How can I get this information to display in my app?'

    I have the SP list connected to my app.  It's how to display the correct name in the app for the amount that they can approve

    So if between 100.00 > 999.99 Name A,  1000.00 > 9999.99 Name B, 100,000.00 > 999,999.99 Name C

  • KeithAtherton Profile Picture
    3,709 Most Valuable Professional on at

    Thanks for clarifying. Try the following code, assuming that your SharePoint list of approvers is called Approvers, and the total cost you're checking against is named locTotalCost:

    Set(gblApprover,
     First(
     SortByColumns(
     Filter(Approvers, Amount > locTotalCost),
     "Amount"
     )
     )
    );

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    Follow me online.

  • Chris1968 Profile Picture
    1,176 on at

    Hi,

    There is one other issue....

    There are a number of different Cost Centres which have different approvers, again depending on the Total Cost.

    Cost Centre    100 - 999     1000.00 - 9999.00   100,000.00 - 999,999.99
    ITS50101         Name A             Name D                     Name F
    ITS50102         Name D             Name A                     Name B
    ABC1111         Name B              Name E                     Name A
    DEF2222          Name C             Name F                     Name  D

  • Verified answer
    KeithAtherton Profile Picture
    3,709 Most Valuable Professional on at

    OK, then I'd suggest incorporating the cost centre (locCostCentre) into the filter like this:

    Set(gblApprover,
     First(
     SortByColumns(
     Filter(Approvers, Amount > locTotalCost && CostCentre = locCostCentre),
     "Amount"
     )
     )
    );

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    Follow me online.

  • Chris1968 Profile Picture
    1,176 on at

    Hi,

    Sorry about all the questions.

    I put the Set formula on the App On Start??

    Screen shot from app

    ClarkyPA365_0-1685624836267.png

    Screen shot from SP (Title column is the names of the approvers)

    ClarkyPA365_1-1685624900987.png
    Does it impact the formula that the format of the values are not the same??

     



     




  • KeithAtherton Profile Picture
    3,709 Most Valuable Professional on at

    No problem, I'm happy to help. Some trial-and-error with the code may be required - for example, the Approver text input control may need the Text property to something like gblApprover.Title.

     

    Again, try a few things, and hover over error messages to give more clues. Hope that helps!


    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    Follow me online.

  • Chris1968 Profile Picture
    1,176 on at

    Hi,

    In a previous post you mention locTotlaCost and now locCostCentre.  Do these relate to the  columns headers in the SAP - Approvers SP list or the name of the fields in the app??

  • KeithAtherton Profile Picture
    3,709 Most Valuable Professional on at

    Those variables (locTotalCost and locCostCentre) represent the total cost and cost centre on the app screen, see below. Feel free to change them as required.

    KeithAtherton_0-1685634628305.png


    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    Follow me online.

  • Chris1968 Profile Picture
    1,176 on at

    Hi @KeithAtherton 

    Sorry I'm a bit confused.

    The Set part of the of your initial formula is a Global Variable?

    I'm using this on the App 'OnStart'  

    ClarkyPA365_0-1685706021001.png

     

    But the variables 'loc' I assume relate to Context Variables??  
    Where should these 'loc' variables be used for the respective fields which are DataCardValue 

    Apologises if I've totally mis-understood 🤔

    Edited 02/06/2023 13:10 GMT

    I think I've understood it a bit more??

    I've changed the loc values to the values of the column headings in my SP list which happen to be Amount & Cost Centre.

    I've added glbApprover.Title to the Default property, for the DatacardValue for Approver.  Nothing returned.

    I'm not sure if the set up in the SP list needs to be looked at as it just as the one amount in and not a range section??

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