Looking up a value whilst creating a new record

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
rocketman
Posts: 1252
Joined: Fri Jan 02, 2009 11:22 pm
Location: Preston UK
Contact:

Looking up a value whilst creating a new record

Post by rocketman »

Still trying to get my head around the way IM works.

I'm trying to log flights for my club. I need to record pilot, launch time, landing time duration etc then calculate the cost.

Ok - last bits are easy, but the way we work is the duty clerk gets the membership number of the pilot, and (currently) enters it. I then want IM to dive off and find the pilots name as verification that the correct membership number is entered before pressing the create button. I don't want to select it from a list a-la the CRM examples I just want to go grab it and show the results. In ASP.Net terms, I guess I'm asking, how do you kick off a process when a field loses focus (ie when I tab out of it)
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

You said you don't want to select from a list, but would a drop down fit your needs?
technopak
Posts: 287
Joined: Thu Dec 04, 2008 2:16 pm

Post by technopak »

Hi Rocketman,

I'm not sure focus-based operations are possible with Aware. I had a similar requirement recently which essentially needed to check existing records in a BO before creating a new record.

The suggestion from Support was to use a separate and temporary object to hold the initial data (pilots ID), then use a process to query the existing records and create the new persistent object from the data returned by the query.

It's the long way around I know, but it works well.

Hope this is useful,

Peter
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

Focus-based operations ARE possible in Aware IM. All you have to do is define a rule to check whatever you have to check and then mark the rule as "executed dynamically". You can do it in the Advanced tab of the rule.

Whenever the field that the rule depends on loses focus Aware IM will fire off the rule and display the results immediately on screen.
Aware IM Support Team
rocketman
Posts: 1252
Joined: Fri Jan 02, 2009 11:22 pm
Location: Preston UK
Contact:

Focus based rules

Post by rocketman »

Hi Peter - and aware support,

Thanks for getting back so quick (as always). I'll try both scenarios later and see which one works best
pbrad
Posts: 781
Joined: Mon Jul 17, 2006 11:03 pm
Location: Ontario, Canada

Post by pbrad »

Hi,

Another option is to create a non-persisted object with a reference object in it to the member. Configure the form object as a dropdown where the data is filled in automatically as the user starts to type the membership number. In the dropdown show the membership number and the member name so that the user gets instant feedback that they have the correct member.

To implement, start a process that has the first step of entering the new non persisted BO and a second step of creating a flight record where the flightrecord.member = the non-persisted BO.Member and then editing it.

Pete
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Sounds very creative, Pete. Will have to try this.

Tom
rocketman
Posts: 1252
Joined: Fri Jan 02, 2009 11:22 pm
Location: Preston UK
Contact:

Post by rocketman »

Hi Pete,

One to keep in mind for other apps I think, but this one is very definitely a web app. The input Pc will be at our launchpoint connected via Wi-Fi to the internet and then up to our ISP.(upload 256k, download 2.5Mb - on a good day)

Have you a handle on what the performance will be like using your scenario?. Sounds like a lot of round trips to the server?
pbrad
Posts: 781
Joined: Mon Jul 17, 2006 11:03 pm
Location: Ontario, Canada

Post by pbrad »

Hi,

I'm not really sure what you are talking about. This is a typical approach that I use for allowing users to easily choose the reference item prior to the creation of the object. It has nothing to do with resource usage or whether it is a web app or not. Although you should limit the number of items that show in the dropdown list to 5 or 10 max as you are really only looking for it to return 1 item but if you start typing in a number that matches the first number of a large number of reference items, it can slow it down, particularly if you have thousands of records but this is not a problem if you limit the return.

Pete
rocketman
Posts: 1252
Joined: Fri Jan 02, 2009 11:22 pm
Location: Preston UK
Contact:

Post by rocketman »

Hi Guys,

Flicking the "Execute dynamically switch (awareim supprot did the trick, I also tried doing my lookup via an interactive drop down and both together gave me the solution I was after - thanks to all.
technopak
Posts: 287
Joined: Thu Dec 04, 2008 2:16 pm

Post by technopak »

Hi,

Can someone explain exactly what switch to use to enable this feature ?

Using build 1162.

Thanks,

Peter
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Peter,

On a rule, click on the Adanced tab. You will see a checkbox toward the bottom of the page "use rule in dynamic re-calculation on forms".

Tom
technopak
Posts: 287
Joined: Thu Dec 04, 2008 2:16 pm

Post by technopak »

Thanks Tom,

I'm probably mis-interpreting the functionality of this technique, but I took it that I could use it to test if a form field is blank and provide instant feedback to users advising of the need to complete the field.

When I create the rule such as

'IF MyAttribute IS UNDEFINED THEN
call a process displaying a little warning',

nothing happens when the blank field loses focus. But when the user clicks the form's save button, the process warning message displays in a perpetual loop.

Any suggestions about what's going on or have I mis-understood ?

Peter
pbrad
Posts: 781
Joined: Mon Jul 17, 2006 11:03 pm
Location: Ontario, Canada

Post by pbrad »

Hi,

Are you running the most current version? Earlier versions had issues with dynamic updating.

Pete
technopak
Posts: 287
Joined: Thu Dec 04, 2008 2:16 pm

Post by technopak »

Hi Pete,

Yup I'm running 1162 :-)


Peter
Post Reply