Tutorial Error Message #2 - if error

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

Joe Blake
Ebase User
Posts: 44
Joined: Sun Sep 15, 2013 6:26 pm

Tutorial Error Message #2 - if error

#1

Postby Joe Blake » Thu Sep 19, 2013 4:27 am

I am being tutored in: /Building_your_first_form.htm

I am in Part 2: Enter a validation check

I have entered the validation check to make sure the union cronies aren't trying to nominate Arnold Schwarzenegger for best actor. When running the form I get the following message:

Script OSCARS_FIELDCONTROL8_VALIDATION_001: Invalid Command > if

Here is a copy of the script it is referring to:

if[WORK_IN_INDUSTRY = 'Y']
message 'Industry Workers Are Not Allowed Nominee Submissions';
endif

Thanks for your help.
0 x
New Potential User.

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Thu Sep 19, 2013 7:53 am

Well that's embarassing. There should be a space after the "if". You can edit the script to add the space and then carry on with the tutorial. Thanks for pointing this out.
0 x

kotinkarwak
Ebase User
Posts: 109
Joined: Mon Sep 21, 2015 9:55 pm

validation in javascript (v5)

#3

Postby kotinkarwak » Sun Sep 27, 2015 8:48 pm

I thought best to attach to this thread since might be related.
I have added another validation to this control which is defined in javascript. In this instance I am just checking the same context, i.e.

Code: Select all

importPackage(com.ebasetech.xi.api);
importPackage(com.ebasetech.xi.services);

if (fields.IndustryWorker.value == 'Y') {
  event.owner.addErrorMessage('Javascript message');
}
Noted that this is the generated code and there appears to be an error in the comparison. Think should be == true or == false.
0 x


Who is online

Users browsing this forum: No registered users and 7 guests