Hi
I have recently downloaded the latest version of Aware to take advantage of the fact that calculations can be performed on the fly without saving the data entered in the form (correct me if im wrong).
I am trying something hopefully very simple. I have two (tabbed) sections to one of my forms and I only want both sections to be visible when a drop down box has a certain value selected. I am unsure of the syntax to get this to update on the fly (if at all possible). I have attatched a rule on the form section itself where it says "Not Present When (if left blank section is always present):"
Temp.PaymentType<>'BACS / Autopay'
Obviously this is only invoked when the infomation is saved. Is this one of those instances where it is possible for this to be updated at the point where the drop down box is updated?
As with all my questions I hope that makes sense
Thanks
John
New AJAX System
-
- Posts: 7535
- Joined: Sun Apr 24, 2005 12:36 am
- Contact:
Hi
Thanks for that.
Could you possibly provide a very quick example of code where I might generate a value for an attribute based on a change I make. For example I may choose to automatically fill in the fields on the bank details section if they select say "Paid By Cheque" on one of my drop down boxes. Just an idea of the syntax woulod be great?
Has the User manual been updated? If so I will download this also
Thanks
John
Thanks for that.
Could you possibly provide a very quick example of code where I might generate a value for an attribute based on a change I make. For example I may choose to automatically fill in the fields on the bank details section if they select say "Paid By Cheque" on one of my drop down boxes. Just an idea of the syntax woulod be great?
Has the User manual been updated? If so I will download this also
Thanks
John
-
- Posts: 595
- Joined: Sun Apr 24, 2005 2:22 am
- Contact:
Hi John,
The syntax has not changed. If you want to set some attributes unconditionally based on values of some other attributes, you can do it like this:
If Invoice.PaymentType = "Paid By Cheque"
Then Invoice.BankAccountNo = Invoice.Customer.BankAccountNo
If you do not want to overwrite the previous value if there was one from the previous selection or user input, you need to add a condition to check if the value is empty:
If Invoice.PaymentType = "Paid By Cheque" AND Invoice.BankAccountNo IS UNDEFINED
Then Invoice.BankAccountNo = Invoice.Customer.BankAccountNo
The syntax has not changed. If you want to set some attributes unconditionally based on values of some other attributes, you can do it like this:
If Invoice.PaymentType = "Paid By Cheque"
Then Invoice.BankAccountNo = Invoice.Customer.BankAccountNo
If you do not want to overwrite the previous value if there was one from the previous selection or user input, you need to add a condition to check if the value is empty:
If Invoice.PaymentType = "Paid By Cheque" AND Invoice.BankAccountNo IS UNDEFINED
Then Invoice.BankAccountNo = Invoice.Customer.BankAccountNo
Aware IM Support Team
-
- Posts: 595
- Joined: Sun Apr 24, 2005 2:22 am
- Contact:
You need to mark the rule as dynamically re-calculated on forms. Also, inspect the log to see if the rule gets evaluated when you change the value (without saving the form). It is possible that the rule is actually evaluated but the action is not executed because the conditions are not met.
Aware IM Support Team