jkane
(John Kane)
September 5, 2024, 3:49pm
1
So, I have a customization that I am working on where I keep getting an error.
I have a Condition widget where the Expression is
'#_trans.dataView('T2DV').dataRow(0)['UD01_Key3']_#' = 'Entry'
As you can see, the left hand is dynamic and could contain any character. The error I am receiving is
function body ‘1/2’ = ‘Entry’ thrown exception SyntaxError: Invalid left-hand side in assignment
I am guessing it does not like the “/” in the value? Can anyone confirm that is the error?
If that is the error, is there a way to get around it?
LoganS
(Logan Sievers)
September 5, 2024, 3:54pm
2
Not 100% sure what you’re using this in but identifiers generally need to start with a letter or underscore and can only have letters, numbers, and underscores.
1 Like
Do you have to escape the internal apostrophes?
jkane
(John Kane)
September 5, 2024, 3:59pm
4
I don’t believe so, they are the ‘’ around the 1/2 value. If I don’t put them there, then the expression evaluates to
1/2 = ‘Entry’
1 Like
How about doubling the slash? If you’re sure it’s the slash.
josecgomez
(Jose C Gomez)
September 5, 2024, 4:11pm
6
'#_trans.dataView('T2DV').dataRow(0)['UD01_Key3']_#' = 'Entry'
This is resolving the value of
trans.dataView(‘T2DV’).dataRow(0)[‘UD01_Key3’] which maybe be ‘squirrel’ and trying to assign ‘Entry’ to a non variable this wont work
What you are saying in layman terms is
assign entry to the word squirrel
Not the variable holding the world squirrel but the word itself.
What are you trying to do?
4 Likes
jkane
(John Kane)
September 5, 2024, 4:20pm
7
I was trying to do a comparison. Adding in == made it work. Thanks @josecgomez
4 Likes
hkeric.wci
(Haso Keric)
September 5, 2024, 4:39pm
8
Change your code to
'#_trans.dataView('T2DV').dataRow(0)['UD01_Key3']_#' == 'Entry'
EDIT:
Late to the party dammit @josecgomez
8 Likes
klincecum
(Kevin Lincecum)
September 5, 2024, 5:36pm
9
josecgomez:
world squirrel
I’ve heard of the World Turtle but not the world squirrel.
Intrigued.
3 Likes
josecgomez
(Jose C Gomez)
September 5, 2024, 6:01pm
10
Listen I type with an accent too okay!
world
word
drawer
yawn
are all super hard to pronounce when your genes are spanish speaking
6 Likes
klincecum
(Kevin Lincecum)
September 5, 2024, 6:12pm
11
Have you met me? I talk like I use a warsh wrag…
2 Likes
Ernie
(Ernie Lowell)
September 5, 2024, 6:14pm
12
josecgomez:
super hard to pronounce
sort of like park and airport when your genes grew up near Boston
1 Like
jtownsend
(John Townsend)
September 5, 2024, 6:16pm
14
On the plus side y’all are born properly rolling your r’s. More than fair trade IMO.
2 Likes
GThom
(Gage Thompson)
September 5, 2024, 7:04pm
16
No, no, I think he’s on to something. Ratatoskr from Norse mythology is kind of a World Squirrel as he runs up and down the world tree, Yggdrasil.
1 Like