Hi all,
I am trying to do multiselect cascading combo boxes to select any buildings and determine which pre-determined areas reach that building. For that purpose, I created two tables in the dataverse with ID columns that I am linking using a middle table, which I connected to the other tables using the many-to-many connection. It has to be many to many, because many buildings can be within an area, and many areas can contain a building. I then created both combo boxes. First combo box's items is just the Buildings table, names column. I then tried to apply the following formula in items of the second combo box:
"Filter( Area, LookUp( BuildingArea, BID = Buildings.BID && AID = Area.AID ) <> Blank() )"I do not know why, when I input that formula, it returns an error stating "Incompatible types for comparison, this types can not be compared".
Concretely, in case the information is needed:
The tables are Buildings for the building information and Area for Surface information. The intermediate table is named BuildingArea. In the Buildings table, the column with the IDs is "BID" and its data type is "Single Line of Text". The columns in the intermediate table are "AID" and "BID". Both have the same data type, "Single line of text". The Area table contains the "AID" column. Its data type is "Single line of text".
So the idea is to have combo box 1 show the Buildings stored in Name column. Then, match the BID to the BID in the combined BuildingArea table. Then, check for the selected BIDs and return the AIDs. Those AIDs will finally be compared in the Area table AID column to return the area names on the Combo box 2.
I also tried building it using a collection on the OnVisible property of the screen, but that caused the same error to trigger.
Can anyone help me find out why I am receiving that error message, or how to overcome it?
Thanks in advance

Report
All responses (
Answers (