Hello,
I've got this form and I would like that the dockcheck icon turn green when the form is 100% filled, orange when it's filled at 50% and red when it's unfilled.
I tried to use this formula but something's wrong.
Can you help me ?
Thank you
Solved! Go to Solution.
Hi @nliu
You can use variables.
Set the OnChange properties of your controls to:
Set(varColor, 1)
and add to the submit form button:
Set(varColor, 2)
And set the color property of your icon to:
If(varColor = 1, Orange, varColor = 2, Green, Red)
---
Please hit the "Accept as Solution" button if my post answered your question! If my post was helpful please consider giving it a "Thumbs Up."
Hi @nliu
You can use variables.
Set the OnChange properties of your controls to:
Set(varColor, 1)
and add to the submit form button:
Set(varColor, 2)
And set the color property of your icon to:
If(varColor = 1, Orange, varColor = 2, Green, Red)
---
Please hit the "Accept as Solution" button if my post answered your question! If my post was helpful please consider giving it a "Thumbs Up."
Thank you ! 🙂
Hi @nliu ,
How to define the 50% complete of form? I assume the 50% means half of controls are filled.
We can use Isblank and IsEmpty function to check if the field is filled. Please check my test.
My Form contains four data cards, three text input boxes and one combo box.
1. create a collection, its number of items is based on the number of data card. there are four cards, so the collection has four items with Id column and value column, Id column is for the index corresponding to field respectively, and the value column is for storing fill status. Set the following codes to OnStart property of App.
ClearCollect(Collection1,{id:1,value:0},{id:2,value:0},{id:3,value:0},{id:4,value:0})
2. once the field is changed, check if the field is empty, if empty, patch 0 the value column of the corresponding row, if filled, patch 1.
so the first data card field fill status will only be stored to the first record of collection.
set the following codes to OnChange of Textinput or combo box, use Isblank function to check text box, and use IsEmpty function to check combo box.
If(IsBlank(DataCardValue43.Text),Patch(Collection1,LookUp(Collection1,no=1),{value:0}),Patch(Collection1,LookUp(Collection1,no=1),{value:1}))
or
If(IsEmpty(DataCardValue44.SelectedItems),Patch(Collection1,LookUp(Collection1,no=2),{value:0}),Patch(Collection1,LookUp(Collection1,no=2),{value:1}))
3. after all field OnChange property has been set, put the following codes to Color property of icon. Judge the table completion progress based on the sum of column 'value'.
If(Sum(Collection1,value)=4,Green,Sum(Collection1,value)>=2&&Sum(Collection1,value)<4,Orange,Sum(Collection1,value)>=0 && Sum(Collection1,value)<2,Red)
Sik
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
23 | |
5 | |
4 | |
4 | |
3 |
User | Count |
---|---|
25 | |
11 | |
10 | |
8 | |
8 |