cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
stumac_31 Helper III
Helper III

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 Community Champion
Community Champion

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 🙂

 

Let me know if that helps.

 

Mr. Dang

 

____________

 

Microsoft Employee
@8bitclassroom

View solution in original post

1 REPLY 1
mr-dang Community Champion
Community Champion

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 🙂

 

Let me know if that helps.

 

Mr. Dang

 

____________

 

Microsoft Employee
@8bitclassroom

View solution in original post

Helpful resources

Announcements
secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (6,309)