Avatar of Aleks
Aleks
Flag for United States of America asked on

Replace value

I have the current code. The value passed is "Male" or "Female", but I need to change it to "1" or "2" accordingly.

This is my current code (Passes "Male" or "Female"

strXML2 = strXML2 & buildXML( "1petitionerdad.Gender" , rs_father_petitioner("Sex"), "" )

I am trying this:

     if rs_father_petitioner(campos(i)) = "Male" then
        strXML2 = strXML2 & buildXML( "1petitionerdad.Gender" , "1", "" )
        elseif rs_father_petitioner(campos(i)) = "Female" then
        strXML2 = strXML2 & buildXML( "1petitionerdad.Gender" , "2", "" )
     end if

But for some reason it is not working. Any ideas why ?
ASPWeb DevelopmentXML

Avatar of undefined
Last Comment
Big Monty

8/22/2022 - Mon
Ryan Chong

check what is needed for function: buildXML

and what's the value returned for: rs_father_petitioner(campos(i))

and use something like this:

 strXML2 = strXML2 & buildXML( "1petitionerdad.Gender" ,rs_father_petitioner(campos(i)) , "" )
ASKER CERTIFIED SOLUTION
Big Monty

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Your help has saved me hundreds of hours of internet surfing.
fblack61