SQL Validation Parameter Not Passed
Last Post 10-11-2012 04:47 AM by Ryan Bakerink. 3 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
Jim MUser is Offline
wading in the water
wading in the water
Posts:20
Avatar

--
10-09-2012 09:27 AM

    Hi,

    I have another small issue with my Dynamic Registration Form in that I require the person registering to enter a six character code in a text box.

    I have an SP that checks that it is valid. It works great if the user enters something in the text box, either valid or otherwise. The SP works fine in this instance.

    However, if the user leaves the text box blank then the actual $(CodeUsed) string is passed to the SP and not a blank value. I can obviously have my SP check

    IF @CodeUsed = '$(Code' BEGIN

    but this is not ideal. Anyone give me a clue as to what I am doing wrong?

    Thanks,

    Jim.

    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    10-09-2012 10:33 AM
    Hello Jim,

    I've experienced this issue with Dynamic Registration. I feel as though this is a small bug that doesn't replace a token with '' if blank. Instead it returns the $(TokenName)

    Here's what I've done:

    IF @CodeUsed NOT LIKE '%(TokenName)%'
    BEGIN
    Select 'True' As IsValid
    END
    ELSE
    BEGIN
    Select 'False' As IsValid
    END

    I prefer to use Like (TokenName) without the $ to ensure that if the token doesn't render and the token call itself is rendered, then I have a condition for that.

    Please let me know if you have any questions.

    Thanks,

    Ryan



    Jim MUser is Offline
    wading in the water
    wading in the water
    Posts:20
    Avatar

    --
    10-10-2012 11:57 PM

    Hi Ryan,

    Thanks for the response. Your solution was essentially what I have since done. Good to know that I wasn't going wrong somewhere!

    Jim.

     

    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    10-11-2012 04:47 AM
    Hello Jim,

    You're right on track with Dynamic Registration and SQL Validations.

    If you have any additional questions please let me know.

    Hope you have a great day.

    Ryan


    ---
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi