New form button functionality in build 1161

Contains tips for configurators working with Aware IM
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

New form button functionality in build 1161

Post by tford »

Build 1161 now has the a very useful improvement which allows you to:
1) incorporate a custom button info a form in an HTML cell
2) turn off other buttons

The image below shows a custom button beside a dropdown attribute:

Image

Below are the notes that Support provided to me for this new feature:

In this build #1161, you can hide standard buttons and provide your own HTML buttons that not only start a process with the current object as a parameter but optionally save the form. This is not documented yet, but will be in the upcoming release. The syntax is:

AwareApp.startProcessFromForm (processName, renderOption, htmlElem, saveFlag)

processName - name of the process to start

renderOption - where to redirect the result of the process. Either 'main' or 'new_tab' or panel id. Panel id can be obtained with the following method: AwareApp.getPanelId (frameType, tabName, panelName)

htmlElem - the HTML element that was clicked on the form. This is usually "this"

saveFlag - if true will save the form

Example:
<button type="button" onclick="AwareApp.startProcessFromForm('MyProcess', 'main', this, true)" >Start</button>


Enjoy!
Tom
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

One handy application of this new function is to have a button labeled "Clear" & attach a process to it that clears certain attributes of a form back to undefined. The same concept would apply to "Reset to default" if you have default values for a form.

Tom
himanshu
Posts: 723
Joined: Thu Jun 19, 2008 6:24 am
Location: India
Contact:

Post by himanshu »

Hi Tom,

what i am seeing in the snapshot above is wonderful. This show's how solid platform AwareIM for any development. it seems to be the same concept you are told me on my 'thumbnail viewer' forum, to use or integrate the chart with the awareIM.

i am very impressed with your work and excited too, if you please like to share with me or guide to ingrate like this it'll be highly appreciable. Near future i also be looking to integrate myself much more features to make out application rock solid!.

Thanks & Great Work :)
From,
Himanshu Jain


AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Himanshu,

It's a bit too complicated to tell about on the forums. I think I replied with t a general outline on your other post.

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

Post by technopak »

A very nice new feature indeed !

Is it also possible to use a button with a standard link to Aware IM operations (as described in the User Guide, Appendix D) to initialise other supported functions ?

I've tried a few with no success


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

Post by tford »

Yes, you can use buttons with Appendix D operations.

For example, I put this HTML in a form's HTML cell and it worked
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

oops.

This worked to create a button which will present a form in the main panel to create a new instance of MyObject:

<button type="button" onclick="AwareApp.newObject('MyObject', 'main')">Create MyObject</button>

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

Post by technopak »

Mmm thanks Tom, so I must be doing something wrong -

When I tried your earlier example of using a button to start a simple process which only displays a message and does nothing else, the system displays the message correctly and then creates a second instance of the original form behind the original form which is still on screen. The logs show the process as being suspended with no reason why.

The exact syntax I used was

<button type="button" onclick="AwareApp.startProcessFromForm('ProcTest','new_tab', this, false)" >Display the Message</button>

I had this code placed in a HTML cell of an object's form.

When I clicked the button, the unexpected bahviour happened.

What could be going on, or what is it that I'm not understanding ?
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Have you tried instead of 'main' instead of 'new_tab'?

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

Post by technopak »

Hi Tom,

Yup I've tried 'main' and also setting the saveFlag attribute to true, but all and any permutation seem to cause a new instance of my original form to appear.

Worse still, I'm trying to use this technique to produce a history of items for customers (using a query) with the original form elements as input for the query. And I can't even get it to display a message successfully !!
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Can you explain a bit more about the BO, form, process rules & visual perspective involved?
kklosson
Posts: 1628
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Post by kklosson »

Tom,

Thanks for this post. Also, I haven't delved into graphs yet but I will soon. Is that a native IM Aware graph in the screen shot? If so, it's very nice looking!

Thanks again for all you do in this forum.
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

kklosson,

No, these graphs are Fusion Charts graphs driven by AwareIM data.

I've worked to develop a "proof of concept" which shows that you can use AwareIM to create XML files from information stored AwareIM & then display the results in AwareIM forms and queries. This uses a combination of HTML stored in plain text AwareIM attributes and SWFs stored on the AwareIM server. I have been successful in preliminary proof of concept integrating:

1) Charts & widgets at http://www.fusioncharts.com/free/
2) Calendar at http://www.usflashmap.com/products/flas ... ar_pro.htm

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

Post by aware_support »

This is for technopak. Please check your process. It must be doing something else other than displaying a message.
Aware IM Support Team
technopak
Posts: 287
Joined: Thu Dec 04, 2008 2:16 pm

Post by technopak »

Hi everyone,

My process had only one rule - DISPLAY MESSAGE 'Can you see this ?'

I have discovered where things were going wrong for me - I have installed the latest version of Aware IM over a previous installation and imported a version of my BSV created in the previous installation.


None of the new functions work for the forms of the imported BSV. However, if I create a new form in the imported version, the new functions work perfectly for that new element.

Thanks to all who contribute to the forums, they are very informative and useful. Keep up the good work !
Post Reply