How to conditionally link to an external URL or an internal VIEW when a record is selected

I have a table which contains a list of records. Each record can have either a URL to an external website (such as Google) OR the name of a VIEW. When a user selects a record, the app should be able to determine whether to call the HYPERLINK to display the external website, or change the page to the VIEW specified in the record. I have tried IF and IFS statements but these require the same type for the true/false condition to work, and the APP type used to change views is different to the URL type for hyperlinking. A workaround is to use a deep link for the VIEW, but this loads a second Appsheet instance of the app rather than simply opening the relevant view in the same app.

How do you have your data setup?

@jazzedge
[Menu View] column shall be App Type and and in your gSheet you can construct the expression like this:

For councillors:
#control=Members

In your action, construct the expression as:

IF(
	ISNOTBLANK([Menu View]),LINKTOVIEW([Menu View]),
	HYPERLINK([Menu Link])
)
2 Likes

Brilliant, thank you. That works. Much appreciated!

You’re welcome