Hi I am looking to have a specific starting v...

Hi I am looking to have a specific starting view for an app based on the useremail or role. Anyone had any success with this type of expression?

0 8 469
8 REPLIES 8

It should work fine. Have you tried?

+Steve Coile I did but I keep getting this error "Expression โ€˜Logโ€™ could not be parsed due to exception: Index was out of range. Must be non-negative and less than the size of the collection.

Parameter name: index."

I have never wrote an expression like this before I was just looking for some examples

@Elijah_Magrane Yikes! Iโ€™ve never seen that error before! What was the expression?! And where did you enter it?

I entered it in the starting expression editor. Log is the name of the view. I do not get the error when I use the name of the other view โ€œNew Entryโ€

@Elijah_Magrane Believe it or not, log likely has a special meaning that is confusing Expression Assistant. Try putting the word in quotes to prevent it from being treated as a special word:

โ€œLogโ€

Harry2
New Member

@Elijah_Magrane Hi Elijah, as +Steve Coile has pointed out, โ€œLogโ€ is actually an Excel function. Our server uses a software package for parsing expressions. Apart from AppSheet built-in expressions, this package also supports and recognizes many other Excel functions, including the Log function. As a result, the expression builder mistook the view name โ€œLogโ€ as a function, and since the Log function requires 1 or 2 parameters to work, the expression builder was tricked into thinking that there was an error. A quick way to fix this is to simply enclose the view name in double quotes. This will explicitly tell the expression builder that the expression is a text value, not a function.

@Harry Does that mean we can use Excel functions in our expressions???

Harry2
New Member

+Steve Coile You can only use Excel expressions that are supported by AppSheet.

Top Labels in this Space