web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : mdBsAXeO948RMBILq2oZ51
Power Apps - Building Power Apps
Answered

Pre-Populate the data in dropdown and text input

Like (0) ShareShare
ReportReport
Posted on 9 Feb 2022 09:12:03 by 157

I have 2 galleries in my app. In 1st gallery (Before outage), I am entering some data in dropdown & text box and saving it. 

SUPRIYAK_0-1644397349867.png

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.

SUPRIYAK_1-1644397842483.png

 

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.

 

 

  • Verified answer
    v-jefferni Profile Picture
    on 15 Feb 2022 at 09:36:51
    Re: Pre-Populate the data in dropdown and text input

    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.

  • SUPRIYAK Profile Picture
    157 on 14 Feb 2022 at 13:26:41
    Re: Pre-Populate the data in dropdown and text input

    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")
    );

  • v-jefferni Profile Picture
    on 14 Feb 2022 at 02:25:20
    Re: Pre-Populate the data in dropdown and text input

    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.

  • SUPRIYAK Profile Picture
    157 on 11 Feb 2022 at 13:33:11
    Re: Pre-Populate the data in dropdown and text input

    I am able to pre-populate both the fields now but those prefteched data is not getting stored in sharpoint list.

    SUPRIYAK_0-1644586235638.png

     

     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.

  • v-jefferni Profile Picture
    on 11 Feb 2022 at 09:36:55
    Re: Pre-Populate the data in dropdown and text input

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473