Jump to content
  • 0

Prompting User to Create an Association between Two Tables


wimtracking2

Question

Hello - I am looking for a way to improve the user experience on my app. I have two tables, Table 1 = Programs, Table 2 = Sites.  A user is able to create a new record to the Programs table using a submission datapage. From there they are directed to the Programs webpage. On the Programs webpage the user can edit the Program record using a form datapage and they can assign a Site (from the Sites Table) to that Program. This is done with a submission datapage that takes the Program ID and Site ID and stores them in a third table. If the Site they would like to assign to the Program does not exist, they can add a new Site to the Site Table and then assign the Site to the Program. See screenshot 1 of current set up when there is no Site to Program association (top) and (bottom) when there is a Site to Program association. 

1. I want to prompt the user to create the program to site association if in the Program record Site or Patient Home does not equal Patient Home AND if there is currently NO active site associated to the Program. The prompt would happen if the user tries to exit the webpage without an active Site association (or is there a better prompt option?).

2. Are there any suggestions on the flow/user experience regarding the assignment of a current Site versus Adding a New Site and then making that association. Is there a way to add a new Site and also assign it at the same time?

 

 

 

Screenshot 1.png

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Can I just check my understanding? In the screen shots, are these the webpages with two caspio datapages deployed in both instances, and what you're trying is to connect the second datapage into the workflow of the top for both webpages? 

 

Link to comment
Share on other sites

  • 0

My thoughts... Not sure what you've tried

For the first step, have you tried making the site or patient a mandatory field with a custom look up that allows "Add a site" set a unique custom value for this that won't equal any of your site IDs.

Create a virtual field that if "Add a site" selected, returns the path for your add site page; otherwise returns the program table page;

Then set go to page as the virtual field you just created.

That should without any JS send the user to the right data page. You could pass the program parameter that created the site, and if you have the user continue a flow all the way through to the program table where they have to submit the table, you could also pass the program id without any JS code. Otherwise you could create a variable on your site table that flags the initiating programid (still pass parameter into this), and then run a trigger on site table insert that adds that to the correct program

Hope this helps

Link to comment
Share on other sites

  • 0
On 6/3/2023 at 4:25 PM, Jodie said:

Can I just check my understanding? In the screen shots, are these the webpages with two caspio datapages deployed in both instances, and what you're trying is to connect the second datapage into the workflow of the top for both webpages? 

 

Hi @Jodie I have updated my question and the screenshot attached. There is one webpage in the screenshot and there are three datapages deployed. Datapage 1 = Form (Programs Table), Datapage 2 = Form (Assigning a Program to a Site) Datapage 3 = Report (Report of the Programs Assigned to a Site). I'd like to check the data behind Datapage 1 (Does Site or Patient Home not equal Patient Home) and if yes, check the data behind Datapage 3 (is there a Program to Site association) and if no, prompt the user to make an association.

Link to comment
Share on other sites

  • 0
On 6/3/2023 at 4:36 PM, Jodie said:

My thoughts... Not sure what you've tried

For the first step, have you tried making the site or patient a mandatory field with a custom look up that allows "Add a site" set a unique custom value for this that won't equal any of your site IDs.

Create a virtual field that if "Add a site" selected, returns the path for your add site page; otherwise returns the program table page;

Then set go to page as the virtual field you just created.

That should without any JS send the user to the right data page. You could pass the program parameter that created the site, and if you have the user continue a flow all the way through to the program table where they have to submit the table, you could also pass the program id without any JS code. Otherwise you could create a variable on your site table that flags the initiating programid (still pass parameter into this), and then run a trigger on site table insert that adds that to the correct program

Hope this helps

Hi @Jodie This was very helpful. I was able to improve the workflow using your suggestions of the virtual fields and triggered actions. Thank you for the help!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...