I'm having an odd problem where I'm trying to conditionall call either an Insert or an Update stored procedure on some data based on the value of a hidden field called "RecordExists."
When the user's a new user, then the SQL bind on form render won't find anything to pre-populate the field, so it's default value of "N" should remain. This field is bound to a column that's hard-coded to "Y" when it returns a record, so I should be able to tell whether this is an existing customer by the value of this field (Y or N).
One other datapoint. When I had only the UPDATE event (and it was unconditional), it fired and ran fine -- but obviously, it wasn't working for new customers, since they have nothing to update.
I have 2 form completion events, one that calls Insert based on a value of "N" in RecordExists (equals N), and one that calls an update based on the value in RecordExists of (not equals N).
However, in debug mode, I can see that neither even fires in either case.
I would have thought that one event should always fire, because RecordExists will eithger equal N or it won't every time.
Any thoughts on what I'm doing wrong?