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

Formula error 'Hours_8_Value.Text'

Dear all

 

I have developed a timesheet with 8 fields against which hours are logged. I have a sum on my EditScreen as follows:

 

Text(Value(Hours_1_Value.Text)+Value(Hours_2_value.Text)+Value(Hours_3_value.Text)+Value(Hours_4_value.Text)+Value(Hours_5_Value.Text)+Value(Hours_6_Value.Text)+Value(Hours_7_Value.Text)+Value(Hours_8_Value.Text))

 

However, it is coming up with an error 'The function 'Value' has some invalid arguments'

It seems to have a problem with Hours_8_Value.Text. See e.g.1 attachment.

I added this 8th field just recently and I must have missed something out. Can anyone suggest what it might be?

I can get it to work by just inserting 'Hours_8', but I'm not sure if this is going to cause problems later. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
mr-dang
Level 10

Re: Formula error 'Hours_8_Value.Text'

Hi @stumac_31,

It is likely that datacard 8 did not add the text input box for that card as Hours_8_Value.

This can result when you add and remove datacards elsewhere. 

 

You can find the actual name of its control by expanding the datacard in the lefthand panel.

 

Aside--the argument 'Hours' in Value(Hours) can be conflicting with Hours as in the global names: Hours, Minutes, Seconds.

 

As a best practice, I would like to recommend changing your formula like this:

Sum(Hours_1_Value.Text,
Hours_2_value.Text,
Hours_3_value.Text,
Hours_4_value.Text,
Hours_5_Value.Text,
Hours_6_Value.Text,
Hours_7_Value.Text,
Hours_8_Value.Text
)

When you use Sum(), it already expects values as arguments, so you will not need to convert the text to a value. The formula is a little more tiday Smiley Happy

 

Let me know if that helps.

 

Mr. Dang

 

____________

 

Microsoft Employee
@8bitclassroom
1 REPLY 1
mr-dang
Level 10

Re: Formula error 'Hours_8_Value.Text'

Hi @stumac_31,

It is likely that datacard 8 did not add the text input box for that card as Hours_8_Value.

This can result when you add and remove datacards elsewhere. 

 

You can find the actual name of its control by expanding the datacard in the lefthand panel.

 

Aside--the argument 'Hours' in Value(Hours) can be conflicting with Hours as in the global names: Hours, Minutes, Seconds.

 

As a best practice, I would like to recommend changing your formula like this:

Sum(Hours_1_Value.Text,
Hours_2_value.Text,
Hours_3_value.Text,
Hours_4_value.Text,
Hours_5_Value.Text,
Hours_6_Value.Text,
Hours_7_Value.Text,
Hours_8_Value.Text
)

When you use Sum(), it already expects values as arguments, so you will not need to convert the text to a value. The formula is a little more tiday Smiley Happy

 

Let me know if that helps.

 

Mr. Dang

 

____________

 

Microsoft Employee
@8bitclassroom

Helpful resources

Announcements
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

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 127 members 4,423 guests
Please welcome our newest community members: