Hide items related to ref_rows

Good afternoon,

When I create a ref_row between two tables, within the UX I do not want to see related items in the dropdown, just the new button. How can I achieve this?

Solved Solved
0 8 658
1 ACCEPTED SOLUTION

I think I see what youโ€™re asking @Antwain_Jordan1

You want the โ€œNewโ€ button inside the form (for related records that have the Is a part of turned on), but you donโ€™t want to see any of the records - just the new button right?

That full-sized button only appears when the associated inline view is empty - so as soon as records are recorded it becomes the inline view you want to get rid of.

I think - THINK - you might be able to do something like this:

Create a slice of the table that allows adds, but excludes any records, using a condition formula like this:

[RecordID] = โ€œNothingโ€

Since having a record key of โ€œnothingโ€ is very unlikely, this slice will hold NO records but still allow additions.


Then if you copy the Ref_Rows virtual column that already exists, and change the first element of the formula from the name of the root table to the name of the slice you just createdโ€ฆ you might get the functionality youโ€™re wanting.

Iโ€™ve not tested this; this is just what Iโ€™m thinking might work for this.

View solution in original post

8 REPLIES 8

You need to establish a reverse ref with setting isPartOf parameter to ON

When I do this, the dropdown still shows options other than New. I feel like I should be using A valid_if statement, but canโ€™t figure out how.

Steve
Platinum 4
Platinum 4

Iโ€™m not aware of a way to do what you want. If you use Valid If to produce an empty list, AppSheet will hide the input column entirely, as the empty list is taken to mean, โ€œthere are no valid inputsโ€.

I think I see what youโ€™re asking @Antwain_Jordan1

You want the โ€œNewโ€ button inside the form (for related records that have the Is a part of turned on), but you donโ€™t want to see any of the records - just the new button right?

That full-sized button only appears when the associated inline view is empty - so as soon as records are recorded it becomes the inline view you want to get rid of.

I think - THINK - you might be able to do something like this:

Create a slice of the table that allows adds, but excludes any records, using a condition formula like this:

[RecordID] = โ€œNothingโ€

Since having a record key of โ€œnothingโ€ is very unlikely, this slice will hold NO records but still allow additions.


Then if you copy the Ref_Rows virtual column that already exists, and change the first element of the formula from the name of the root table to the name of the slice you just createdโ€ฆ you might get the functionality youโ€™re wanting.

Iโ€™ve not tested this; this is just what Iโ€™m thinking might work for this.

Thatโ€™s exactly what I needed. Thank you!

@Antwain_Jordan1 Did that work?

I would make use of the CONTEXT() formula to only show one in the form and the other (the one showing the records) outside the form.

CONTEXT(โ€œViewTypeโ€) = โ€œFormโ€

Yes, it did work. Iโ€™ve marked it as the solution.

Thanks,

Iโ€™m actually more amazed that it actually worked. I love this platform!
3X_4_3_43b0545cb5e8988b7ec7695514535f2832c327ab.gif

Top Labels in this Space