I have a gallery which has data as follows
where ID , label, time are the label controls used to display the values
| ID | label | time |
| 1 | mon | 1 |
| 2 | tue | |
| 3 | wed | 4 |
I wanted to calculate sum of time column wise without modifying the UI ie Text Property of label in gallery blank to 0. I want to keep this view as it is
Sum(gal_WorkTime.AllItems.lbl_time , lbl_time.Text)
lbl_time is the control of time whoes text value I need to sum up for time. but Im getting errors as there are empty or Blank values I wanted to replace it as 0 before calculating sum. How to do that?
My formula
Clear(V1);
ForAll(
gal_WorkTime.AllItems,
If( IsBlank(lbl_time .Text),
Collect(V1,{Value:0}),
Collect(V1,{Value:Value(lbl_time .Text)})
)
)
Here I replace 0 in text in collection but How to show it in a label control without any user clicks on button to execute this command? Basically without user's click on any button I want to use this formula to show the sum in a label.