Something went wrong while trying to load the full version of this site. Try hard-refreshing this page to fix the error.

New form button functionality in build 1161

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:

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

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

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 🙂


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

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

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

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

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

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

Tom


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

Can you explain a bit more about the BO, form, process rules & visual perspective involved?


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

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/flash_calendar/flash_calendar_pro.htm

Tom


aware_support

This is for technopak. Please check your process. It must be doing something else other than displaying a message.


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 !


tford

See also Steve's post that shows starting a process from a form using an <a> tag instead of a <button> tag:


tford

One more addition from support:

You can also use a button to:
1) start a process
2) go to a specified tab

Example:

<button type="button" onclick="AwareApp.startProcessFromForm('ProcessName', 'main', this, true); AwareApp.m_mainTabPanel.setActiveTab (AwareApp.getTabPanelId ('myframe', 'mytab'));" >Refresh</button>

where:
myframe = frame name. This will usually be 'main'. Note that 'main' has to be lower case.

mytab = name of tab you want to position to

The tab will be switched straight away without waiting for the process to finish.

Very slick!


himanshu

Hi Tom,

r u running AwareIM 4.1 (1184) ver or AwareIM 4.5 (1184)...please correct your footer..

8-)