Jump to content
  • 0

Can I run an OnDemand task from a button


Billp
 Share

Question

5 answers to this question

Recommended Posts

  • 0
On 11/2/2021 at 12:21 PM, Meekeee said:

Hi @Billp -  Tasks can only be configured by the Caspio user (owner, admin, internal user of your account). If you want to run a certain action from your application user, you may try Triggered Actions. You can check this for reference: https://howto.caspio.com/tables-and-views/triggered-actions/

Unless I'm missing something triggered actions only run on insert, update, delete of a record.  Tasks documentation reads like tasks are similar but you don't need to have a database event to trigger them.  They can be timed or run manually.  Can they be run programmatically based on a user action.  I'm not looking for the user to configure the task. 

Link to comment
Share on other sites

  • 0
8 minutes ago, Billp said:

Can they be run programmatically based on a user action.

I do not believe this is possible.

Like you mentioned previously, triggered actions only work on insert/update/delete actions, while Tasks can only be run on a set time/date or from clicking "Run Now" from the Bridge. 

What are you trying to do? Maybe we can help create a workaround to get you to a similar workflow that you had in mind.

Link to comment
Share on other sites

  • 0
On 11/3/2021 at 4:09 PM, kpcollier said:

I do not believe this is possible.

Like you mentioned previously, triggered actions only work on insert/update/delete actions, while Tasks can only be run on a set time/date or from clicking "Run Now" from the Bridge. 

What are you trying to do? Maybe we can help create a workaround to get you to a similar workflow that you had in mind.

I have a survey with a number of questions of different types.  When the user starts the survey I need to add a record to the EntrySurvey table as a header for the users set of answers.  I'd like to do this in one datapage and not have to have the user enter the parent record information, which is really only their email and the randomID using up one datapage to do it.  I'm also having trouble figuring out how to do the questions without a datapage each because they are of various forms like multiple choice checkbox, radio button type selection, free text, numbers, and each of the multiple choice and radio button types have different answer texts.  I can build the database for this pretty easily but getting it presented using Caspio (again I'm new to Caspio, not to programming) is proving a challenge to understand

Link to comment
Share on other sites

  • 0

BillP:

There should be no reason to do separate DataPages for each question, if I am understanding the above post. You just configure each question as needed from the panel on the left in the "Configure results" tab. I think that is just an issue of becoming familiar with Caspio.

The bigger issue, and one that I am also looking for a solution, is when you need records in more than one table for a new entry of any kind. To accomplish this, I used a DataPage with autosubmit to create a record and then pass parameters to a second datapage where the user entered information. This seems very awkward but accomplishes the task.

My issue is that I need the primary key value to pass to a second table. This can't be accomplished with an insert trigger because of referential integrity. The record must commit before that value is known, and that happens after the trigger executes. The insert trigger throws an error if I try to get the primary key and pass it on to a second table. I can only accomplish  that with an update trigger. My only solution currently is the autosubmit DataPage which commits the record so I can then use the primary key. I am hoping someone has a solution for this.

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...
 Share

×
×
  • Create New...