I have 2 galleries in my app. In 1st gallery (Before outage), I am entering some data in dropdown & text box and saving it.
Now when I navigate to next screen (before service), then I want only two field (safety tag & Release order no.) to be pre-filled as per the data filled in 1st gallery.
And in each gallery we will have 3 different people to enter data which is selected from main dropdown (working party-1, working party-2 & working party-3). So data entered by working party-1 shall be prefetched only in working party-1 of 2nd gallery and similary same for other working parties.
Kindly suggest a solution.
Hi @SUPRIYAK ,
If the Temp_Response control within the Gallery is a Label or TextInput box, and Response_1/_2/_3 columns are Text column, the formula is:
ForAll(RenameColumns(Filter(Clc_Temp_WP_Bef_Serv,Exst_Sts="New"),"ID","ID_temp1"),
If(Drpdwn_Bef_Serv.SelectedText.Value="Working Party-1",
Patch(AOA_TPT_Outage_Process_Demo_Response, LookUp(AOA_TPT_Outage_Process_Demo_Response,ID=ID_temp1),
{
Response_1:Temp_Response.Text,
Start_Time: Var_Start_Time,
End_Time:Now(),
User: TextInput3.Text
//Working_Party_Type:"Type1"
}),
Drpdwn_Bef_Serv.SelectedText.Value="Working Party-2",
Patch(AOA_TPT_Outage_Process_Demo_Response, LookUp(AOA_TPT_Outage_Process_Demo_Response,ID=ID_temp1),
{
Response_2:Temp_Response.Text,
Start_Time: Var_Start_Time,
End_Time:Now(),
User: TextInput3.Text
//Working_Party_Type:"Type1"
}),
Drpdwn_Bef_Serv.SelectedText.Value="Working Party-3",
Patch(AOA_TPT_Outage_Process_Demo_Response, LookUp(AOA_TPT_Outage_Process_Demo_Response,ID=ID_temp1),
{
Response_3:Temp_Response.Text,
Start_Time: Var_Start_Time,
End_Time:Now(),
User: TextInput3.Text
})
));
Navigate(Scrn_Equioment_List_OP_Proc,Cover);
You need .Text after the control name: Response_1:Temp_Response.Text
Hope this helps.
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
Temp_Response is the virtual column in collection to store the responses of form. And Response_1 is the actual coulmn in sharepoint list to store the responses of form filled by working party-1, Response_2 for working party-2 and Response_3 for Working party-3.
please find below the code for more clarity:
ClearCollect(Clc_Temp_WP_Bef_Serv,ShowColumns(AddColumns(
Sort(Clc_Befser_list,ID,Ascending),
"Temp_Response",
If(Drpdwn_Bef_Serv.SelectedText.Value="Working Party-1",Response_1,
Drpdwn_Bef_Serv.SelectedText.Value="Working Party-2",Response_2,
Drpdwn_Bef_Serv.SelectedText.Value="Working Party-3",Response_3
),
"Exst_Sts",
If(If(Drpdwn_Bef_Serv.SelectedText.Value="Working Party-1",Response_1,
Drpdwn_Bef_Serv.SelectedText.Value="Working Party-2",Response_2,
Drpdwn_Bef_Serv.SelectedText.Value="Working Party-3",Response_3)=Blank(),"New","Exists")
),"Check_Para","Check_Type","Temp_Response","ID","Exst_Sts")
);
Hi @SUPRIYAK ,
What is the Temp_Response control? Which type are the columns Response_1, Response_2 and Response_3?
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
I am able to pre-populate both the fields now but those prefteched data is not getting stored in sharpoint list.
Below is the code which is written in save button of 'Before service' screen:
ForAll(RenameColumns(Filter(Clc_Temp_WP_Bef_Serv,Exst_Sts="New"),"ID","ID_temp1"),
If(Drpdwn_Bef_Serv.SelectedText.Value="Working Party-1",
Patch(AOA_TPT_Outage_Process_Demo_Response, LookUp(AOA_TPT_Outage_Process_Demo_Response,ID=ID_temp1),
{
Response_1:Temp_Response,
Start_Time: Var_Start_Time,
End_Time:Now(),
User: TextInput3.Text
//Working_Party_Type:"Type1"
}),
Drpdwn_Bef_Serv.SelectedText.Value="Working Party-2",
Patch(AOA_TPT_Outage_Process_Demo_Response, LookUp(AOA_TPT_Outage_Process_Demo_Response,ID=ID_temp1),
{
Response_2:Temp_Response,
Start_Time: Var_Start_Time,
End_Time:Now(),
User: TextInput3.Text
//Working_Party_Type:"Type1"
}),
Drpdwn_Bef_Serv.SelectedText.Value="Working Party-3",
Patch(AOA_TPT_Outage_Process_Demo_Response, LookUp(AOA_TPT_Outage_Process_Demo_Response,ID=ID_temp1),
{
Response_3:Temp_Response,
Start_Time: Var_Start_Time,
End_Time:Now(),
User: TextInput3.Text
})
));
Navigate(Scrn_Equioment_List_OP_Proc,Cover);
Please help.
Hi @SUPRIYAK ,
If you want to pre-populate a Dropdown and a Text Input box, you could simply set Default of them to the previous control name. For example Dropdown2.Default = Dropdown1.Selected, TextInput2.Default = TextInput1.Text
I'm not able to clearly understand the sentence "data entered by working party-1 shall be prefetched only in working party-1 of 2nd gallery". But if you would like to filter the Gallery with the dropdown auto-populated value, you could set Items of Gallery2 to:
Filter(OriginalDataTable, WorkingParty = Dropdown2.Selected.Value)
Hope this helps.
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473