Hi!
I have a collection MainData3 with 4 fields: CounterParties, Expenses, Sum, Number
And CounterParties its an array:
I create a gallery for MainData3 and a second gallery2 into for ThisItem.CounterParties.
I would like to add and delete into one item some counterParties
And try it, but it just update one Counterparty.
Patch(MainData3;LookUp(MainData3;Expence=ThisItem.Expence);{CounterParties: {Name: ComboBox9.Selected.CounterPartyName}})
How to add new CounterParty to CounterParties Array correctly and how delete separatly from this Array?
Hi all, I just encountered the same issue as described above. I'm attempting to build a new json object with updated properties to be saved to a sharepoint list. I'm defining a new object to add to an existing collection:
// add CDE-id module to jsonAccessConfig field
Set(newCDEmodule,
{
id:"CDEID",
roles:["EDITOR"],
portfolios:[],
providers:[],
reasonForAccess:"test",
approvalStatus:"APPROVED"
}
);
Clear(collFinalCDEmodules);
// convert new record to a table
ClearCollect(collFinalCDEmodules, newCDEmodule);
// trying to get values of roles array
Set(rolesArray, collFinalCDEmodules.roles);
ForAll(
collFinalCDEmodules,
Patch(
collUserJsonModules,
Defaults(collUserJsonModules),
{
id: collFinalCDEmodules[@id],
//roles: collFinalCDEmodules[@id], // this line is the issue, what is the syntax to Patch an array here?
approvalStatus: collFinalCDEmodules[@approvalStatus],
reasonForAccess: collFinalCDEmodules[@reasonForAccess]
}
)
);
Guys, please help:)
WarrenBelz
146,605
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,946
Most Valuable Professional