I have 2 Sharepoint lists: "Client Supply Requests", and "Client Supplies."
"Client Supply Requests" has a lookup column to "Client Supplies" ID column.
The first list is meant to record each supply item a client requests on an individual row.
The intent here is to allow users to insert multiple rows into "Client Supply Requests" with a single button click. So, I have an app that has a few text input fields, and a dropdown that displays values from the "Client Supplies" list. There is an "Add" button that, when each time clicked, adds the currently selected items to a collection. The code is as follows:
Collect(
ClientSupplyCollection,
{
Col_Supply: dd_supply.Selected,
Col_SupplyID: dd_supply.Selected.Id,
Col_Requested: tb_ReqQty,
Col_Approved: tb_AppQty
}
)
I have a button called "Save" that has code:
ForAll(
ClientSupplyCollection,
Patch(
'Test Supply Request',
Defaults('Test Supply Request'),
{
Supply: Col_SupplyID,
'Requested Quantity': Col_Requested,
'Approved Quantity': Col_Approved
}
)
)
But when trying to patch the collection I get an error "The type of this argument 'Supply' does not match the expected type 'Record'. Found type 'Number'.
How do I get the type "Record" from my dropdown connected to the related list to patch the collection into my main list?