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 / Disable field on start
Power Apps
Unanswered

Disable field on start

(0) ShareShare
ReportReport
Posted on by 519

I am not sure how to go about doing this.  There is a field on my form called "Is Submission an IIN" and this is a Yes/No field.  If users select No for this field the only thing they have to do next is submit the form.  I would like if a user selects No and submits the form, when they reopen the form both the Is Submission an IIN field and the submit button are disabled.  However, if an admin of the application opens the form, they should be able to edit those fields.

 

I have this formula on the DisplayMode for another field "Investigation Status" on the form which allows only admins to make a selection from the field but disables it for all other users.:  If(IsBlank(LookUp('IIN Admins', Admins.DisplayName = varUser.FullName, Admins.DisplayName)),DisplayMode.Disabled,DisplayMode.Edit)  - this formula works well but the scenario is slightly different.  In paragraph 1 above I would like a similar concept but only when the Is Submission an IIN field is set to No and submitted by the user, disable it and the submit button if they try to open the form again to make a change, but enable the field for the admins only.  Hope this is clear.  Thanks.

 

 

Categories:
I have the same question (0)
  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @joshieboy What's the list/table name where he field "Is Submission an IIN" is located? What is the Items property for u'r form?

  • joshieboy Profile Picture
    519 on at

    @CNT - the list name is Initial Incident Notification and the items property for the form is LookUp('Initial Incident Notification',ID=EditFormID)

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @ If you want to repeatedly check if the current user is an Admin, it is better to collect that information in the OnStart of the App,

    Set(gblAdmin, If(IsBlank(LookUp('IIN Admins', Admins.DisplayName = varUser.FullName, Admins.DisplayName)),false,true)

    For the DisplayMode for the Submit Button you can have,

     If('Initial Incident Notification'="No"
    	If(gblAdmin, DisplayMode.Edit,DisplayMode.Disabled
    	)
     )

    In the DisplayMode for the "Is Submission an IIN" Field,

    submitButton.DisplayMode

     

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard