Jump to content
  • 0

Update Trigger not working unless update twice



Hoping someone can help me.  I have two tables and the first table has a trigger as shown below:


The trouble i am having is that this trigger only seems to update the needed fields if i do the Update action, meaning i am hitting the Update button on my Caspio datapage, twice.   Anyone know why this is happening?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

I am posting b/c I am experiencing the very same thing, though I know what the problem is in my case. The trigger will delete any content already existing in that field after the first UPDATE, but doesn't actually populate with my data unless I go back and hit UPDATE again. If there's nothing already in the spot that I'm trying to update, it seems like it does nothing since there's nothing to delete; but it only adds the data if I hit UPDATE again. 

My trigger can't actually work after the first UPDATE b/c the first update includes submitting the Y for the field. So at time of submittal, there's no Y yet written to the database. When you go back in again and click UPDATE a second time, then the trigger works b/c both SCHEDULE and Y are in the correct fields.

I'm still trying to think of alternatives for conditions to meet to make this work properly, but I thought I'd at least post an explanation for what might be going wrong for others who might come across this post looking for an answer to the same kind of question.


Link to comment
Share on other sites

  • 0

I  have similar cases on this one but only if the table I have used on the join is the actual table instead of the #inserted, thus I don't have an actual idea as well on why it only prompts on the 2nd update. 

Are you updating your records directly from the datapage level? If yes, try updating it directly on the table and see if you will also need to double the update before the trigger prompts. It could be that the problem is in datapage level.

Try clearing the cache as well whenever the datapage is acting strange.

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.

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.

  • Create New...