I have a problem with a form in PowerApps. The form is linked to a SharePoint list (list 1) and it works well. However, I have two fields where I get information from another sharepoint list to transfer to list 1. I do this by creating a collection at start up and adding the following code on the Default property of the card.
I did this because adding a lookup field in sharepoint list 1 was leading to problems pulling through the data, and further problems with sorting. However whilst the solution above works sometimes, a lot of the time the data is not pulled through.
I would be grateful if anyone has any advice on how to resolve this issue.
Just making sure I understood it right: Are you trying to pull the priority from another list to display on the form of List1 item (by using srCodeID as the lookup value)?
If yes, are you suggesting that this fetches the priority only sometimes? Getting some obvious stuff out of the way, but have you made sure that the data exists in the other list i.e. priorities for the srCoreIDs for which you dont see the priority in the form?
As a way to test, I suggest you create a gallery of List1 items and a gallery of List2 items and try to filter the List2 gallery based on srCodeID from Gallery1 with the items property of the List2 gallery set to something like this:
Filter(List2, ID = Gallery1.Selected.srCodeID) and try to display the priority field in this gallery. Let me know the results.
PS: List2 could simply be your collection.
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!
Hi @JMMurphy ,
Could you please share a bit more about the form that you mentioned?
Do you custom a form in your SP List using PowerApps or create a standalone canvas app?
Where do you create your CollectCore Collection? Could you please share more details about the formula? Could you please share a bit more about the srCoreID variable?
Based on the LookUp formula you provided, I could not find any syntax error with it. Please make sure the srCoreID variable could match corresponding ID value within your CollectCore, and the related Priority column has valid value.
Actually, it is not necessary to set up a Collection to store another SP List records, you could consider directly reference values from it based on a specific condition. On your side, you could consider modify your formula as below:
LookUp('Another SP List', ID = srCoreID, Priority)
LookUp('Another SP List', ID = Value(srCoreID), Priority)
Also please consider set the Default property of the Text Input box within the corresponding Data card in your Edit form to above formula, check if the issue is fixed.
Thanks for your reply.
The form is within a SharePoint app.
The CollectCore collection is created when the app opens.
The srCoreID variable is a number and corresponds with the ID column of a sharepoint list. The point of the look up is to look up the equivalent id in another sharepoint list and copy the value in the 'Priority' column into the form.
I tried both of your suggested formulas and have copied the formula into the default property of the Data Card and Data Card Value. I also tried replacing the collection with the actual sharepoint list. However the formula is not working. Sometimes it brings back a value, but it seems to happen randomly, and not very often.
The formulas all come back with the error message 'This formula uses scope which is not presently supported for evaluation'. There is also a note saying the data type is text.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
At the monthly call, connect with other leaders and find out how community makes your experience even better.