Trying to understand Editable_Ifs....Confused

I am fairly new to Appsheet and am getting confused on how Editable_Ifs work, I know the basic concept of what its meant for. My problem is when I'm in a specific view in the app, and I make a Editable expression, it carries over almost as a universal rule for the specific column.

e.g>  I have a tools app, I want users to create and upload as many tools as they wish but once its saved limit certain columns in the edit tool details view to be editable, like equipment ID. 

I have set it up for equipment ID column and it works for the Edit tool details view, but when going to add a brand new tool, the equipment ID column doesn't appear, I think its because of the Editable_If expression which in my case is ISBLANK([Tool ID]). 

So that makes me think when adding a brand new tool to your database, appsheet must immediately generate a UNIQUEID for the key, before you actually submit the form., thus rendering this expression FALSE

Is creating a slice and making it its own view with its own rules and its own actions,  the only way to combat this or is my lack of experience missing some  fundamental concepts with this idea?

P.S. thank you to everyone who has helped me in the past, I really enjoy Appsheet building and want to continue learning the best approaches to some of these issues I come across. 

Solved Solved
0 10 544
1 ACCEPTED SOLUTION

ISBLANK(
FILTER(
"Table Name",
([_THISROW].[_ROWNUMBER] = [_ROWNUMBER])
)
)

I actually found a snippet from Steve in a post back in May of 2020 that seems to achieve my goal!

View solution in original post

10 REPLIES 10

It would be helpful if you could show the Tool ID column configuration.  There are properties other than Editable_If that play a part in if a column is shown or not in the view.


Screenshot 2025-04-12 130526.pngof course, I Apologize. There is no formulas or auto compute or data validity expressions just the UNIQUEID initial value and it is a key column, I understand the Show is marked as do not show so maybe im not using the best example .. and I get the same issue with any Editable if expression I've used such as this one here >> 

OR(
  ISBLANK([TimeStamp]), 
ANY(Sys[isAdmin]),
ANY(Sys[isSupervisor])
)
@WillowMobileSys 

Yes, this column Tool ID will not show at any time since the Show property is "off".

In General on a Form View, a listed column will NOT show, based on Editable property, if:
1)  It is Editable but there is no valid selection options available - such as REF column but the Valif_If expression results in no dropdown options to show.
2)   It is NOT Editable and is empty.


@MKapfer wrote:

OR(
  ISBLANK([TimeStamp]), 
ANY(Sys[isAdmin]),
ANY(Sys[isSupervisor])
)


To know if this expression is good I need to understand what "Sys" is and if a Slice, how is it populated/filtered.

The "Sys[isAdmin]" portion of the expression will return a LIST of [isAdmin] values.  The ANY() function will simply return the very first value.

If I understand what is intended here, "Sys" needs to be a Slice filtered to just a SINGLE row for the current logged in user for this expression above to work correctly.

NOTE:  Assigning a "space" to a column is NOT considered blank.

I hope this helps!

 

The view for Add Tool Form,  column structure, Equipment ID is set to be thereThe view for Add Tool Form, column structure, Equipment ID is set to be thereSys in this case is not a slice it is a table called Sys that holds User roles. Such as Admin, Supervisor, and so on. 

I think I'm doing a bad job at explaining what's going on with that TOOL ID EXAMPLE i provided. Sorry. 

@WillowMobileSys Edit tool view and Equipment ID is uneditable(I want this result)Edit tool view and Equipment ID is uneditable(I want this result)Add a new tool view and Equipment ID does not appearAdd a new tool view and Equipment ID does not appearEquipment ID column configurationEquipment ID column configuration

Yes this helps.  I wasn't getting that you are using the [Tool ID] with the ISBLANK in OTHER columns.  The problem IS what you originally assessed - Tool ID is never blank so these OTHER columns would never be Editable.  Since they are empty, they will not show - as described in #2 of my previous reply.

From what I am gathering, your desired result is:

1)  Allow any user to fill in the column if it hasn't already been filled in.
2)  Only allow Admins or Supervisors to edit the column after its been populated

To allow any user to fill in an empty column, you would use:

ISBLANK([_THIS])

This expression will allow the column to be edited as long as it hasn't been filled in.    As soon as its filled in, it becomes locked down.  It will show as a disabled column.

[_THIS] is an actual qualifier referring to the current column - though you could use the actual column name if you wanted.  [_THIS] allows you to copy/paste to multiple columns without the need to edit after every paste.

If my assessment above is correct on your desired result, then the portion of your expression with the "Sys" table will not work as written.  You will need an expression that filters by the current logged in user first and then you can extract the "IsAdmin" or "Is Supervisor" properties for the current user.

I hope this helps!




I've never heard of that so I can't wait to experiment with it! Thank you for your continued patience 

@WillowMobileSys So I've added ISBLANK(_THIS) to the editable if expression under Equipment ID, and its yielding the same result, where it turns the Edit Tools View equipment ID into read only(which is good) but when i go to add a brand new tool it hides the Equipment ID column from the adding a new tool(not what i want). Equipment id is marked as SHOW. They both use the 'Add Tool Form' so I'm not sure if that is causing a conflict?

ISBLANK(
FILTER(
"Table Name",
([_THISROW].[_ROWNUMBER] = [_ROWNUMBER])
)
)

I actually found a snippet from Steve in a post back in May of 2020 that seems to achieve my goal!

You forgot to include the square brackets!!  😁 😁  So the expression was always false

However, after seeing the snippet you found from Steve, it may not have given you the intended result you were after.  Using the ISBLANK() in the Editiable_If will render the column non-Editable immediately - meaning the user couldn't change the value again before Saving.  Maybe you wanted to keep it editable until AFTER the Save?

Basically what Steve's expression is doing is checking if the row exists in the data table to differentiate between "Adding a new row" - which does not yet exist in the data table - versus "Editing an existing row" - which does exist in the datatable.  If it does not yet exist then allow editing.  If it does exist then make the column not-editable.

NOTE:   Caution should be used when referencing the [_ROWNUMBER] column.  It is a value assigned to rows in sequential order as they are loaded into the app.  There is no guarantee of the row order each time the app is used so the [_ROWNUMBER] value could change in future sessions.  I recommend never using it to avoid any issues with implementations that may not be apparent that they DO rely on [_ROWNUMBER] being the same from session to session.  There are always other ways.  For instance you could rewrite Steve's expression using the key column to get the same results:

ISBLANK( FILTER( "Table Name", 
                   [_THISROW].[Row Key Column] = [Row Key Column])
)

I hope this helps explain things!! 

That is a very helpful note and I will actually try to implement that KEY instead. I have it now to where once the end users submit the form, select fields are editable and others are not. 

Top Labels in this Space