Filtered Inline Table

Hi All,

Let me start off by saying that my current solution works, but it is "hacky" and has me worried that my solution will eventually be patched by the Appsheet team (Please Don't ๐Ÿ˜ฐ).

So I am working on an inspection app that certifies new equipment. As users are filling out the inspections some questions will require the addition of picture(s), note(s) and/or file(s). Because some of these questions may require multiple additional entries I'm using inline tables connected to a separate "Attachments" table versus single Image/File/LongText fields.  I found that if you edit the formula of the Appsheet created [Related Attachments] virtual column I can create Filtered Inline Tables that automatically apply all of the conditions of the Filter function to new entries of the Inline Table. I also found that if I change the Column's Name and Description Appsheet generates a new [Related Attachments] virtual column on the next save. Which is great because it allows me to create multiple Filtered Inline Tables for all of the inspection questions.

The issue is that no matter what I try I am unable to recreate the same inline table outside of piggybacking off of the system generated [Related Attachments] virtual column. I'm assuming there's a hidden field that I can't toggle for the List virtual columns I create.

Does anyone have any experience with any of Appsheet's quirks like this? Is it smart to use this workaround or should I find another solution?

The Filter code I'm using:

 

 

FILTER(Attachments,
	AND(
  	  [Checklist ID] = [_THISROW].[ID], 
      [Type] = "Image", 
      [Question] = "ABCDEF"
  )
)

 

 

 

0 7 275
7 REPLIES 7

When using FILTER("TableName", FilterConditions) that is already independent of your [Related Attachments] column, so I'm not quiet certain how you are piggybacking off that virtual column?

The reason AppSheet creates the VC [Related Attachments] is when you edited the column type in your attachments table for [Checklist ID] and set it as Ref column pointing to the CheckList table, AppSheet creates a reverse reference in this case the [Related Attachments] column.

What you could actually do is set this up for each of the various [Question] type I presume like:

SELECT([Related Attachments], [Question] = "ABCDEF")

SELECT([Related Attachments], [Question] = "GHIJKL")

Hi @Markus_Malessa ,

I tried this and got a "Unable to find column 'Question'..." error. The crazy thing is that it works in the preview despite the error, but as soon as I save the changes it breaks the app.

There really is not much to do to create a VC of list type using a Filter expression like here 

TeeSee1_0-1671090415580.png

filter(
 "products",
 AND(
  [category_id]=[_THISROW],
  CONTAINS([name], "prod")
 )
)

@kfeuerhelm wrote:

The issue is that no matter what I try I am unable to recreate the same inline table


What is happening here? Any error messages?

@TeeSee1 No errors, but the empty list does not show up in a form view.

Now I see what you mean..

You indeed have found quite an interesting way to create filtered inline views that are displayed on the Form - both initial record creation and edits..

TeeSee1_0-1671159575756.png

TeeSee1_1-1671159615650.png

Well for this..  I tried a few things but could not get the same effect other than following the procedure you described.

 

Steve
Platinum 4
Platinum 4

@kfeuerhelm wrote:

The issue is that no matter what I try I am unable to recreate the same inline table outside of piggybacking off of the system generated [Related Attachments] virtual column. I'm assuming there's a hidden field that I can't toggle for the List virtual columns I create.


Any column with an App formula expression that produces a list of Ref should present as an inline table in a detail view. If you want an inline table in a form view, the Ref column of the child table must have Is a part of set to ON.

@Steve I am unable to get an empty List of Refs to show up in a Form view unless I piggyback off the system created [Related Attachments] VC. Below is the List of Ref settings, "Is a part of?" is also selected on the Attachments Table:

Screenshot 2022-12-15 at 9.15.07 AM.png

Top Labels in this Space