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

expressions
(Eli) #1

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?

(Steven Coile) #2

It should work fine. Have you tried?

(Eli) #3

+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

(Steven Coile) #4

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

(Eli) #5

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”

(Steven Coile) #6

@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”

(Dinh Nguyen Nguyen) #7

@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.

(Steven Coile) #8

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

(Dinh Nguyen Nguyen) #9

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