How to write only 2 row

I want the button disappear after write the 2 row and I have try many way but not work

Just like when choose 2 data and can’t choose more than 2

If you mean, hide a button when 2 specific rows are edited:

  1. You could use a query column to filter the 2 rows based on your requirements.
  2. Then add a lookup column to the query column row id (or any other column that is NEVER empty).
  3. Add an array length column and choose the lookup column as the source.
  4. Add a visibility condition on the button to check if the array length is 0 (or not zero based on the conditions you put in the query column).

Edit: I think I understand that you want to show a compare screen with only two products. So the condition to hide the button would be:
If array length is less than 2.

Edit 2: I didn’t think about that, but Jeff is right. Rollup is the way to go:

Here is the new procedure:

  1. You could use a query column to filter the 2 rows based on your requirements.
  2. Then add a rollup column to the query column row id (or any other column that is NEVER empty) and choose count.
  3. Add a visibility condition on the button to check if the rollup value is 0 (or not zero based on the conditions you put in the query column).

These could both be replaced with a single Rollup column.

Oh well, I didn’t think about that one ! LOL

1 Like

@Smarthome_Support Here you go!

1 Like

@Smarthome_Support What does your Compare button do? A set values action?

no, that’s add row not set the value

I have try but not work. Could you show a sample?

Could you show me your case so I can make a sample closed to your use case?

My case is give customer a help to search the product from customer select, and it will show the result from data sheet, after that if customer want to know the different, they can click the compare button for add row to other table and see the different. but my problem is the compare button have to hide after choose 2 product, but it’s not work or I’m wrong in some place.

  • Add a user-specific column boolean to your Items table.
  • Your “compare” button would write a true value to that column.
  • Add a custom collection with two items side-by-side like you already have, filter for items that have the “Chosen” boolean checked.
  • Add a remove button to that custom collection, clearing the value in “Chosen”.
  • In your User Profiles table, add a rollup on top of the “Chosen” boolean. If the rollup is greater than or equal to 2, hide the “Compare” button.
2 Likes

It’s work now, thank you. but how to set the all boolean in to false in one button after compare complete such as click clear to set all boolean to default.

Considering you would only have at most 2 at a time:

  • In your Users table, create a query to the Items table, filter by “Chosen” is checked.
  • Add a single value column, get the first whole row from the query above.
  • Add another single value column, get the from start > 1 whole row from the query above.
  • Your “Clear” button will have 2 set column values actions, using two single value columns above, clearing the “Chosen” column.

That’s awesome, Thank you

1 Like