cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Athirah
Helper I
Helper I

Button change to green colour when user complete the section survey form in powerapps

Hi,

 

I'm currently developing a survey form in PowerApps. All data will be recorded in SP list. Each section has its own SP list. Eg: Section 1 is Check In Counter. So the SP list called 'Check In Counter Checklist'.

 

My survey form have 7 sections where every sections has SUBMIT button.

SurveySection.PNG

 

I have this code for onSelect property on Submit button.

submitbuttoncode1.PNG

 

Submitbuttoncode2.PNG

 

Submitbuttoncode3.PNG

 

Any experts can help me to figure out how can i do when user completed/submit the section (Eg: Check In Counter), the button will turns to green color. And user are not allowed to submit Check In Counter section again. They have to proceed filling up the next section. The completed section will look like this.

 

completedsectionshows.PNG

 

Can someone provide me guidance/help on this? Please share screenshots as i'm a beginner on powerAutomate and powerApps.

 

Thank you.

3 REPLIES 3
baxschwepo
Helper I
Helper I

Hi  Athirah, 

 

I guess there are different users filling out this form? Patch the User_id into your sharepoint list (add a column [user_id]). 

 

On start event of the app make  a variable with the user_id: Set(varUserMail,user().Email)

 

Add to your patch statement: [user_id]:varUserMail' to fill the user to the sp List with the user_id.

 

Then in the properties of the each button  "colour" you can do a lookup field:

 

if(lookup(YourSP_List;[user_id]=varUserMail;user_id) > 0;green;blue)

 

Same code for the icon visibility, just with true and false.

 

Hope this helps.

 

SwiPowE

 

The Swiss Powerapps Enthusiast - SwiPowE 

Hi @baxschwepo ,

 

No. The form or every sections is not limited to different users. All users need to fill up all sections. Do you know how can i go about it? Do i still need user_id column if all users need to fill up the form on all sections?  

 

Appreciate your help. 

 

Thank you in advance,

Athirah

Hi Athirah

 

but each user has exactly one line in each of your sharepoint lists.

 

1 button -> 1 line in sharepoint list / per user  --> you can easily identify if the current user of the app has already answered the questions. Or do you have a different datamodel?

 

In this one line you must patch the user_id of the current app user who is filling the form using the steps I described in the previous answer.

 

OK?

 

SwiPowE

 

SwiPowE YouTube PowerApps Help

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Solution Authors
Top Kudoed Authors
Users online (3,633)