Changing tables in reference functions

Hi All,

I want to make a building inspections app for multiple buildings, with the functionality of listing all the cracks on an XY/Map layout. It’s only possible to include one layout per table/worksheet, so for different buildings, I have to create multiple tables/worksheets.

I want my Buildings View to list all the buildings, and if you go into the building Detail, it shows you related cracks, like below:

2X_f_f32bbe80705e1b4309c69b41f9b053c6ea10325f.png 2X_2_23aaa9c5b1474e3ec0c9913194e11fa9ec87bc6a.png

The issue I have now is as follows: The Related Cracks column must change depending on the building that is opened, but I can’t seem to get this to change based on the building. What currently works for a single building, is the following:
2X_3_32bd095a6235da86aa23bb973bd3b352ddf7ca27.png

But that REF_ROWS formula can’t change the source table. I tried using REF_ROWS(concatenate(“Cracks_”, [Shorthand Name]), “Building”), where the concatenate function calls the specific name of each table (Shorthand Name is defined upon creation of each building, and is used for numbering purposes as well), but Appsheet gives me the error “Function ‘REF_ROWS’ should have exactly two parameters, a table name and a column name of Ref type”.

Is it possible to change referenced to different tables, or is this functionality not supported?

If it’s not supported, are there any other suggestions for the XY/Map layout functionality for different buildings?

Thanks in advance

0 6 384
6 REPLIES 6

Can anyone weigh in on this?

Steve
Platinum 4
Platinum 4

It is not possible. The arguments to REF_ROWS() must be literal Text values; they cannot be expressions.

Okay, so it seems like what I want to do (i.e. multiple XY/Map layouts for different buildings) won’t be possible, or is there another way to do it?

Have you considered a single worksheet and table, but multiple slices on that table? Or a single slice that includes only coordinates for a configurable building?

No, haven’t tried slices before, fairly new to Appsheet. Will read up a bit on slices, and get back if I struggle with that, thanks for the replies

I have no experience with XY columns and their mapping, so my ability to help will be limited.

Top Labels in this Space