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

Display.Mode

(0) ShareShare
ReportReport
Posted on by 438

For example, when the status is displayed as 'submitted,' the button will be disabled, preventing further submission because it has already been submitted to the SP list. When the status is displayed as 'not submitted,' the button will be enabled, allowing the user to submit the form.

 

Screenshot 2023-11-04 033449.png

 

@ANB 

Categories:
I have the same question (0)
  • ANB Profile Picture
    7,250 Super User 2025 Season 2 on at

    Hi @dylandavis09 , This is code that you need to have:

    If(And(CountRows(colRegistrationClasses) = 5,Label1_100.Text ="NOT SUBMIITED"), DisplayMode.Edit, DisplayMode.Disabled);

    -----------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    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.👍

    Thanks,
    ANB


  • dylandavis09 Profile Picture
    438 on at

    The student has already selected the five courses. Now, they can click the 'Allow Students' button. (Not worked, cause the button is still disabled) How it's come to fix this?

    Screenshot 2023-11-04 035223.png

     

    Then, once the student submits, the button will become disabled, and it will display 'Submitted.' Additionally, the '-' in the gallery will also be disabled. (It's worked)

    Screenshot 2023-11-04 034509.png

     

    Also, when a student selects the fourth course, the button should remain disabled. It should only become enabled after selecting five courses.

    Screenshot 2023-11-04 035530.png

  • ANB Profile Picture
    7,250 Super User 2025 Season 2 on at

    Hi @dylandavis09 , Sorry but you need to give me complete background of your requirements. When you say  'Allow Students' button where is that button? I cannot see that button on above screenshot.

     

    Also what is  '-' ? What are you looking actually. Please elaborate the requirement.

     

    If(And(CountRows(colRegistrationClasses) = 5,Label1_100.Text ="NOT SUBMIITED"), DisplayMode.Edit, DisplayMode.Disabled);

    This above code is for the DisplayMode of your Submit button.

     

    Thanks,

    ANB

  • dylandavis09 Profile Picture
    438 on at

    @ANB, let me show you the screen recording: https://drive.google.com/file/d/1yHSbV7f0PPycVO3c_Nb26zAkvMBmsNDT/view?usp=sharing

     

    After that, you will see what I need. 🙂

     

  • ANB Profile Picture
    7,250 Super User 2025 Season 2 on at

    Hi @dylandavis09 , Apologies, I Saw the recording but again that doesnt give your requirement. I can see that you are adding the courses from first gallery and those selected courses are shown below in second gallery. But what is the requirement? Example: 

    User should allowed to selected only 5 courses and once 5 courses are selected, then you do not want to the user to select the 6th course? You also mentioned this statement in previous response that "when a student selects the fourth course, the button should remain disabled. It should only become enabled after selecting five courses." So, in this which button you are talking?

     

    Please elaborate your requirement in words with proper screenshot and the background. It is very difficult for forum member to understand the requirement because we cannot see your screen and also we cannot read your mind to understand the requirement.

     

    Thanks,

    ANB

  • dylandavis09 Profile Picture
    438 on at

    Hey @ANB, once again, I apologize for any confusion. The correct procedure allows users to select a maximum of 5 courses. We do not want users to select more than 5 courses or least will disabled, and users must select exactly 5 courses for the button to become enabled. Once students submit the form, the button will become disabled after submission, matching the text label "SUBMITTED". If "NOT SUBMITTED" text label is enabled to button until they are selected to get five courses, then submission. Make sense?

     

    Screenshot 2023-11-04 043054.png

    Screenshot 2023-11-04 043054.png
  • Verified answer
    ANB Profile Picture
    7,250 Super User 2025 Season 2 on at

    Hi @dylandavis09 , I will try to give you simple logic which can serve the purpose. This code you need to have on submit button:

     

    If(Or(CountRows(colRegistrationClasses) > 5, CountRows(colRegistrationClasses) < 5),
     Notify("Make sure to select 5 course only!", NotificationType.Warning), 
     And(CountRows(colRegistrationClasses) = 5,Label1_100.Text ="NOT SUBMIITED"), 
     ----Patch Code----
    )

     

    With this you do not require any code on display mode of any button. Buttons display mode will always be edit.

    If user has selected more then 5 courses or less then 5 courses, then there will be warning message shown to user and if they have selected 5 courses and label is NOT SUBMITTED, then code will patch details to SP list.

     

    -----------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    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.👍

    Thanks,
    ANB


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

#2
Kalathiya Profile Picture

Kalathiya 321

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 311 Super User 2025 Season 2

Last 30 days Overall leaderboard