I have tried the solution as you showed in this link posted below
and I got the following error
Thanks for your help so far, but I had some issue, and what I wanted, is giving me a problem in my collection, such that when I add the total to collection it is not showing me the Sum(addition) can you please let me know why Sir?
Please have a look at my output as you said and showed its working fine, but my collection is not working now, week total shows the sum records of all the total is added
e.g : total = 10, 10 10,
weektotal should be : 30
Please see that on default of my weektotal:
"€" & Sum(Recordss, TotalItems)
and On addbutton the collection is:
Collect(Recordss,
{
GItems: Text(Dropdown1.Selected.Value),
TotalItems:DataCardValue43.Text,
RDate: DataCardValue2.SelectedDate,
Description: DataCardValue1.Text
});
Please note that in above formula
GItems is weektotal card
and
totalItems is Total Card as shown in below screenshot.
Thanks a lot for your help so far sir @v-qiaqi-msft if you can help me with this error would be glad sir.
Thank you.
Solved! Go to Solution.
Hi @Tapesh ,
The reason why you still have problem is that you add "€" in DataCardValue43. So please do not directly use Value() function to transfer DataCardValue43.Text. To use Value() function to transfer text to number, you need to make sure the text data only includes number.
Try to set like this:
On DataCard PerDaytotal
Default of Per day Total, Textinput:
If(!IsBlank(var3),var3,"") // In case, please indentify the if the var3 is blank
On change of Textinput:
Set(
var3,
Text(
Value(
DataCardValue43.Text,
"en-US"
),
"[$-en-US]##.00"
) & " € "
)
On Format Of textInput:
TextFormat.Text
On DataCard Weeklytotal
ON Default Textinput:
Sum(Recordss, TotalItems)
//TotalItems is number data type, you do not need to use Value() function any more.
On change: False
Format :
TextFormat.Text
Collection Items
On Select of a button :
Collect(Recordss,
{
GItems: Text(GLCodesDrpdwn.Selected.Value),
TotalItems:Value(Match(DataCardValue43.Text,"[0-9]+").FullMatch),
RDate: DataCardValue2.SelectedDate,
Description: DataCardValue1.Text
});
//Value(Match(DataCardValue43.Text,"[0-9]+").FullMatch) only represent the number value in datacard43 and have been transferred to number type. So TotalItems is number data type.
Best regards,
Hi @Tapesh ,
Is this your problem: weektotal display blank by default by using this formula?
"€" & Sum(Recordss, TotalItems)
I 've notice that you use this to patch TotalItems field.
DataCardValue43.Text
If so, the problem is that:
1)TotalItems field is text type
2)Sum() function is used to calculate number field.
So to display the right weektotal, you should use Value() function to transfer text to number.
Try to set weektotal's Default like this:
"€" & Sum(Recordss, Value(TotalItems))
Best regards,
Thank you so much for your reply i tried the way you have provided me the solution, however this still does not work me.
Please see the current code's on
On DataCard PerDaytotal
Default of Per day Total, Textinput:
If(!IsBlank(var3),var3,"") // In case, please indentify the if the var3 is blank
On change of Textinput:
Set(
var3,
Text(
Value(
DataCardValue43.Text,
"en-US"
),
"[$-en-US]##.00"
) & " € "
)
On Format Of textInput:
TextFormat.Text
On DataCard Weeklytotal
ON Default Textinput:
Sum(Recordss, Value(TotalItems))
On change: False
Format :
TextFormat.Text
Collection Items
On Select of a button :
Collect(Recordss,
{
GItems: Text(GLCodesDrpdwn.Selected.Value),
TotalItems:Value(Text(DataCardValue43.Text)),
RDate: DataCardValue2.SelectedDate,
Description: DataCardValue1.Text
});
I also tried this on Select of button
Collect(Recordss,
{
GItems: Text(GLCodesDrpdwn.Selected.Value),
TotalItems:(Text(DataCardValue43.Text)),
RDate: DataCardValue2.SelectedDate,
Description: DataCardValue1.Text
});
ON Gallery Which shows the collection of Day total
Lable Text:
Value(ThisItem.TotalItems)
Any luck on this sir.
Thanks in advance.
Hi @Tapesh ,
The reason why you still have problem is that you add "€" in DataCardValue43. So please do not directly use Value() function to transfer DataCardValue43.Text. To use Value() function to transfer text to number, you need to make sure the text data only includes number.
Try to set like this:
On DataCard PerDaytotal
Default of Per day Total, Textinput:
If(!IsBlank(var3),var3,"") // In case, please indentify the if the var3 is blank
On change of Textinput:
Set(
var3,
Text(
Value(
DataCardValue43.Text,
"en-US"
),
"[$-en-US]##.00"
) & " € "
)
On Format Of textInput:
TextFormat.Text
On DataCard Weeklytotal
ON Default Textinput:
Sum(Recordss, TotalItems)
//TotalItems is number data type, you do not need to use Value() function any more.
On change: False
Format :
TextFormat.Text
Collection Items
On Select of a button :
Collect(Recordss,
{
GItems: Text(GLCodesDrpdwn.Selected.Value),
TotalItems:Value(Match(DataCardValue43.Text,"[0-9]+").FullMatch),
RDate: DataCardValue2.SelectedDate,
Description: DataCardValue1.Text
});
//Value(Match(DataCardValue43.Text,"[0-9]+").FullMatch) only represent the number value in datacard43 and have been transferred to number type. So TotalItems is number data type.
Best regards,
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
219 | |
209 | |
84 | |
57 | |
36 |