cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Titiwai
Level: Powered On

Simple Addition for Datacard with formula-level error management

I need to do some simple addtion for datacardS.

ie. Datacard1+ Datacard2 + Datacard3 = Datarcard4

All four Datacard have Number as data type.

If first 2 datacard has value and Datacard3 is empty no result will be returned for Datacard4

IsNumeric(Value(DataCardValue1.Text))=true

IsNumeric(Value(DataCardValue2.Text))=true

IsNumeric(Value(DataCardValue3.Text))=false

Multiple versions of formulas have been tested:

Datacard1 + Datacard2 +Datacard3

Datacard1.Text + Datacard2.Text +Datacard3.Text

Value(Datacard1.Text) + Value(Datacard2.Text) +Value(Datacard3.Text)

I have formula-level error management turned on. If it is off the problem is gone but another problem comes (ie. to empty a datacard and submit form will not save the update).

Is there a solution to force update Datacard to 0 if there there is no value entered?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
panand99
Level 10

Re: Simple Addition for Datacard with formula-level error management

@Titiwai 

 

If you want to show the error when some conditions are not met then you can do it by another way.

The simple way is, create a seperate text field and on that field input a defualt formula.

On this formula, you can check it with your conditions, like :-

In the case you mentioned - 

if first 2 datacard has value and Datacard3 is empty no result will be returned for Datacard4

if( (IsNumeric(Value(DataCardValue1.Text))=true && IsNumeric(Value(DataCardValue2.Text))=true && IsNumeric(Value(DataCardValue3.Text))=false),"Error","OK")

 

If this above field has the value of "Error", then by using this field you can show the error screen or somethig you want to do.

 

 

1 REPLY 1
Highlighted
panand99
Level 10

Re: Simple Addition for Datacard with formula-level error management

@Titiwai 

 

If you want to show the error when some conditions are not met then you can do it by another way.

The simple way is, create a seperate text field and on that field input a defualt formula.

On this formula, you can check it with your conditions, like :-

In the case you mentioned - 

if first 2 datacard has value and Datacard3 is empty no result will be returned for Datacard4

if( (IsNumeric(Value(DataCardValue1.Text))=true && IsNumeric(Value(DataCardValue2.Text))=true && IsNumeric(Value(DataCardValue3.Text))=false),"Error","OK")

 

If this above field has the value of "Error", then by using this field you can show the error screen or somethig you want to do.

 

 

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Top Community Contributors for September  2019

Top Community Contributors for September 2019 🎉🎉

Let's thank our top community contributors

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 221 members 5,361 guests
Please welcome our newest community members: