Hello @ eka24 @v-yutliu-msft
I followed your instructions to set a global variable on a calculated field:
Set(MyCalFigure,1Sum(GalleryHours.AllItems, HOURS)) in a button on screen 1
l added a label and put the Variable on the Text property: MyCalFigure1.
I did the same for 2 other screens which are records from the Main gallery MyCalFigure2 and MyCalFigure3 but nothing is showing in the global variables collection. Each variable shows "No Value" in the variables collection info.
I would like to add the total of these 3 variables together on the main gallery screen MyCalFigure1+MyCalFigure2+MyCalFigure3 but this doesn't work.
It may be worth noting that the Hours used in the calculation are in 'GalleryHours' not the Main Gallery - does this matter?
What am I doing wrong???
Thanks in advance
Solved! Go to Solution.
"It may be worth noting that the Hours used in the calculation are in 'GalleryHours' not the Main Gallery - does this matter?"
This will not work. Kindly show the items for the two other galleries. That is do separate variables for each then you can sum.
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution
"It may be worth noting that the Hours used in the calculation are in 'GalleryHours' not the Main Gallery - does this matter?"
This will not work. Kindly show the items for the two other galleries. That is do separate variables for each then you can sum.
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution
Hello @eka24
The main gallery item is:
SortByColumns(Search([@SUMMARYDATATABLE];SearchBox.Text;"TutorSurname";"TutorFirstName";"Cohort";"MATHS";"SYSTEMES";"AERONAUTIQUE";"VEHICULES";"ANGLAIS";"SH";"Student1";"Student2";"Student3");"TutorSurname";If(SortDescending1; Descending; Ascending))
the other 3 galleries are records from the main gallery Item: ParentGallery.Selected
Here is the save details for each subgallery:
Button Onselect:
ClearCollect(CollectTutorInfoALLS1;{TutorSurname:LabelTutorName.Text;Student1:S1StudentNameConcat.Text;S1Cohort:S1CohortConcat.Text;S1SubjectDetail:S1detailsInput.Text;S1Hrs:S1HrsInput.Text;S1ProfContact:S1ProfContactDropdown.SelectedText.Value;S1Subject:S1SubjectList.SelectedText.Value;S1Start:DatePickerS1Start.SelectedDate;S1End:DatePickerS1End.SelectedDate;S1CohortInput:S1CohortConcat.Text;
S1Email:S1EmailConcat.Text;S1Progress:Status1.Text;TotalHrsPrev:TOTALHoursALL.Text});;ClearCollect(CollectComboS1;{NOM:S1ComboConcat.SelectedItems.NOM});;
Patch(StudentsList;Defaults(StudentsList);{Title:S1EmailConcat.Text;CurrentStudents:S1StudentNameConcat.Text});;
Patch(SUMMARYDATATABLE;ThisItem;{Student1:S1StudentNameConcat.Text;S1Cohort:S1CohortConcat.Text;S1SubjectDetail:S1detailsInput.Text;S1Hrs:S1HrsInput.Text;S1ProfContact:S1ProfContactDropdown.SelectedText.Value;S1Subject:S1SubjectList.SelectedText.Value;S1Start:DatePickerS1Start.SelectedDate;S1End:DatePickerS1End.SelectedDate;S1Email:S1EmailConcat.Text;S1Progress:Status1.Text;S1StartText:S1DateTextStart.Text;S1EndText:S1DateTextEnd.Text;TotalHrsPrev:TOTALHoursALL.Text});;
Set(MyCalFigure1;Sum(GalleryCurrentHrs1.AllItems; Hours));;
ClearCollect(MyCollHrsIn;{TutorSurname:LabelTutorName.Text;STUDENTS:S1StudentNameConcat.Text;HOURS:S1HrsInput.Text;PROF:S1ProfContactDropdown.SelectedText.Value;PROGRESS:Status1.Text;TotalHrsComp:LabelSumHrs1.Text});;
Collect(CURRENTHRS; MyCollHrsIn);;
Patch(SUMMARYDATATABLE;ThisItem;{TotalHrsComp:LabelSumHrs1.Text});;
UpdateContext({LetsEdit: false })
;;Set(ShowSavedValue; true)
Hope this helps!
Hi @Englishweb ,
How did you define another two variables? Where do these variables display?
Could you please share more details on what do you want to achieve? We need more information so that we can provide further assistance.
Sik
Hello @v-siky-msft
Thanks for replying.
I have a main browser gallery and 3 screens 1 for each student . (ParentGallery.Selected)
I added a hidden GalleryCurrentHrs1 to the page (the hours table) and I have a variable for each instance of the gallery (one for each screen) Set(MyCalFigure1;Sum(GalleryCurrentHrs1.AllItems; Hours));; in the save button and the variable in a label :MyCalFigure1
The white box is the total hours: Sum(GalleryCurrentHrs1.AllItems; HOURS) The same total is also patched to the summary table:
In each screen there is a box for the number of hours in progress (green) ThisItem.S1Hrs
When I clear the green boxes I want to maintain a running total of hours for each record in the main browser gallery
Please forgive me if it is easy, but I can't get it to work!
Thanks in advance
Hi @Englishweb ,
Sorry, I'm still confused. I cannot understand your case.
Hope you can describe more clearly.
Sik
Hello @v-siky-msft
Yes of course, please forgive the lack of clarity.
So,
I hope this is clearer!
Thanks again for your patience and help
Hello @WarrenBelz
I'm hoping you can help me, as you are the top Kudo'ed PowerApper!
I would then like to patch the result of that calculation field to Table 1 and display that calculation in Gallery 1.
Is this possible?
Thanks in advance for your help!
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
200 | |
178 | |
66 | |
36 | |
33 |
User | Count |
---|---|
339 | |
272 | |
115 | |
73 | |
58 |