Hello everyone, lets see if someone can give me a hand.
I have two tables in dataverse, one that contains some items. and a second one that uses a forall() and collect for local gallery, from the first table to create daily items. Both tables have a Yes/No column, Then what i want to do is at the end of my app i update the first "main" list with the value from the daily list/collection.
For speed purpose i do this:
Patch('Lodd Lager Hall', ShowColumns(colLodd, "cr17e_lodd_lager_hall_id", "cr17e_item_slutt_telt", "cr17e_item_sold_out") )
Before (when i used sharepoint list) it worked fine, but now it doesnt. i dont seem to get why, when i remove the column "cr17e_item_sold_out" (which is the yes/no column) it works.
This is the error that i get:
Anyone pls ? 🙂
It looks to me like your Patch() is missing the second argument, to identify the record. If you are trying to create a new record, it would read like this:
Patch('Lodd Lager Hall',
Defaults('Lodd Lager Hall'),
ShowColumns(colLodd,
"cr17e_lodd_lager_hall_id",
"cr17e_item_slutt_telt",
"cr17e_item_sold_out"
)
)
If you are trying to merge records using Patch(), then you have to present records (not tables) to the function.
Hope that helps,
Bryan
Hi @t12013,
Do you want to patch the update the main first list based on the collection?
Could you please share a bit more about the scenario?
If you want to update the table with several column values in the collection, you should use the ForAll().
Please modify your formula as below:
ForAll(colLodd,
Patch('Lodd Lager Hall',
Defaults('Lodd Lager Hall'),
{Column1_In_Your_MainList:cr17e_lodd_lager_hall_id,
Column2_In_Your_MainList:cr17e_item_slutt_telt,
Column3_In_Your_MainList:cr17e_item_sold_out
}
)
(
Hope it could help you at some degree.
Hello evrybody , thanks for help. but i wanna Update items in the "main" list. with the value from the second list in the collection. i have another gallery with exacly the same set up (one main list and one child list) and there it works. The only difference is that that list doesnt include a YES/NO field.
As mention in my post, if i remove the:
cr17e_item_sold_out
then the funcion is happy. so its clearly something with the Yes/No field. Any help pls ?
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
179 | |
94 | |
63 | |
61 | |
58 |
User | Count |
---|---|
246 | |
165 | |
91 | |
76 | |
76 |