I'm automating something using an action and a bot. The action had a problem with:
[direct] = ANY(SELECT(timetables[direct], [something] = TRUE))
This gave me this error: The expression is valid but its result type 'Duration' is not one of the expected types: Enum.
[direct] is an Enum with basetype Duration so this doesn't make any sense.
I tried to use: [direct] = CONCATENATE(ANY(SELECT(timetable[direct], [something] = TRUE))) which somehow allows it, but the bot receives an error now:
Failed because Row having key '70cbc1a2b0ac3410586b1d79' in table 'data' containing value '00:00:45' in field 'direct' failed 'Valid_If' condition.
The valid if contains: SELECT(timetable[direct], IN([_THISROW].[type], [type])) which is the exact same duration type. [type] also has been selected, so this should not cause the problem.
I don't get it I tried simpeler stuff like [direct] = '000:00:45', but it doesn't want to contain a duration somehow. Also, '00:00:45' and '0:00:45' give the same valid_if error afterwards. The problem does not appear when selecting enum in the the data itself which is the exact same timetable dataset.
I've used this to find the differences between time and duration: https://www.googlecloudcommunity.com/gc/Tips-Tricks/The-notions-of-TIME-and-DURATION-and-how-to-use-...
I'm stuck and hope someone knows the answer.
Maybe you wish to try
[direct] = ANY(SELECT(timetables[direct], AND( IN([_THISROW].[type], [type]) , [something] = TRUE)))
@Suvrutt_Gurjar Thanks for your reply! That was also part of the conditions 🙂 This results in the error: The expression is valid but its result type 'Duration' is not one of the expected types: Enum.
I don't understand how this is possible, that why I tried the concat around it which results in the other error as stated above.
Okay, got it. I will also perform some testing. In the meantime could you share how your Enum column with base type as duration is set up? Meaning how are the duration values set up?
Note: Also you may want to ensure that when you are setting the column [direct] through bot, the expression ANY(SELECT(timetables[direct], AND( IN([_THISROW].[type], [type]) , [something] = TRUE))) results into one of the enum options defined for the enum column. For example if enum has options "000:30:00" , "000:45:00", "000:15:00", one cannot set a duration value of "000:20:00" for that column.
I made some test, and yes. I am also getting the same error both in action and action in bot.
I will post if I come up with any solution. In the meantime maybe someone else from the community could have some insights or you may want to contact the support team.
It seems there's something with the Enum-Duration type right? Thank you very much for checking!
User | Count |
---|---|
15 | |
14 | |
8 | |
7 | |
4 |