Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Submit multiple forms

(0) ShareShare
ReportReport
Posted on by 390

Good evening,

I have 7 Edit Forms and I want to submit all changes but it doesn't work

7 Edit Forms.jfif

Task List.jfif

Categories:
  • JoseC12 Profile Picture
    390 on at
    Re: Submit multiple forms

    Good afternoon @v-siky-msft, I'm trying what you said but apart from filter I want to sort by 'Fecha'. Can you help me?

    Error.PNG

  • JoseC12 Profile Picture
    390 on at
    Re: Submit multiple forms

    Update.PNG

    @v-siky-msft 

  • JoseC12 Profile Picture
    390 on at
    Re: Submit multiple forms

    I think I cannot make a gallery because each edit has a different value from filter, for example the first edit form Item property: 

    "LookUp(TAREA; SEMANA = Lista_semanas.Selected.NOMBRE && SERVICIO = Gallery_Servicios.Selected.Name && FECHA = Lista_semanas.Selected.LUNES && 'TEAM MEMBER' = Lista_teamMembers.Selected.'APELLIDO PATERNO')"

    The second edit form: LookUp(TAREA; SEMANA = Lista_semanas.Selected.NOMBRE && SERVICIO = Gallery_Servicios.Selected.Name && FECHA = Lista_semanas.Selected.MARTES && 'TEAM MEMBER' = Lista_teamMembers.Selected.'APELLIDO PATERNO')

    and so on.

    I created a Week List wich has Columns named with the names of the days and their value:

    Week List.PNG

    Then I created Date List, where every of them has a week assigned:

    Date List.PNG

    In that case I can create a planned task selecting the month, week and date. Each 'week' and 'date' has a filter because it allows me not to select another day of a month selected, for example:

    Demo Create Task filters.gifSo then, I want to show 7 edit forms to specifically show what task is created on Monday, Tuesday, etc... and to quickly edit the planned hours:

    Edit Forms.gif

     

  • v-siky-msft Profile Picture
    on at
    Re: Submit multiple forms

    @JoseC12 

     

    Select the data card in the form, choose the property to Update to find the code.

    Snipaste_2020-02-15_00-30-42.png

    Sik

     

  • JoseC12 Profile Picture
    390 on at
    Re: Submit multiple forms

    Hi, I see it works with you. Where can I find the Update property?

  • Verified answer
    v-siky-msft Profile Picture
    on at
    Re: Submit multiple forms

    @JoseC12 

    I have made a test based on your codes, and it can work properly.

    Could you please check if the Update property is correct? could you share it?

     

    As an alternative workaround, I suggest you create a gallery to view and edit the 7 values, instead of 7 editform

    1. create a horizontal gallery, add a Textinput inside the gallery

    2. set Gallery Item property: 

     

    Filter(TAREA; SEMANA = Lista_semanas.Selected.NOMBRE && SERVICIO = Gallery_Servicios.Selected.Name)

     

    3. set Textinput Default property: ThisItem.'HORAS PLANEADAS' , set DisplayMode property: VarMode

    4. add a Edit button, set OnSelect: Set(VarMode,DisplayMode.Edit)

    5. add a save button, set OnSelect: 

     

    ForAll(RenameColumns(Gallery1.AllItems,"ID","CID"),Patch(TAREA,LookUp(TAREA,ID=CID),{'HORAS PLANEADAS':Value(TextInput1.Text)}));Set(VarMode,DisplayMode.View)

     

    StoG_32.gif

    Sik

     

  • GarethPrisk Profile Picture
    2,826 on at
    Re: Submit multiple forms

    Regardless of the mechanics needed to refresh the data / what is shown on the forms, I recommend that you take advantage of both the Concurrent function, and the Unsaved property of the Forms. For example:

    // If needed, to maybe show a 'saving' prompt to allow the forms to submit asyncronously
    UpdateContext({locSaved: false});
    Concurrent(
     If(
     frmFirst.Unsaved,
     SubmitForm(frmFirst)
     ),
     If(
     frmSecond.Unsaved,
     SubmitForm(frmSecond)
     ),
     If(
     frmThird.Unsaved,
     SubmitForm(frmThird)
     )
    );
    // Add your logic for refreshing, needed
    Refresh(Contacts);
    // If needed, to hide a 'saving' prompt
    UpdateContext({locSaved: true});

     

    This will allow you to only submit changes, instead of submitting all Forms every time. The local variable is optional, to maybe show/hide a saving prompt or to show/hide controls while things process.

  • JoseC12 Profile Picture
    390 on at
    Re: Submit multiple forms

    In those spaces I only want to edit one column of one record. So I have 7 there because I want to edit per week.

  • WarrenBelz Profile Picture
    146,645 Most Valuable Professional on at
    Re: Submit multiple forms

    Hi @JoseC12 ,

    So all of the forms are on the one data source - I was assuming they were on different ones. Firstly, if you refresh between each submit form, it may do the job - if are you trying to write new records on each one, why not simply submit after each one is filled out?

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • JoseC12 Profile Picture
    390 on at
    Re: Submit multiple forms

    I put 'Refresh(TAREA)' between all the 'SubmitForms' and 'ViewForm' but nothing happens:

    SubmitForm(Form_HorasLunes);;SubmitForm(Form_HorasMartes);;SubmitForm(Form_HorasMiercoles);;SubmitForm(Form_HorasJueves);;SubmitForm(Form_HorasViernes);;SubmitForm(Form_HorasSabado);;SubmitForm(Form_HorasDomingo);;Refresh(TAREA);;ViewForm(Form_HorasLunes);;ViewForm(Form_HorasMartes);;ViewForm(Form_HorasMiercoles);;ViewForm(Form_HorasJueves);;ViewForm(Form_HorasViernes);;ViewForm(Form_HorasSabado);;ViewForm(Form_HorasDomingo)

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard