vex: how to use a channel string to decide the name of a group?
3085
5
1
-
- olivierth
- Member

- 1179 posts
- Joined: April 2017
- Offline
Hi!
I know I can use chs so the user can type in a word:
string name = chs("name");
…but I don't get how to use that string to decide the name of a group.
i@group_name; …..??
-Olivier
-
- toadstorm
- Member

- 406 posts
- Joined: April 2017
- Offline
You can mix in a bit of expression language to make this work:
@group_`chs("group_name")` = 1;
-
- olivierth
- Member

- 1179 posts
- Joined: April 2017
- Offline
Oh,
How did you make the symbol right before chs and after )? I can't figure out the keyboard shortcut for that…
-Olivier
-
- tamte
- Member

- 9387 posts
- Joined: July 2007
- Offline
you can also use group binding in Bindings tab to define which group is bound to which variable in the wrangle
Tomas Slancik
CG Supervisor
Framestore, NY
-
- toadstorm
- Member

- 406 posts
- Joined: April 2017
- Offline
olivierth
Oh,
How did you make the symbol right before chs and after )? I can't figure out the keyboard shortcut for that…
-Olivier
It's the same key as ~ on a US keyboard layout… not sure what you're using. It forces an expression within to evaluate as a string.
-
- olivierth
- Member

- 1179 posts
- Joined: April 2017
- Offline
Ah!
Thanks!
-Olivier