I have some doubts about my understanding of logic at the moment. I'm trying to patch an entry in a SharePoint list(sport) to reduce the number of participants in a sports unit by -1.
The Gallery does not access this SP list(Sport) but the SP list booking_1, in the booking_1 the ID of the sports unit is given to each entry in the SP list "Sport" (column IDSport) so I can create a match.
But unfortunately none of my approaches works, I am already having the data of the SP list "booking_1" saved in a collection when opening the page.
Does anyone have an idea how I could solve my problem?
here is the error message that is currently displayed.
Solved! Go to Solution.
Hi,
It seems that the sportID is a collection and not a record. You can try:
Patch(sport, lookup(sport, ID=ThisItem.IDSPORT), {'Teilnehmer Anzahl':lookup(sportID, ID=ThisItem.IDSPORT, 'Teilnehmer Anzahl')-1});
otherwise you can lookup the value directly in sharepoint:
Patch(sport, lookup(sport, ID=ThisItem.IDSPORT), {'Teilnehmer Anzahl':lookup(sport, ID=ThisItem.IDSPORT, 'Teilnehmer Anzahl')-1});
Hope this helps,
Alex
I hope it's ok to bring threads back to the top.
Maybe someone has an idea how I could solve my problem.
Hi,
Would you be able to share how you set up 'sportID'?
Thanks,
Alex
Shure
OnVisible: get information from booking_1
Sharepointlist "Sport"
Collection"SportID":
Push to booking_1 Sharepoint List for booking and pass the ID of the entry in "Sport" to booking_1 column
I have already tried it without Collect directly with the sharepoint list as comparison in the patch instruction
Hi,
It seems that the sportID is a collection and not a record. You can try:
Patch(sport, lookup(sport, ID=ThisItem.IDSPORT), {'Teilnehmer Anzahl':lookup(sportID, ID=ThisItem.IDSPORT, 'Teilnehmer Anzahl')-1});
otherwise you can lookup the value directly in sharepoint:
Patch(sport, lookup(sport, ID=ThisItem.IDSPORT), {'Teilnehmer Anzahl':lookup(sport, ID=ThisItem.IDSPORT, 'Teilnehmer Anzahl')-1});
Hope this helps,
Alex
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
203 | |
171 | |
63 | |
32 | |
31 |
User | Count |
---|---|
339 | |
271 | |
105 | |
71 | |
56 |