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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Resetting all forms an...
Power Apps
Unanswered

Resetting all forms and button in gallery when next item is selected

(0) ShareShare
ReportReport
Posted on by 24

I have a gallery and several forms to be updated when the gallery item is selected. I have set the displaymodes on forms and buttons to disabled once the entries have been submitted.

 

The issue is that when I go to select the next item in the gallery, all forms and buttons are disabled. I have set a global variable on item to recognise the ID of the selected item and also added updatecontext and reset on form inputs but it is not working.

 

How can I tell powerapps to enable all inputs when the next item in the gallery is selected?

 

Thanks

Categories:
I have the same question (0)
  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    What is your displaymode formula?

  • asdaf Profile Picture
    24 on at

    if(!isblank(form1),displaymode.disabled,displaymode.edit)

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    If this formula in the DisplayMode Property of the Form?   And I hope you don't mind me asking, why do you want to have all the forms disabled? 

  • asdaf Profile Picture
    24 on at

    Yes on DisplayMode. I want to have them disabled on Submit as it is linked to a SP list and there will be two users who are able to access and update the forms. I have put them on disabled to show that an entry has already been made for the form. 

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    Consider this.

     

    In your gallery, set the OnSelect to launch the forms in EditMode or ViewMode based on one of the fields.  If you have a field that is going to be blank before being updated that would be the ideal one to use.

     

    So your select formula would look something like this:   

     

    If(
       IsBlank(ThisItem.Control),

          Select(Parent);

            EditForm(Form1),

               ViewForm(Form1)

     

    )

     

    This way it evaluates based on the data in the selected item.   This is going to be a better solution since you have to work with the 'ThisItem' property to evaluate individual items in your gallery.

  • asdaf Profile Picture
    24 on at

    Thanks - but that means I have to do that for every single field that needs updating?

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    You can use any field for comparison.   If you have a field that is required and will always be updated, then you can use that field.

     

    This formula looks at the referenced field and if it's blank loads the edit form and if it's not blank loads the view form.

     

    This way you only need one formula in a single place to accomplish what you are trying to accomplish.

  • asdaf Profile Picture
    24 on at

    So in that case, it would be the Employee ID.  However I do still need to specify all the forms individually.

     

    Forgive me, I have only been using PowerApps one month so still learning.

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    No worries at all.   Asking questions and trying different things is the best way to learn.   I have been using it for a little over a year and a half.

     

    Yes, you would need to specify each form individually.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard