On a form, is it possible to hide the Cancel ...

On a form, is it possible to hide the Cancel button, or if not, control the view the user goes to when Cancel is selected? Thank you.

0 7 1,850
7 REPLIES 7

Hi @Robert_Lerner,

If you put an expression like below in Cancel buttonโ€™s expression option under UX - > Localize

IF(CONTEXT(โ€œViewโ€)=โ€œTable OR Slice Name_Formโ€, โ€œโ€,โ€œCancelโ€)

The cancel button gets hidden ( or to be precise becomes blank) for that particular form view.

Here, in the

expression,

โ€œTable OR Slice Name_Formโ€ is the name of system form view for the table or slice where you wish to hide the cancel button.

However, on impact of hiding โ€œCancelโ€ button, the community colleagues may have their insights to share.

@Suvrutt_Gurjar Thanks so much for your perfect solution - it would never have occurred to me to use the localize option! For future readers of this post, I made a small change in the expression to:

IF( CONTEXT(โ€œViewโ€)=โ€œMyViewNameโ€, โ€œโ€,โ€œCancelโ€ )

perfect, thks

Hi @Robert_Lerner, You are welcome and thank you for your update.Yes there was that minor typo in my expression, as I

tested it on two different views simultaneously and forgot to remove an โ€œORโ€ while pasting.

I have corrected it in the original post as well.

Thank You ^ ^

This seems to work no more. We need to use at least one space character like:

IF(CONTEXT("View")="MyViewName", " ","Cancel")

or a new line like:

IF(CONTEXT("View")="MyViewName", "
","Cancel")

Please also see:

this way of hiding the cancel button seems to work when using mobile and tablet, but not when i open the app using a desktop. 

is anyone else experiencing the same and have a solution?

Top Labels in this Space