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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Answered

Pop-up form

(0) ShareShare
ReportReport
Posted on by 116

Hi All,

I have a form to record data into SP List, one section on that form using Cascade function, but if the list not yet on the drop-down choice user can add new value using a button to trigger a pop-up form. But right now if user add new value than back to the main form, all value already type before being empty (reset) so the user need to retype it. How to solve this? And the second questions if user used a pop-up form is it possible to stored new added value to the main form fields?

 

Here the Main Form

Newrequest.png

If the value not exist in the Name & Contact Dropdown, user need to tap + button (No.3) to add new value thorugh the pop-up form below:

popup.png

 

User filling up the pop-up form, and what I what to do is, after user tap the Submit button (No.3) the new value created by user wil auto selected on the main form (first image). Any clue how to do this?



Thanks

Categories:
I have the same question (0)
  • v-xida-msft Profile Picture
    on at

    Hi @daroot,

    Could you please share a bit more about your scenario?

    Which data type of the Name and Contact column within your SP list data source? Is it a Choice type column or Person type column?

    For your first question, you could consider take a try to store your Main Form data (the values you have typed before) as a global variable when clicking the + button (No.3), then use the values stored within the global variable as a default value for each field/Data card within your Main Form.

    Please check and see if the following thread would help in your scenario:

    https://powerusers.microsoft.com/t5/General-Discussion/New-form-without-resetting-the-fields/m-p/146589

    On your side, you should take a try with the following workaround:

    Add the following formula within the OnSelect property of the + Button (No.3):

    Set(MainFormRecord,MainForm.Updates)

    I assume that you want to set a default value for the Group Data card, please take a try to set the DefaultSelectedItems property of the Combo box control within the Group Data card to following:

    If(
     EditForm1.Mode=FormMode.New,
     {
     '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     Value: MainFormRecord.GroupColumn
     },
     Parent.Default
    )

    Note: The GroupColumn represents the column within your SP list the GROUP Data card relaetd to. I assume that the GroupColumn is a Choice type column within your SP list.

     

    For your second question, how to do you submit Pop-up form data (new value) on your side? Using SubmitForm function?

    I assume that you use SubmitForm function to submit your Pop-up form data, if you want the new value created by user to be auto selected on the main form, please take a try with the following workaround:

    Add the following formula within the OnSelect property of Submit button (No.3):

    Set(NewCreatedValue,PopUpForm.LastSubmit);
    Set(IsNewCreated,true)

    Set the DefaultSelectedItems property of the Combo box control within the Name Data card (within your MainForm) to following:

    If(
     EditForm1.Mode=FormMode.New,
     If(
     IsNewCreated=true,
     {
     '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     Value: NewCreatedValue.NameColumn
     },
     {
     '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     Value: MainFormRecord.NameColumn
     }
     ),
     Parent.Default
    )

    Note: The NameColumn represents the column within your SP list, which related to the Name Data card within your Main Form or Pop-up Form.

    In addition, when you navigate from other screen to the Main Form screen to create a new record, please reset the IsNewCreated variable to false using following formula:

    Set(IsNewCreated,false)

    Also please add above formula within the OnSelect property of the + Button (No.3) within your Main Form

     

    Best regards,

    Kris

  • daroot Profile Picture
    116 on at

    Sorry double post 😞

  • Verified answer
    daroot Profile Picture
    116 on at

    I tried the following, but seem not working, can't find the DefaultSelectedItems since I am using the dropdown within the following setup:

     

    Group Dropdown:

    Items: Table({Level:"Please Select"},{Level:"Marketing"},{Level:"HR"},{Level:"Logistic"},{Level:"Finance"},{Level:"IT"})

    Name Dropdown:

    Items: Filter(AccountTbl, Group= ddGroup.Selected.Value).AccountName

    Contact Dropdown (person/group type):

    Items: Filter(AccountTbl, AccountName= ddName.Selected.Value).AccountContact

    + button will navigate to another screen for insert new data if not available in the list. This Pop-up form used another SPList called AccountTbl.

     

    Group Dropdown (auto set value depend on selected value on Main Form) not editable:

    Default: ddGroup.Selected.Value

    Name Dropdown (Text input model) and Contact value (Person/Group data type) with 

    Items: Choices(AccountTbl.AccountMail)

    I am afraid this form not properly setup cause using the dropdown instead a combobox. And in the submit button I am using the Patch function as follows: 

    OnSelect: Patch(AccountTbl, {Group:CardValue29.Text, AccountName:CardValue36.Text, AccountMail:CardValue37.Selected});Back()

    So, when user tap a submit button newly created items will auto selected on as the MainForm. 

     

    The users no need to go to Pop-up form if the list available in the MainForm (previously added or already added by another users).

     

    Thanks,

  • daroot Profile Picture
    116 on at

    Hi @v-xida-msft,

     

    I tried to implement this but it said If value statements invalid. FYI: The Main Form and the Pop-up form used the different table. 

     

     

  • v-xida-msft Profile Picture
    on at

    Hi @daroot,

    Could you please share a bit more about the error message with the formula within your app?

     

    Best regards,

    Kris

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard