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 Platform Community / Forums / Power Apps / Submit multiple forms
Power Apps
Answered

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:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at

    Hi @JoseC12 ,

    What is the code behind the OnSelect of the Edit and Save buttons?

  • JoseC12 Profile Picture
    390 on at

    Hi,

    EDIT: EditForm(Form_HorasLunes);;EditForm(Form_HorasMartes);;EditForm(Form_HorasMiercoles);;EditForm(Form_HorasJueves);;

    EditForm(Form_HorasViernes);;EditForm(Form_HorasSabado);;EditForm(Form_HorasDomingo)

     

    SAVE: SubmitForm(Form_HorasLunes);;SubmitForm(Form_HorasMartes);;SubmitForm(Form_HorasMiercoles);;SubmitForm(Form_HorasJueves);;SubmitForm(Form_HorasViernes);;SubmitForm(Form_HorasSabado);;SubmitForm(Form_HorasDomingo);;ViewForm(Form_HorasLunes);;ViewForm(Form_HorasMartes);;ViewForm(Form_HorasMiercoles);;ViewForm(Form_HorasJueves);;ViewForm(Form_HorasViernes);;ViewForm(Form_HorasSabado);;ViewForm(Form_HorasDomingo)

     

    When I push Edit button, I able those 7 edit forms to edit. Then when I push SAVE button and I want to submit my changes and then to put in view mode 

  • WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at

    Hi @JoseC12 ,

    The first thing you need to do between the SubmitForm and ViewForm is Refresh all your datasets, otherwise you will not see any changes.

    If you still have a problem after this, I am happy to work through it with you.

    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

    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)

  • WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at

    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

    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.

  • GarethPrisk Profile Picture
    2,828 on at

    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.

  • Verified answer
    v-siky-msft Profile Picture
    on at

    @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

     

  • JoseC12 Profile Picture
    390 on at

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

  • v-siky-msft Profile Picture
    on at

    @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

     

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard