I've looked at the code in the Microsoft Script Editor and in Visual Studio.
There's a parameter value, @transactionTypeId, that is set before it's passed
to the stored procedure. To get this value from the user, there's a label on
the Infopath form asking a question. Next to this question are two option
buttons, one for YES and the other for NO. They are both booleans, true or
false, and they are bound to a "myfield" called CPValue. The parameter,
@transactionTypeId, is assigned the value in CPValue and passed into the
stored procedure. What I can't find is how CPValue comes to equal a value of
1 or 2 before it's passed into the stored procedure (depending on which
option button was selected.) For the life of me I cannot find where this
CPValue is set to 1 or 2. The value of @transactionTypeId is not changed
inside the stored procedure -- it is passed in as either a 1 or a 2. I'm
completely new to Infopath, so it could very well be right in front of me.
Thanks for your help.
> Have you already taken a look at the code via the "Tools > Programming >
> Microsoft Script Editor" menu option? Or if the form was built with Visual
[quoted text clipped - 17 lines]
> > stored procedure? I'm having a bit of trouble getting off the ground with
> > this. Thanks in advance.
Tracey - 22 Aug 2006 16:18 GMT
I didn't mention that the CPValue field is a boolean. It's assigned to
@transactionTypeId which is passed into the stored procedure. There it
updates a field in a table and somehow magically equals a 1 or a 2, not a
true/false or 0/1...
> I've looked at the code in the Microsoft Script Editor and in Visual Studio.
> There's a parameter value, @transactionTypeId, that is set before it's passed
[quoted text clipped - 32 lines]
> > > stored procedure? I'm having a bit of trouble getting off the ground with
> > > this. Thanks in advance.
S.Y.M. Wong-A-Ton - 23 Aug 2006 08:06 GMT
Double-click on the option button to open its Properties dialog box. On the
"Data" tab you'll see a field with the label "Value when selected". The value
that is given in the corresponding textbox behind this label is the value
that will be used for the option button when it is selected.
---
S.Y.M. Wong-A-Ton
> I didn't mention that the CPValue field is a boolean. It's assigned to
> @transactionTypeId which is passed into the stored procedure. There it
[quoted text clipped - 37 lines]
> > > > stored procedure? I'm having a bit of trouble getting off the ground with
> > > > this. Thanks in advance.
Tracey - 23 Aug 2006 14:49 GMT
I looked at the option button Data tabs and I found that the "value when
selected" for each option were booleans, True and False, not 1 or 2 as being
passed into the stored procedure. I looked again at where the parameter
value is set and saw that I had overlooked the answer when I looked at this
earlier. The CPValue (boolean) is passed to a function called
TranslateTransactionType, which returns the integer value 1 or 2 and assigns
it to the parameter, which is then passed to the stored procedure.
params(3) = New SqlParameter("@transactionTypeID",
TranslateTransactionType(loanReview.ReviewInfomation.ComplianceQuestions.ConsumerPurpose.CPValue))
Thanks again for all of your help.
> Double-click on the option button to open its Properties dialog box. On the
> "Data" tab you'll see a field with the label "Value when selected". The value
[quoted text clipped - 44 lines]
> > > > > stored procedure? I'm having a bit of trouble getting off the ground with
> > > > > this. Thanks in advance.