Hi all,
I have a gallery that can have several items in it, the items come from a collection. When I patch the gallery to a SharePoint list (Consumable Transactions) I would like to add a comment to each of the items patched to the SharePoint List. The comment will be the same comment for each item in the gallery and the comment will come from a text input outside the gallery (txtComment).
What I currently have is working fine, but how do I add the comment to each record using the txtComment input.
I have included my current code below, just need to add the outstanding bit if anyone can help please.
ForAll(
galBasket.AllItems,
Patch(
'Consumable Transactions',
//Defaults('Consumable Transactions'),
{
Title: ThisRecord.Title,
Qty: Value(ThisRecord.Qty),
Transaction_ID: (ThisRecord.Transaction)
}
);
Patch(
'Consumable Tools',
LookUp(
'Consumable Tools',
ThisRecord.ID = Transaction
),
{'In Stock': InStock - Value(Qty)}
);
);
Clear(colBasket);
Notify (
"Update Successful",
NotificationType.Success,
5000
)
Thanks In Advance
I was sure I tried that but clearly I done something wrong as this time it worked fine.
Thanks for your help
Greetings!
Well, as far as I'm concerned and understanding that there is only one textbox outside the gallery, just adding the column pointed to the textbox should work . . .
ForAll(
galBasket.AllItems,
Patch(
'Consumable Transactions',
//Defaults('Consumable Transactions'),
{
Title: ThisRecord.Title,
Qty: Value(ThisRecord.Qty),
Transaction_ID: (ThisRecord.Transaction),
'Your comment column': yourtextbox.text
}
);
Patch(
'Consumable Tools',
LookUp(
'Consumable Tools',
ThisRecord.ID = Transaction
),
{'In Stock': InStock - Value(Qty)}
);
);
Clear(colBasket);
Notify (
"Update Successful",
NotificationType.Success,
5000
)
Hopefully this works for you. Let me know if you need any more help!
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2