Hello! I’m currently learning to use Application Studio and things have been going well so far. However, I encountered an “Invalid or unexpected token” error when trying to use a Condition Widget in a Kinetic customization for Job Entry.
I’m attempting to use the Condition Widget to check whether a Job is selected, specifically by verifying if JobNum is undefined. Initially, I used the condition: {JobHead.JobNum} === undefined. This works for most Job Numbers (e.g., 129864-1-1 and 032497), but I receive the token error when the Job Number corresponds to an unfirm job (e.g., 10UNF000024077).
I found a workaround, but it doesn’t make sense from a programming perspective. I had to convert “undefined” to a string for the condition to evaluate without error. This feels like a hack rather than a proper solution so I suspect I might be missing something.
Has anyone else run into this? I’d appreciate any insights or suggestions on how to handle this properly.
Thanks in advance!
Here’s what I tried:
Case 1: My condition is {JobHead.JobNum} === undefined
- If JobNum = undefined → I get True
- If JobNum = 129864-1-1 → I get False
- If JobNum = 032497 → I get False
- If JobNum = 10UNF000024077 → I get an Error
Case 2: My condition is “{JobHead.JobNum}” === undefined
- If JobNum = undefined → I get False
- If JobNum = 129864-1-1 → I get False
- If JobNum = 032497 → I get False
- If JobNum = 10UNF000024077 → I get False
Case 3: My condition is {JobHead.JobNum} == undefined
- If JobNum = undefined → I get True
- If JobNum = 129864-1-1 → I get False
- If JobNum = 032497 → I get False
- If JobNum = 10UNF000024077 → I get an Error
Case 4: My condition is “{JobHead.JobNum}” == undefined
- If JobNum = undefined → I get False
- If JobNum = 129864-1-1 → I get False
- If JobNum = 032497 → I get False
- If JobNum = 10UNF000024077 → I get False
Case 5: My condition is “{JobHead.JobNum}” === “undefined”
- If JobNum = undefined → I get True
- If JobNum = 129864-1-1 → I get False
- If JobNum = 032497 → I get False
- If JobNum = 10UNF000024077 → I get False
Case 6: My condition is “{JobHead.JobNum}” == “undefined”
- If JobNum = undefined → I get True
- If JobNum = 129864-1-1 → I get False
- If JobNum = 032497 → I get False
- If JobNum = 10UNF000024077 → I get False