Hey All,
Here i am really stucked. Now my app is a data collection canvas app and some point my customer wants to see a result of calculation of 3 different properties. I will try to explain it;
in volumes screen there is a gallery called gallery8 which contains a label (takes the value from 2 datepickers and shows the difference between them in the format year. i used this code on the items property of the gallery8
With({nbrYears:Year(DatePickerenddate.SelectedDate)-Year(DatePickerstartdate.SelectedDate)},
Sequence(nbrYears+1,1,1))
and in the text property of the label controller in the gallery8 i used this;
Year(DatePickerstartdate.SelectedDate)-1+ThisItem.Value
if i choose the date as 01/01/2024 from the 1st datepicker and the from the second like 01/01/2030, this label will show in the gallery like 2024, 2025, 2026, 2027, 2028, 2029 and 2030 vertically. Beside this label there are 2 textinputs which is filled by the user. the textinput i am using in the calculation is called "QtyOfVehicule". In this screen there is another textinput outside the gallery8 which the user enters the percentage of the volume entered in the "QtyOfVehicule" textinput called AffectationCoefficient.
In the articles screen (second screen) there is another gallery which in the same manner shows the years. there is again a textinput outside the gallery named "QtyPerVehicule" where the user again enters a percentage of the volume to indicate how many there will be per vehicle for each QtyOfVehicule. I need to show the result of this calculation ; QtyOfVehicule * QtyPerVehicule * AffectationCoefficien.
For example for the QtyOfVehicule = 50000, AffectationCoefficient = 100% and QtyPerVehicule = 200%. my formula is this;
IfError(
With({
AffectationCoefficient:Value(affectationCoefficient.Text)
,QtyOfVehicule:ThisItem.Value
,QtyPerVehicule:Value(QtyPerVehicules.Text)
},
QtyOfVehicule*(AffectationCoefficient)*(QtyPerVehicule)
),
"")
it should give 100000 where i recieve 20000.
Do not know how to fix this. Does anyone?
Thanks in advance