问题描述
以下是我在此切换条件下的逻辑,我试图实现以下逻辑,但每次只返回不同数组的最高索引值。
Array used for below 1 point = []
Array used for below 2 point = ["1st value"]
Array used for below 3 point = ["1st value","2nd value"]
Array used for below 4 point = ["1st value","2nd value","3rd value"]
1. If some value is not found in array then array index of is returning -1 and it should print NA as per logic in switch.
2. If some value is found on array index 0 then array index of is returning 0 and it should fetch created date of index 0 (1st value)
3. If some value is found on array index 1 then array index of is returning 1 and it should fetch created date on index 1 (2nd value)
4.If some value is found on array index 1 then array index of is returning 2 and it should fetch created date on index 2 (3rd value)
But currently it is returning 3rd value only for point 4 where array length is 3 but for others it is returning error where array length is 2,1 or 0 because it is checking length 3 there as well don't kNow why Ideally it should work based on array index condition.
`=SWITCH(
Array.IndexOf(Split(Join(LookupSet(Fields!ID.Value,Fields!ID.Value,Fields!Team.Value,"Dataset1"),","),"Some xyz Value") = -1,"NA",Array.IndexOf(Split(Join(LookupSet(Fields!ID.Value,"Some xyz Value") = 0,Split(Join(LookupSet(Fields!ID.Value,Fields!Created.Value,").GetValue(0)),"Some xyz Value") = 1,").GetValue(1),"Some xyz Value") = 2,").GetValue(2)
)`
Does anyone is having a solution or fix for this . Thanks in advance
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)