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 🙂

 

Let me know if that helps.

 

Mr. Dang

 

____________

 

Microsoft Employee
@8bitclassroom

View solution in original post

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 🙂

 

Let me know if that helps.

 

Mr. Dang

 

____________

 

Microsoft Employee
@8bitclassroom

View solution in original post

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,467)