Calling Aware direct with a parameter for query

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
CalD
Posts: 146
Joined: Sun May 08, 2016 10:20 pm

Calling Aware direct with a parameter for query

Post by CalD »

Hi Guys,

sure this is a stupid question...
Is is possible by way of a URL to call aware directly from a static html page, pass it a query name and parameter for the query. Effectively login as a "Guest" and display the query result?

I can login as a guest and ask for the parameter then display the result, but my client wants to be able to maintain the page the users enter the parameter on external from aware...

I searched the forum and the pdfs but can't quite get it, found appendix D in the user guide "Links to aware operations" but this looks like it is only relevant for a logged in user...

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

Re: Calling Aware direct with a parameter for query

Post by aware_support »

Please look at the firstCommand URL parameter - it may have what you want. Search the User Guide for "firstCommand"
Aware IM Support Team
CalD
Posts: 146
Joined: Sun May 08, 2016 10:20 pm

Re: Calling Aware direct with a parameter for query

Post by CalD »

Thanks Support, I had found that but couldn't get it to work initially, now I have it working though - I was initialising a non persistent BO and it doesn't seem to like that... but with persist-ency it does work, I have setup a test using firstCommand and startProcessWithInit, it is doing what I need it to.

I tried to get runQueryWithParams to work but to no avail, how are the params for this one expected to be formatted? or will this not work as a URL...?

Callum
BobK
Posts: 545
Joined: Thu Jan 31, 2008 2:14 pm
Location: Cincinnati, Ohio, USA

Re: Calling Aware direct with a parameter for query

Post by BobK »

I have used the firstCommand along with startProcessWithInit in an URL and thought that changing startProcessWithInit to runQueryWithParams and changing the other parameters as necessary would be, as Bruce would say, easy peasy. But I too, could not get it to work.

My URL looked like:

Code: Select all

http://localhost:8080/AwareIM/logonGuest.aw?domain=TEST&firstCommand=runQueryWithParams,TheQuery,Parameter=abc,main
That URL logged me in as a guest and ran TheQuery, but the Parameter was ignored and all of the data in the table was displayed. I tried other variations for the URL, but no joy.

The following is from aware_full.js

Code: Select all

// promptValues is a hashtable of name/value pairs where name is the prompt name
runQueryWithParams: function (queryName, promptValues, renderOption)
So the second parameter to runQueryWithParams is a hashtable! How do you put a hashtable in a URL? Is it even possible?
Bob
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Calling Aware direct with a parameter for query

Post by aware_support »

You cannot use runQueryWithParams in "firstCommand", but you can start a process that would run the query.
Aware IM Support Team
CalD
Posts: 146
Joined: Sun May 08, 2016 10:20 pm

Re: Calling Aware direct with a parameter for query

Post by CalD »

Thanks Bob, I had gone through the same pain... Good to have support confirm the correct way to go about it
Post Reply