Hi all,
I've been building up an app based loosely around @Shanescows youtube videos for PowerApps repeating tables (like InfoPath).
My app is similar in that we have the following:
- Button to create new 'expense' - creates new form, and new collection with columns as required, navigates to next screen
NewForm(Form1);
ClearCollect(
ExpenseCollection,
{
LineDescription: "",
LineCost: 0,
LineCostinclGST: 0,
LineCostexclGST: 0,
LineCostGST: 0,
LineCurrentUser: User().FullName,
LineApprover: "",
LineCostCentre: "",
LineProject: "",
LineJobRelated: "True",
LineGSTincl: "True"
}
);
Navigate(
NewReimbursement,
ScreenTransition.Fade
)
- Form (linked to sharepoint list 1) and gallery for individual entries (which patch individually to the collection by a 'commit' button:
Patch(
ExpenseCollection,
ThisItem,
{
LineDescription: InputDescription.Text,
LineCost: Value(InputCost.Text),
LineApprover: InputApprover.Selected.Mail,
LineProject: InputProject.Selected.'Project Number',
LineCostCentre: InputCostCentre.Text,
LineJobRelated: JobToggle.Value,
LineGSTincl: GSTToggle.Value,
LineCostexclGST: Value(AmountExclGST.Text),
LineCostinclGST: Value(AmountInclGST.Text),
LineCostGST: Value(GST.Text)
}
);
Collect(
ExpenseCollection,
{
LineDescription: "",
LineCost: 0,
LineCostinclGST: 0,
LineCostexclGST: 0,
LineCostGST: 0,
LineApprover: "",
LineCostCentre: "",
LineProject: "",
LineCurrentUser: User().FullName,
LineJobRelated: "True",
LineGSTincl: "True"
}
)
- Save button which submits Form (SP list 1), and patches collection data to SP list 2
Trouble is, I have included two combo boxes within the gallery that look to external sources for their data. I have an 'Approver' (O365 users) field 'InputApprover' that we're using the 'Mail' component of the record, and a 'Project' field, which references items in another SP list (call this SP list 3).
When patching the data from the gallery to the collection, I am only able to get these to patch as text. When saving (submitting the form and patching the collection to SP list 2), it falls over because it expects a type 'record', but is text.
Does anyone have any ideas how to patch a SP record to a collection, and then patch again to SharePoint?
Sorry if this is a bit vague - I've been doing this for all of a couple of days.

Report
All responses (
Answers (