Constants input in Params on views

Hi.

Is there someone that can tell my why is it not possible to put a constant on the input on the params to a view. I get a error in a expression

image
image

But when I use an tag there is no problem.

What's the expression ? And what's the error ?

image

Well... Do you have a tag at the path "[default]1" ?

No I don't.

I just want to type 1 or 2 or 3 etc. on the params input to a view. instead of using a tag without getting an error..

You get an error on an expression that, I'm guessing, is reading a tag based on that parameter. I'm not sure why you're expecting that expression not to error out ?
I'm also not sure what you mean by "using a tag".

You can pass anything you want to a view through parameters. But obviously, how you use those parameters might expect them to be of a certain type, format, etc.

Edit:
oooh wait, I think I understand.
You want to display a value in a label, based on a parameter.
When you use a tag, it works, but with a constant, it doesn't.

When you "use a tag", I'm guessing you're passing the path of this tag.
And then, the binding on the label is an indirect tag binding, that uses the parameter to build the tag path.
A tag path is just a string. That's all it is. You get a value when you use this path to read the tag, in your case with a tag binding.
You're not displaying the value, you're using it to build a path. See the difference ?
When you pass a constant, the binding tries to use it to build a tag path.

1 Like

That make sense. Tanks

I didn't see it mentioned by @pascal.fragnoud, but if you want to pass in a value into that param instead of a tag path, then you would use a property binding instead of a tag binding. A tag binding will try to read the tag given in the tag path provided. "1" is not a tag path, it's just a value

1 Like