New AJAX System

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
john
Posts: 113
Joined: Tue Jul 25, 2006 10:48 am
Location: UK

New AJAX System

Post by john »

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
aware_support
Posts: 7535
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

Dynamic re-calculation only applies to attribute values on the same form section - conditions of section visibility are not dynamically updated. So you can't hide/show tabs on the fly.
Aware IM Support Team
john
Posts: 113
Joined: Tue Jul 25, 2006 10:48 am
Location: UK

Post by john »

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
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

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
Aware IM Support Team
john
Posts: 113
Joined: Tue Jul 25, 2006 10:48 am
Location: UK

Post by john »

Hmm

I understand that. That is the same as I have got now, but this requires the user to hit save for the changes to be actioned? I maybe a little confused here?

Thanks
John
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

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
john
Posts: 113
Joined: Tue Jul 25, 2006 10:48 am
Location: UK

Post by john »

A ha, got you now. Thanks very much for that

John
Post Reply