Solution for a Web Landing Page for Data Entry

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Jaymer
Posts: 2450
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Solution for a Web Landing Page for Data Entry

Post by Jaymer »

Skip to solution

Lets say a customer wants to have aware collect data from the public, initiated by a link on their web page.

I'm confused as to the best way to do this.
EDIT: This must work in a SAAS environment.

Assume:
* the link will be -e encrypted
* I'd like a thank you page after the submit to be display

1) Guest Login? I can't hardcode guest to always go to this 1 form. What if I need another form? how does aware know where to go?
2) If I make another user to use in the login, and I already am using a FirstCommand in my VP to init things for my App, how do I make my Entry form come up - What happens if there is a FirstCommand ALSO in the URL? which runs?
3) make a VP. And a new user/access level that this VP responds to.

ideas?
thx

--> jaymerTip
Last edited by Jaymer on Sun Nov 17, 2019 9:48 pm, edited 5 times in total.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
customaware
Posts: 2401
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Web Landing Page - confused

Post by customaware »

I would use Guest ID with Session IDs
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
Jaymer
Posts: 2450
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Web Landing Page - confused

Post by Jaymer »

since i'm confused, i'm looking for ideas of exactly what to do.
how does logging in as Guest get me to where I need to be... specifically?
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
ACDC
Posts: 1142
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Re: Web Landing Page - confused

Post by ACDC »

I have done this before, had a complete upload document and submit for quotation based on a whole lot of options on the customer's website with a "thank you" message at the end

On the customer's website, set up a page with an iframe containing a link to your aware server, your app will run as normal in this iframe (setup a custom perspective for the app matching the website IFRAME space and your workflow) The guest is automatically logged in to the guest website perspective with prompts or menu option
Jaymer
Posts: 2450
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Web Landing Page - confused

Post by Jaymer »

ACDC, thanks, but I need more.

HOW are you making things in Aware start?
HOW is that process getting started from the URL?
... firstcommand
... startprocesswithinit

Does the VP have an EMPTY content panel, or does it use "show output of process xxx"?
What user was actually getting logged in?
This must handle multiple TENANTS.

Mark's reply above using a Guest login is a non-starter, per the requirements, as I may have "another" operation next week and can't have Guest access hardcoded for only a single use. Mark acknowledged he had never used URL access to get in, so had no idea of those options.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
ACDC
Posts: 1142
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Re: Web Landing Page - confused

Post by ACDC »

The initial visit was conducted as a Guest and then registered the visitor as a user
HOW are you making things in Aware start?
I was using this type of link, set to a user assigned to the Guest Perspective
logonOp.aw?domain=CRM&userName=jane&password=jane&testingMode=false

Then in the Guest perspective had a menu of 5 buttons providing options to the web visitor
somewhere in the process the user was registered as a Contact user with Account and further interaction with the visitor took place as a registered user via email delivered login details
Jaymer
Posts: 2450
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Web Landing Page - confused

Post by Jaymer »

ACDC
right... i'm logging in as a real user, of a LandingPage access level, so I get a VP just for these types of logins.
I can't have a menu - the nature of the Landing Page is an Entry Form with just a Submit (and/or Cancel).

In addition to what we both have (so far) in the URL, there's options for
USING logonOp.aw:
firstcommand
startprocess2
startprocesswithinit

and (un-documented) logonOp.awsp --- don't exactly know what this does. Getting errors trying to use it in v8.1

and the VP can have:
Initialization Process,
firstcommand
or a content panel can use "Display results of a process" - which could find/create a rec and present a form for editing.

Many ways... am seeking those who have used these for best practices.
Seems like I'm trying to re-invent the wheel here - surely someone has done lots of this already.
Has to be pros/cons to doing these.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
ACDC
Posts: 1142
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Re: Web Landing Page - confused

Post by ACDC »

i'm logging in as a real user, of a LandingPage access level, so I get a VP just for these types of logins.
I can't have a menu - the nature of the Landing Page is an Entry Form with just a Submit (and/or Cancel).
You could use "Run Command After Startup" to start the process in the VP setup under themes and settings
Jaymer
Posts: 2450
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Non Saas Solution

Post by Jaymer »

Here's what I found as the easiest solution -- NON-Saas (as there is no way to tell which Tenant this data collection is for using this method)

Generic URL
website.com:8080/AwareIM/logonOp.aw?domain=theApp&userName=WebLandingPage&password=xyzzy

This user "WebLandingPage" has a specific access level.
That AL is assigned to a specific VP.
VP has a 1 frame, 1 tab and a content panel set to:
DISPLAY RESULTS OF COMMAND: Create Object (object and form specified)

