The expression is valid but its result type 'Yes/No' is not one of the expected types: Ref

Employee Name Column is Ref.

Report To Column is Ref.

What I am trying is If the Employee ID is abc then the Report To should be xyz and if Employee ID is pqr the Report To should be lmn. 

So I wrote the following formula in Report To:

OR (

IFS ( [EmpName].[EmpID] = "084F5B30-43B6-4A8B-A450-3400F3F19DDF", [ReportTo] = "75121883-23C3-357E-6215-AF249189A3A1โ€ ),

IFS ( [EmpName].[EmpID] = "6529E7AB-2961-4441-8076-05D4FD17B6BB", [ReportTo] = "408EAD0A-0B05-1FA7-601A-DD478184F7B1" )

)

Error Message is as folows:

The expression is valid but its result type 'Yes/No' is not one of the expected types: Ref

Please guide. Thank You ๐Ÿ™๐Ÿ˜Š

 

Solved Solved
0 7 380
1 ACCEPTED SOLUTION

You could also replace your IFS with a SWITCH?  So...
SWITCH([EmpName].[EmpID],
"084F5B30-43B6-4A8B-A450-3400F3F19DDF","75121883-23C3-357E-6215-AF249189A3A1โ€,
 "6529E7AB-2961-4441-8076-05D4FD17B6BB", "408EAD0A-0B05-1FA7-601A-DD478184F7B1",
"")

View solution in original post

7 REPLIES 7

Please try 

 

IF ( [EmpName].[EmpID] = "084F5B30-43B6-4A8B-A450-3400F3F19DDF", "75121883-23C3-357E-6215-AF249189A3A1โ€ ,

      [EmpName].[EmpID] = "6529E7AB-2961-4441-8076-05D4FD17B6BB",  "408EAD0A-0B05-1FA7-601A-DD478184F7B1" 

   )

Thank you for the quick response!

IF ( [EmpName].[EmpID] = "084F5B30-43B6-4A8B-A450-3400F3F19DDF", "75121883-23C3-357E-6215-AF249189A3A1โ€, [EmpName].[EmpID] = "6529E7AB-2961-4441-8076-05D4FD17B6BB", "408EAD0A-0B05-1FA7-601A-DD478184F7B1" )

Its giving error: IF function is used incorrectly:three inputs should be provided --- (logical-expression, value-if-true, value-if-false).

Also there are many other Employees not just 2 but Report To Automatic Selection is to be done only when 2 of these employees are selected when others are selected we have to manually select. So I am putting this in Initial Value Formula. Is there any other was this can be done do let me know.

@Suvrutt_Gurjar is correct except he used IF instead of IFS...change it to IFS.
You do not specifiy a column name being equal to something when the formula is placed on that column itself.

scott192_0-1729600422912.png

 

You could also replace your IFS with a SWITCH?  So...
SWITCH([EmpName].[EmpID],
"084F5B30-43B6-4A8B-A450-3400F3F19DDF","75121883-23C3-357E-6215-AF249189A3A1โ€,
 "6529E7AB-2961-4441-8076-05D4FD17B6BB", "408EAD0A-0B05-1FA7-601A-DD478184F7B1",
"")

That was a perfect Master Stroke!! Thank you so much ๐Ÿ˜Š๐Ÿ™ God Bless ๐Ÿ™Œ


@scott192 wrote:

@Suvrutt_Gurjar is correct except he used IF instead of IFS...change it to IFS.
You do not specifiy a column name being equal to something when the formula is placed on that column itself.


Hey @scott192 ,

Thank you very much for the keen eye and catching up my typo. That one missing "s" renders the expression  useless. ๐Ÿ™‚

@TotalSolutions : Sorry , I had missed your second post. Please go ahead with corrections made by @scott192  and even with the SWITCH() version that is always compact than an IFS()

Thank You Sir! ๐Ÿ˜Š๐Ÿ™

Top Labels in this Space