Jump to content
  • 0

How to open a record for editing but save it as a new record....?


Question

What I need to do:  

I have a table with a large amount of data per record.  When the user goes to make their daily task (a form that makes a new record)  I need them to see the blank form that has yesterdays submission pre-populated in it.  The user then merely has to make todays edits and save it.

Parameters:  126 x 3 fields need to be brought over to the new daily form, 2 checkboxes and 1 255 Text field.

Known Issues: there is a 32k limit on passing external parameters from one datapage to another.  

What I have tried:

Made a Report Details page that can find yesterdays submission and load it all as HIDDEN, then set the fields I want to move to the next Datapage as OnExit Parameters.  Current issue is I need to automate the UPDATE button on the report page so users don't have to hit it to continue to the actual submission form.  Second issue is that if there is a LOT of entries in that particular record, it can exceed the 32k limit and then a lot of fields get dropped.

I would appreciate any ideas on a better method or how to fix the issues....

Steve Fraden

 

Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 1
17 hours ago, sfraden said:

Unfortunately neither of those will work, they are both after the fact options....

Not sure what did you mean by this...

Anyway, you may use JS timeout() function to click on "Update" button instead of the user.

<script>

setTimeout(()=> {

document.querySelector("input[id^='Mod0EditRecord']").click();

}, 2000)

</script>

 

Link to post
Share on other sites
  • 0
On 12/25/2020 at 7:48 AM, Vitalikssssss said:

Not sure what did you mean by this...

Anyway, you may use JS timeout() function to click on "Update" button instead of the user.


<script>

setTimeout(()=> {

document.querySelector("input[id^='Mod0EditRecord']").click();

}, 2000)

</script>

 

Thanks, that solves the one issue, of auto submitting, but not the other.

When the user goes to make a new submission, they open a datapage to do it.  I need that new submission page to be pre-populated with yesterdays data.  Triggered events only occur AFTER the user hits 'SUBMIT', and tasks only occur on a timed basis, so neither of these can populate the fields of a submission form after loading the form.....

 

Link to post
Share on other sites
  • 0
19 hours ago, sfraden said:

Thanks, that solves the one issue, of auto submitting, but not the other.

When the user goes to make a new submission, they open a datapage to do it.  I need that new submission page to be pre-populated with yesterdays data.  Triggered events only occur AFTER the user hits 'SUBMIT', and tasks only occur on a timed basis, so neither of these can populate the fields of a submission form after loading the form.....

 

Actually, you can base your Triggered Action on the table that is used as data source for the Details Datapage on which you would like to incorporate the JavaScript snippet to click on the "Update" button. You can create a Triggered action that runs "on update" and inserts the data from one table to another. You would need to use "Single Record Update" Datapage to redirect the user  after "Update" button clicked, since the record will be created by the Triggered Action and user just need to confirm/edit the values that was inserted by Triggered Action.

Regards,

Vitalikssssss

 

Link to post
Share on other sites
  • 0
On 12/28/2020 at 8:22 AM, Vitalikssssss said:

Actually, you can base your Triggered Action on the table that is used as data source for the Details Datapage on which you would like to incorporate the JavaScript snippet to click on the "Update" button. You can create a Triggered action that runs "on update" and inserts the data from one table to another. You would need to use "Single Record Update" Datapage to redirect the user  after "Update" button clicked, since the record will be created by the Triggered Action and user just need to confirm/edit the values that was inserted by Triggered Action.

Regards,

Vitalikssssss

 

I see where your going with this, and if the database was not already crammed with data from 500 different locations, it might work.  Also not sure how to make a triggered action to do just that, as I already have the below as a TA right now (Thats just one section pictured, multiply it 126 more times, and its about to double in size too)  Any TA that runs to do what you think it can, can only run under certain conditions:  Only if the user is inside a particular datapage, and can only execute once per day.  I have a LOT of different datapages that can trigger an update response in this table, and anything that creates a new entry cannot be duplicated.

image.thumb.png.8c34150645df2f6537c535590d9134f1.png

Link to post
Share on other sites
  • -1
On 12/23/2020 at 4:29 AM, Vitalikssssss said:

Hi @sfraden,

I guess you should consider using Triggered Actions for your workflow rather than stick with the concept of passing parameters.

You may also consider using Application Tasks if you would like to have automated operation within Caspio tables.

Hope this helps.

Regards,

vitalikssssss

 

Unfortunately neither of those will work, they are both after the fact options....

Link to post
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...