cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rockhoundXX
Helper I
Helper I

Sum of DataCardValues from form for Number or text fields not working

HI, 

 

I am fairly new to PowerApps and think it is very nice for quickly creating apps but I am struggling with formulas here. 

I have already created dropdowns with values to choose from and Sum those up which works fine. 

 

But when I want to Sum DataCardValues in a Form in order to later push the result with all user input to SP list, the formula keeps getting errors which I dont understand. No matter if the DataCardValue from SP list is a Number field or a text field, the formula for sum does not work with this error: 

 

rockhoundXX_0-1619948598538.pngrockhoundXX_1-1619948629326.pngrockhoundXX_2-1619948653269.png

 

Any help is really appreciated 🙂 What is best for calculation? I would guess all DataCardValues should be number fields then?

1 ACCEPTED SOLUTION

Accepted Solutions
eka24
Super User III
Super User III

What is the Datatype in SharePoint list. Also have you renamed those columns?

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

9 REPLIES 9
eka24
Super User III
Super User III

Use this structure:

Value(DataCardValue1.Text) + Value(DataCardValue2.Text)

 

Or

DataCardValue1.Text + DataCardValue2.Text

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

rockhoundXX
Helper I
Helper I

I have tried that also before and the formula keeps throwing an error, I just dont understand why: 

 

rockhoundXX_0-1619955352025.png

 

Both DataCardValue field are formatted as text 

 

rockhoundXX_1-1619955376975.pngrockhoundXX_2-1619955387258.png

Any ideas? Why is the + a problem in the formula here??

eka24
Super User III
Super User III

What is the Datatype in SharePoint list. Also have you renamed those columns?

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

eka24
Super User III
Super User III

What is in the Default of the 2 DataCardValues being added? 

Insert 2 separate Textboxes and try same formula.

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

rockhoundXX_0-1619956865609.png

same behavour 

Also there were Parent.Default as Defaults in the field that need to be sumed from. 

I changed it to 0 to check any difference but same behaviour

Datatype in SP list for the entry fields is Number as well as for the sum field, all are Number

rockhoundXX_1-1619957050843.png

 

 

 

I can't see the image clearly but did you place the formula in the DataCard or DataCardValues? I hope it is in the DataCardValues not Datacard on the Form

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

So finally I solved by delete the orignal field from the form and adding it again. 

Still confused why the formula did not work but a refresh either of the datafields or sources seems to have solved it. 

 

Thanks again for your help!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (64,779)