At logon, form displays.
SAVE button is set to:
[x] Execute process after save (to send them a confirmation)
[x] Close form after save (close out of Aware)

Only problem is that you cannot DISPLAY MESSAGE "Thanks for your submission" because the form has already been closed AND THEN it runs the process.
I tried NOT closing the FORM AFTER SAVE, but having syntax problems with EXEC_SCRIPT to close the window after the Message - but this will be the ideal way once that is figured out.

If you don't close the form, it will loop for continuous data entry.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Posts: 2450
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Saas Option

Post by Jaymer »

SaaS is harder, because you have to encrypt data into the URL to know which Tenant the data is for.

I build the link in the tenant file to be emailed to someone or displayed on the screen to copy/paste for their web guy.

BO_Tenant.the_LP_link=
'url=https://'+SystemSettings.SystemURL+'logonOp.aw?e=' +
ENCRYPT_B64('domain=theBSV&userName=LandingPage&password=xyzzy&testingMode=false&firstCommand=startProcessWithInit,TheLandingPage,main,BO_LandingPage_Parms&Tenant='+
AS_STRING(LoggedInRegularUser.ps_ActingAsTenant.ID)

So,
I have a user to login -> LandingPage (again, tied to a specific VP)
firstcommand -> startProcessWithInit
the start process -> TheLandingPage
create instance in BO -> BO_LandingPage_Parms
Set field in BO -> Tenant


Process "TheLandingPage":
(now has access to passed in parameter: BO_LandingPage_Parms.Tenant)
FIND Tenant WHERE Tenant.ID = BO_LandingPage_Parms.Tenant
ENTER NEW LP_Lead WITH LP_Lead.ob_Tenant = Tenant USING xxxx
DISPLAY MESSAGE "Thanks"
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: Solution for a Web Landing Page for Data Entry

Post by tford »

At logon, form displays.
SAVE button is set to:
[x] Execute process after save (to send them a confirmation)
[x] Close form after save (close out of Aware)

Only problem is that you cannot DISPLAY MESSAGE "Thanks for your submission" because the form has already been closed AND THEN it runs the process.
I tried NOT closing the FORM AFTER SAVE, but having syntax problems with EXEC_SCRIPT to close the window after the Message - but this will be the ideal way once that is figured out.

If you don't close the form, it will loop for continuous data entry.
Have you considered DISPLAY PERSPECTIVE or DISPLAY LAYOUT to show "Thanks for your submission" ?
Tom - V8.8 build 3137 - MySql / PostGres
Jaymer
Posts: 2450
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Solution for a Web Landing Page for Data Entry

Post by Jaymer »

tford wrote:Have you considered DISPLAY PERSPECTIVE or DISPLAY LAYOUT to show "Thanks for your submission" ?
Just did. Neither worked.
Right after the Save button, it closes and shows my browser Home Page.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
PointsWell
Posts: 1458
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Solution for a Web Landing Page for Data Entry

Post by PointsWell »

Jaymer wrote:
tford wrote:Have you considered DISPLAY PERSPECTIVE or DISPLAY LAYOUT to show "Thanks for your submission" ?
Just did. Neither worked.
Right after the Save button, it closes and shows my browser Home Page.
I have run into this problem before, which is why I paid for the update that allowed the Start Process operation to have the Save option added.

When you use the Run Process after Save on the Save operation and have it switch to different forms or views you get unpredictable outcomes (browser dependent - I did all my testing on the built in browser and it worked as expected, I then did testing on Safari and all Run Process after Save were logging me out.).

It seems that the Run Process After Save is not designed for navigational type processes (I am assuming, Vlad didn't really explain why it didn't work he only said it was intended for processes like validating other objects etc and not displaying forms).

To use the Save option on a Start Process operation requires that you approach things differently - you need to create the object first then view (Start Process is not an available option on NEW BOs). The added benefit of this is that the process can be directed to Same Panel, Default, New Tab etc. whereas Run Process After Save cannot be directed
Jaymer
Posts: 2450
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Solution for a Web Landing Page for Data Entry

Post by Jaymer »

Sean
thx for the info.
In my particular case (Landing Page to gather info), I'll be doing away with the "Close form after Save" once I have the Javascript from JT to close the window.
Visually, I get a spinner while the data is saved and Email is sent, the form clears, and then the Thanks dialog appears.
After that I'll close the window and all will be good.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Posts: 2450
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Solution for a Web Landing Page for Data Entry

Post by Jaymer »

I gave up on trying to close the window.
I DO NOT close the form after save.
In the process RUN AFTER SAVE, I DISPLAY LAYOUT xxx from VP_xxx to show a HTML static page that says thank you.
I added a button to take them to the company home page.

thx for the help
jaymer...
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Post Reply