ADD and UPDATE Form, how to hide columns in ADD and show in UPDATE?

Hello everyone,

So I have this maintenance reports table which I can read from my app.
I want users of the app to be able to fix the reports and update the table from the Detail view with the Form that was generated automatically by the system, this works fine. this is the icon I see in the details view which allows UPDATES: Captura de Pantalla 2020-07-05 a la(s) 17.49.10
I have set that up so that the “UPDATE columns” to fill with the Form (i.e. Photo after) are not visible in the Detail View, only in the form.

I also want users to ADD new reports to the table. And here is where I have the problem.
In the Primary view of the table I have this icon which allows users to ADD a new row or report: Captura de Pantalla 2020-07-05 a la(s) 17.51.10
So far, so good. The problem is that when they do this, because the columns for the UPDATES (i.e. Photo after)are set to be required, they are also required here. And that kind of makes no sense since it´s a new report, you shouldn´t have an “after” picture.
I tried hiding them (UPDATE columns) using the Edit_If option with a ISNOTBLANK() expression, associated to the first columns (i.e. Report date). This works ok when the ADD form is empty, but as soon as I type the date, the other fields appear again.

Any ideas on how to bypass this?

PS. Im sorry I tried to keep the post as short as possible… But Im not sure about my english, so I had to explain a bit better.

You can choose to show/hide a column with Show_if expression like this which means:
if the expression evals to TRUE you are editing an existing record and shows it
if the expression evals to FALSE you are adding a new record and hides it


You can also use the same expression in Required_if property of a column


Awesome, thanks Levent!

I haven´t noticed, now that I´ve applied that Show_if expression, in the Details View, I can see the name of the column and the empty field (i.e. Photo after) for reports that are not yet fixed.
I can live with this, but would be great if I could fix it.

Captura de Pantalla 2020-07-05 a la(s) 19.17.11

Thanks again!

What do you want to achieve @Nicolas_Feldman, can you be more specific with that detail view?

Im sorry Levent I wasnt specific enough.
So we are talking about the same table and views as in the original post.
I have this table with reports that users are able to UPDATE records when they are fixed, or ADD new reports.
When user Adds a new report only the first columns show, (i.e. photo before and report date)
When user Updates a report all columns appear, so that the last columns (i.e. photo after and service date) also show and are editable.
It all works now with the expression you proposed before: IN( [KeyColumn], TableName[KeyColumn] )

What im trying to do now is to hide those fields that are empty from the “read” section of the details view, NOT in the form.
For example, when reading an existing report that hasn´t been updated (in the details view), I can see the empty fields there from the this is what im trying to hide. (you can see those fields in the attached screenshot.
Captura de Pantalla 2020-07-05 a la(s) 19.17.11

Thanks again!

If the Show_If expression evaluates to TRUE, the column will be displayed even if the column’s value is blank. To avoid this, you can enhance your expression to handle this case by also checking with ISBLANK() or ISNOTBLANK():

AND(show?-expression, ISNOTBLANK([_THIS]))

Alternatively, have your Show_If expression evaluate to a blank value to allow the default display behavior:

IFS(hide?-expression, FALSE)

Thank you Steve, I´ve tried this but it applies to both Detail and Form View.
This means if the expression is TRUE, it is not shown neither in the detail view nor in the form view, so the user cannot fill the field.

Thanks again for your assistance!

You can add:

CONTEXT("ViewType") = "form" // or "detail", "table" etc.


CONTEXT("View")  = "YourViewName"

expression to your TRUE statement

1 Like

This also helped:,shown%20in%20the%20other%20views.