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 / How to indicate that t...
Power Apps
Answered

How to indicate that the Form has been submitted?

(0) ShareShare
ReportReport
Posted on by 20

I have 2 forms in my PowerApps.

1. Main Form

2. Sub Form

 

The idea of the application is that the user would need to submit a Sub Form before submitting the Main Form. And when they submitted the Sub Form, it will navigate back to Main Form(On Sucess, navigate, I know) 

 

The catch is that, there will be a button or a box in Main Form that will indicate the user whether have they submit Sub Form or not.

Blue colour = Have not submit yet.

Green colour = submitted.

 

I tried putting 

Navigate(MainForm,Fade) && Button6.Fill =RGBA(99, 139, 44, 1)

or 

Navigate(MainForm,Fade); Button6.Fill =RGBA(99, 139, 44, 1)

 

both doesnt work. Any idea?

Categories:
I have the same question (0)
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Set a variable to true on the OnSuccess of the form: Set(varColor, true)

    Then set the Fill property of Button6 to:
    If(varColor, Green, Blue)

    Set thevaroabke to false on the OnVisible property of the screen where the sub form is.

    You cannot directly reference control properties to assign values to them. Instead, you can use variables.

    Let me know if this helps.

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

    Thanks!
    Hardit Bhatia
    The Power Addict
    https://thepoweraddict.com
  • 365CornerDawid Profile Picture
    377 on at

    @insights360 not 100% sure if understand your case but from below information I would suggest you could take one of two approaches OnSuccess:
    - use Set to create Global variable - that is recommended if you have more than one screen which is connect with fact that Sub Form was Submit (assume not in your case)

     

    For you would suggest simply:
    - OnSuccess of the SubForm apply:

    Navigate(Screen1,ScreenTransition.Fade,{varSubmit:true})

    - Then connect the button fill with the value of the varSubmit

     

    Hope it make sense if not feel free to ask extract questions. If I answered your question please mark it as solution.

  • insights360 Profile Picture
    20 on at

    The colour changes to green after i submitted the sub form, but if i have a new form in the main form (have yet to submit sub form), the button is still green.

     

    Ideally, I need it the indicator button (currently sit in MainForm) to reset it to blue whenever a user apply for a new formand only will change to green when a user submit a sub form.

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    The button that you use to set the Main form as a new form, set the variable to false.

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

    Thanks!
    Hardit Bhatia
    The Power Addict
    https://thepoweraddict.com
  • 365CornerDawid Profile Picture
    377 on at

    Ok, so we have the part when it change to green.

     

    How you are entering the Main New Form? If it is from additional screen / button you can use the same method only add the change to make the varSubmit false.

  • CathrineB Profile Picture
    39 on at

    Hi,

     

    I've done this by using the UpdateContext variable to set the color change of a button or icon. Combined with navigate, maybe you we achieve a satisfied result. 

     

    You can try to change color on the button/label by setting the OnSucess property of the submit sub form button to 

     

    Navigate(ExpenseHomeScreen,Fade, {Submitform:true})

     

     

    And then on the MainForm set the Color/Fill-property of the button/label/icon to

     

    If(Submitform,ColorValue("#04a9f4"),ColorValue("#f4d504")) 

     

    (Not the right color code for you).

    And then revert the Updated context variable if needed. 

     

    First screen:

    Merknad 2020-02-20 100246.png

     

    Screen navigated to, where the color of the icon is set to blue since til UpdateContext variable changed it. 

    Merknad 2020-02-20 100353.png

     

    Hope it can help you on your way.

     

    Best,

     

    Cathrine

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

    HI @insights360 ,

    Based on the formula that you mentioned, I think there is something wrong with it. Currently, within PowerApps app, we could not assign a value to a property of a control directly within another control.

     

    Based on the needs that you mentioned, I think a variable could achieve your needs. Set the OnSuccess property of the Sub Form to following:

    Navigate(MainForm,Fade, {SubFormRecord: SubForm.LastSubmit})
    

     

    Within your MainForm Screen, set the Fill property of the Button6 to following:

    If(
     !IsBlank(SubFormRecord),
     RGBA(99, 139, 44, 1),
     RGBA( 0, 0, 255, 1 )
    )

     

    In addition, you could also consider set up a global variable to store the submitted record from the Sub Form. Set the OnSuccess property of the Sub Form to following:

     

    Set(SubFormRecord, SubForm.LastSubmit);
    Navigate(MainForm,Fade)
    

     

    Set the OnVisible of the Sub Form screen to following:

    Set(SubFormRecord, Blank());

    Within your MainForm Screen, set the Fill property of the Button6 to following:

     

    If(
     !IsBlank(SubFormRecord),
     RGBA(99, 139, 44, 1),
     RGBA( 0, 0, 255, 1 )
    )

     

     

    Please take a try with above solution, check if the issue is solved.

     

    Best regards,

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard