Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

If / then syntax

Avatar

Avatar
Validate 1
Level 1
jasonb44018069
Level 1

Like

1 like

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
jasonb44018069
Level 1

Like

1 like

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
jasonb44018069
Level 1

14-08-2015

I am struggling to understand how the "column" is identified in the syntax error. Regardless, this is what I have as scripting and am unable to identify the scripting error

if LoanAmount.rawValue = (FranchiseFee.rawValue + Buildout.rawValue + EMR.rawValue) then

   PostTotalExpense.rawValue = PostExpense.rawValue + PostSalary.rawValue + LoanPayment.rawValue + PostRent.rawValue + PostUtilities.rawValue + PostMedical.rawValue + Royalty.rawValue + Marketing.rawValue + PostBilling.rawValue;

elseif LoanAmount.rawValue < (FranchiseFee.rawValue + Buildout.rawValue + EMR.rawValue) then

   PostTotalExpense.rawValue = PostExpense.rawValue + PostSalary.rawValue + ((FranchiseFee.rawValue + Buildout.rawValue + EMR.rawValue)- LoanAmount.rawValue) + PostRent.rawValue + PostUtilities.rawValue + PostMedical.rawValue + Royalty.rawValue + Marketing.rawValue + PostBilling.rawValue;

elseif LoanAmount.rawValue = 0 then

    PostTotalExpense.rawValue = PostExpense.rawValue + PostSalary.rawValue + (FranchiseFee.rawValue + Buildout.rawValue + EMR.rawValue) + PostRent.rawValue + PostUtilities.rawValue + PostMedical.rawValue + Royalty.rawValue + Marketing.rawValue + PostBilling.rawValue;

endif

The error I am getting is

Error: syntax error near token 'LoanAmount' on Line 1 column 13

Any Thoughts?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Springboard
MVP
Magus069
MVP

Likes

143 likes

Total Posts

1,077 posts

Correct Reply

155 solutions
Top badges earned
Springboard
Validate 1
Ignite 3
Ignite 1
Establish
View profile

Avatar
Springboard
MVP
Magus069
MVP

Likes

143 likes

Total Posts

1,077 posts

Correct Reply

155 solutions
Top badges earned
Springboard
Validate 1
Ignite 3
Ignite 1
Establish
View profile
Magus069
MVP

14-08-2015

hi there

I hope you are using formcalc for this, because it would not be good if you are using javascript...

anyhow in formcalc the "="should not be use in an if statement it should be replaced by "eq" just like "<" it should be replaced by "lt"

also, never forget to put the brackets for the if statement, it is the issue here... look at the following code

Hope this help!

Answers (2)

Answers (2)

Avatar

Avatar
Springboard
MVP
Magus069
MVP

Likes

143 likes

Total Posts

1,077 posts

Correct Reply

155 solutions
Top badges earned
Springboard
Validate 1
Ignite 3
Ignite 1
Establish
View profile

Avatar
Springboard
MVP
Magus069
MVP

Likes

143 likes

Total Posts

1,077 posts

Correct Reply

155 solutions
Top badges earned
Springboard
Validate 1
Ignite 3
Ignite 1
Establish
View profile
Magus069
MVP

14-08-2015

No problem,

here is a PDF on FormCalc reference , this could be very useful to you

http://help.adobe.com/en_US/livecycle/es/FormCalc.pdf

Avatar

Avatar
Validate 1
Level 1
jasonb44018069
Level 1

Like

1 like

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
jasonb44018069
Level 1

Like

1 like

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
jasonb44018069
Level 1

14-08-2015

Magus069

You are correct that is was in formcalc.  Thanks for the direction. That fixed the problem!  Awesome!

Thanks