Hide or show blocks based on a record’s attributes

I have a problem hiding empty items.
I must show the purchase detail, but when doing so, as the software reads each column of my Google Sheets, some fields are empty and I cannot hide them in my detail view.

In the image you can see a blank space between the penultimate and the last record, I have had to remove the labels from the fields so that they do not appear blank, however the final result does not please me either. Is there a way to use some type of considiconal filter, where if the value of the record in column 6 for example is empty, then hide the record or something similar?

How can I do it?
I’m new to Softr and I apologize for the basic level of the question.

Hi there! Thanks for your question.

At the moment, you cannot conditionally hide a field if it’s empty. Normally, users do 1 of two things:

  1. either structure their blocks in a way that they are OK with empty data showing if it happens that way (or enforce that data not to be empty from a data input perspective)

  2. or create multiple blocks, and conditionally hide or show them based on certain values that you think would be good. This way, block A shows much less values but doesn’t show the empty ones. While block B shows all values for the items that have more details?

Hope this helps

1 Like

Hello, unfortunately you can’t hide empty fields,

But here an approch:

Imagine i want to show Customer Details + i have 2 fields C1 and C2 i want to show or hide if empty

Settings:

  • Have 1 List Details with Fixed Fields of Customer
  • Have 3 more List Details blocks with conditons on “Show list items”
  • 1 Block with C1 + C2 and condition IF C1 is not empty AND C2 is not empty

  • 1 Block with C1 only + condition IF C1 is not empty AND C2 is empty

  • 1 Block with C2 only + condition IF C1 is empty AND C2 is not empty

Result:

User can only see 2 block : Customer Details + 1 block who match conditions

Hope it will help you

2 Likes

Thank you very much, I will implement it and I will be happy to let you know the result. Thank you, it has helped me.

Great creativity!! Thanks for helping :pray:t4:

Good morning, I thought it appropriate to let you know how I ended up solving the issue of the different sales modes on the detail page.
As I am new to Softr, the instructions of colleagues began to guide me along the way, I have 6 types of products, which means that the details of the sale of each of the types of products require different fields from each other. For this, use two types of views, one general and one detailed, and on the detail page make 6 types of blocks, for each of the types of sales. choosing in the conditional conditions filter option, the any option and then the option if type of sale is sales option for each of the cases.
Also add in the search option not only the type of sale or the name of the customer, but also some more details about the search.
Right now I’m fighting with the filters. I don’t know how to add filters by date range to the records. Could someone help me please?