Hi, with your help I've almost completed my table. My table has 18 rows and it has add row btn. Is it possible automate numbering of the rows so that when I add rows they will have numbers automaticly. I've tried indexing but it doesn't work.
this.rawValue=this.parent.index
I'm trying to improve also a calculation script and for some reason I do get and error. Will you be able to let me know where the errror is. My script is:
form1.SubTable.Table2.Row1[0].Total::calculate - (FormCalc, client)
if (AmountNet > 0) then
Total = AmountNet + VAT
else (AmountNet == 0) and (ExchangeRate > 0)
Total = AmountForeign /ExchangeRate
endif
I've checked with the check script syntax and it is ok, but i still do get an error.
I've attached a picture of what I get a a final doc.
Thanks a lot for your help!!!
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Looking at the form again, I think this is what you are after:
if(AmountNet > 0) then
$ = AmountNet + VAT
elseif ((AmountNet == null or AmountNet == 0) and ExchangeRate > 0) then
$ = AmountForeign / ExchangeRate
endif
In the previous version the test was "when AmountNet == 0"; however this didn't check if the field was empty. The code above in red checks AmountNet for two conditions: if the field is empty OR if the user has put in £0.00. If either of these is true then the first part of the test is satisfied. The script then moves on to look at the value of the ExchangeRate separately.
Hope that helps,
Niall
Views
Replies
Total Likes
Hi, I just figure it out the answer for my frst question:
form1.SubTable.Table2.Row1[7].ItemNumber::ready:layout - (FormCalc, client)
this.rawValue=this.parent.index+1
But still need your help for second one,please
Views
Replies
Total Likes
Not sure if that is the only problem, but I think you should only have one "=" in the (AmountNet == 0) statement - you're assigning a value, not testing a value.
Views
Replies
Total Likes
Hi,
Having seen this form before, I suspect that you do want to test against both fields, therefore the script would look something like:
if(AmountNet > 0) then
$ = AmountNet + VAT
elseif(AmountNet == 0 and ExchangeRate > 0) then
$ = AmountForeign / ExchangeRate
endif
the only thing to bear in mind is that even if the user has foreign values in and then inputs values in for GB, the GB will take precedence in the script and appear in the total field.
Hope that helps,
N.
Views
Replies
Total Likes
Nial, thnaks for your help, the script you gave me is 50% solution I solved the error message but the calculation after second condition does not perform.
Would you have a look a the table please?
Thanks a lot
Views
Replies
Total Likes
Hi,
Looking at the form again, I think this is what you are after:
if(AmountNet > 0) then
$ = AmountNet + VAT
elseif ((AmountNet == null or AmountNet == 0) and ExchangeRate > 0) then
$ = AmountForeign / ExchangeRate
endif
In the previous version the test was "when AmountNet == 0"; however this didn't check if the field was empty. The code above in red checks AmountNet for two conditions: if the field is empty OR if the user has put in £0.00. If either of these is true then the first part of the test is satisfied. The script then moves on to look at the value of the ExchangeRate separately.
Hope that helps,
Niall
Views
Replies
Total Likes
Niall! Once again Thank you for your help!
I've seen the books you've recomended to Greg I'll try to read them to improve my scripting in LC.
If I can somehow to return your favor please let me know!
Best regards
Alex
Views
Replies
Total Likes
Hello Dude,
Can you let me know what are books that gives scripting reference?
Regards,
Rakesh
Views
Replies
Total Likes
Hi
Hope this helps
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies