SOLVED

List column conditional display using ID

Steel Contributor

I would like to hide a specific form column when adding a list item using SP Form (Don't want to use PowerApps). The column must be visible when editing.

 

The only way I can think is using the following conditional display formula but it is not working:

Something like : =if([$ID]>0,'true','false')

I've also tried =if([$ID]==0,'false','true') and if([$ID]=='','false','true')


I've tried using a calculated column based on [ID] but it does not work.

 

Any suggestions?

2 Replies
best response confirmed by Martin Coupal (Steel Contributor)
Solution

@Martin Coupal the conditional formula cannot reference a calculated column, site column or an internal column like ID. But you can achieve what you need by adding an extra column in the list called, for example, FormMode and then use a simple flow in Power Automate. In my example I am wanting to hide the column called 60th when the user starts to create the item and only display when a user edits the item.

 

The conditional formula for the "60th" column will be =if([$FormMode]=='Edit', 'true', 'false')

 

The flow will update the item and add Edit to the FormMode column after the item has been created.

 

You can see it working on the attached video. Be aware it can take 45-60 seconds for the column to update in the SharePoint list.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

Ok, I wanted to avoid using a flow just for this but I understand there is no way to do this just using a plain conditional formula... Thanks anyway!
1 best response

Accepted Solutions
best response confirmed by Martin Coupal (Steel Contributor)
Solution

@Martin Coupal the conditional formula cannot reference a calculated column, site column or an internal column like ID. But you can achieve what you need by adding an extra column in the list called, for example, FormMode and then use a simple flow in Power Automate. In my example I am wanting to hide the column called 60th when the user starts to create the item and only display when a user edits the item.

 

The conditional formula for the "60th" column will be =if([$FormMode]=='Edit', 'true', 'false')

 

The flow will update the item and add Edit to the FormMode column after the item has been created.

 

You can see it working on the attached video. Be aware it can take 45-60 seconds for the column to update in the SharePoint list.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

View solution in original post