Announcements
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??
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.
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 approveSo if between 100.00 > 999.99 Name A, 1000.00 > 9999.99 Name B, 100,000.00 > 999,999.99 Name C
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" ) ) );
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.99ITS50101 Name A Name D Name FITS50102 Name D Name A Name BABC1111 Name B Name E Name ADEF2222 Name C Name F Name D
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" ) ) );
Hi,Sorry about all the questions.I put the Set formula on the App On Start??Screen shot from app
Screen shot from SP (Title column is the names of the approvers)
Does it impact the formula that the format of the values are not the same??
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!
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??
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.
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'
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 GMTI 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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 393 Super User 2026 Season 2
Mohsin Ali 328
WarrenBelz 278 Most Valuable Professional