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! Go to 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",
"")
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.
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! ๐๐
User | Count |
---|---|
32 | |
11 | |
3 | |
3 | |
2 |