Conditionally do nothing; using IF with LINKTOFORM & LINKTOROW in App column

I have created an App column to conditionally link to a form or a row. Example:
IF([1 Key] <> "#", LINKTOROW([1 Key], "Lab Inspection_Detail"), LINKTOFORM("Lab Inspection_Form", "Lab", [Lab ID], "Lab Inspection Category", "2d8f09a7") )

In this case, when the [1 Key] column is #, I link to the form. When [1 Key] column is not #, I link to the a detail view of Lab Inspection_Detail.

However, there are some cases where I don’t want to LINKTOROW and I don’t want to LINKTOFORM. I just want it to do nothing.

Is there something I can use in these cases? Such as NULL or # or something?

Why dont you use IFS instead of IF?

1 Like

For reference:

2 Likes

Whether I use IF or IFS, I’m still unsure what to use in that function to do nothing in the right condition.

I’ve tried NULL, but that didn’t work. I also tried opening the current view. But that’s horrible because it makes it seem like it failed to pull up the appropriate info. And the last thing I tried was adding a dummy LINKTO__, but that just made it go to a blank page.

Ideally, in the correct condition, it wouldn’t even show the image icon.

I would use an Action instead of an App column. With that way you can enter in a behavior expression for when the Action is available, as well as your existing navigation expression.

2 Likes

Thanks, Marc_Dillon.
I’ll look into Actions more and see if I can figure this out using those.

In the meantime, I have a workaround, instead of “do nothing”, I am redirecting users to a “this entry is missing” detail page.

Edit: This worked great, and was pretty straightforward once I started playing around with it! Thanks again!!!

I was able to use the action to conditionally show an icon when a record is present. That icon then links to the appropriate detail page.

Here is the result:
image

The Action was set up as follows:


Where “2 Link to Inspection” is as follows:

1 Like