Hi @DCpower ,
Could you please share a bit more about the issue that you mentioned?
Could you please share more details about the CurrentUser variable that you mentioned within your Patch formula?
Further, do you want to use a separated SP list to list the user reocrds instead of Collection?
Based on the needs that you mentioned, please consider modify your Filter formula within the Items property of the Gallery as below:
Filter(
tablename,
StartsWith(WOCustomer,T_obb_CustFilterInput.Text) || T_obb_CustFilterInput.Text="",
WOAssignedTo=Dr_Tech_1.Selected.Value || Not(T_techfilterengage.Value),
WOStatus=Dr_StatusFilter.Selected.Value || Not(T_statusfilterengage.Value),
Not(WOStatus="Closed"),
WOBranch in 'Seperated List'.Location /* <-- Add formula here */
)
In addition, if you want to change the reference of the current user's location to the same list, please consider modify your Patch formula as below:
Patch(
tablename,
Defaults(tablename),
{
WONumber:Max(Max(tablename,WONumber)+1,Max(tablename2,WVNumber)+1),
WOCustomer:T_CustInput.Text,
WOPO:T_PO.Text,
WODateInSmiley Very Happy_DateIn.SelectedDate,
WOAssignedToSmiley Very Happyr_AssignedTech.Selected.Value,
WOStatusSmiley Very Happyr_Status.Selected.Value,
WOContact:T_ContactInput.Text,
WODateCompleted:Blank(),
WODateInvoiced:Blank( ),
WOBranch: LookUp('Separated List', UserEmail = User().Email, Location), /* <-- Modify formula here */
WOWorkTypeSmiley Very Happyr_WorkType.Selected.Value,
WOInstructions:T_NotesInput.Text
}
)
In addition, you could also consider store the current login user email into a variable, then reference the variable within your Patch formula:
Set the OnStart property of the App control to following:
Set(CurrentUserEmail, User().Email)
Modify your Patch formula as below:
Patch(
tablename,
Defaults(tablename),
{
WONumber:Max(Max(tablename,WONumber)+1,Max(tablename2,WVNumber)+1),
WOCustomer:T_CustInput.Text,
WOPO:T_PO.Text,
WODateInSmiley Very Happy_DateIn.SelectedDate,
WOAssignedToSmiley Very Happyr_AssignedTech.Selected.Value,
WOStatusSmiley Very Happyr_Status.Selected.Value,
WOContact:T_ContactInput.Text,
WODateCompleted:Blank(),
WODateInvoiced:Blank( ),
WOBranch: LookUp('Separated List', UserEmail = CurrentUserEmail, Location), /* <-- Modify formula here */
WOWorkTypeSmiley Very Happyr_WorkType.Selected.Value,
WOInstructions:T_NotesInput.Text
}
)
Please take a try with above formula, check if the issue is solved.
Best regards,