SWITCH expression issue

Hi all,

I have multiple lists. I'm trying to list values from a certain list using SWITCH expression.

Data type of ID's are all numbers in the lists. Lists belong to different tables.

When I put only one condition into SWITCH I don't receive an error.

However when I add the second one I receive this error message. 

Do you have any idea about what the problem is?

SWITCH([Other Cymber Type],
"Drobne",orderby(Drobne In Stock[ID],[ID],true),
"DE",orderby(Cymbers DE In Stock[ID],[ID],true),
"")

kutluhang_0-1720512594501.png

 

0 9 110
9 REPLIES 9

The two statements return ref values to two different tables but a SWITCH expects "Every result expression should produce a value of the same type.", which apparently includes the target table of a ref column.

Also, you do not want to store refs to different tables in one column anyway.

So, SWITCH requires all lists from the same table? 

If it is the case, what could be the possible solution for my case? My lists are in different tables.

You can specify a ref to only one table per column. So storing refs to two different tables in one column does not make sense.

Create a separate column for each of the refs and use Show-If to control its display.

I have four different tables at the moment. That's why I was trying to reduce the number of columns.

My guess is that these four tables belong to the same thing but have different categories like products and product categories, in which case you have one products table with product category column to differentiate among them.

It would have been a great solution if recording all entries in one table and putting categories was possible. However, these entries are coming from different apps and some apps create up to 100 records in one process, taking several minutes to finish. I was worried about the safety of entries. In order to prevent overlapping and disappearing entries I preferred creating separate tables for each app. Thank you for your recommendations and comments.

by making some workarounds, you can include another table [column] values in the dropdown but resultant may be broken references. 

Yeah, sometimes I combine two tables into one by using Excel "addition" function of two lists in a formula  like this. It works. Thank you for your suggestion.

{list_1;list_2}

Top Labels in this Space