Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Deci 19 posts 48 karma points
    May 16, 2012 @ 20:06
    Deci
    0

    Selecting Multiple items from dropdown

    Hi, 

    I have created a datatype from 'Dropdown list multiple' and have tried this with and without Keys. The datatype is set to Integer.

    My list has only 4 items in it. In the content, I select 2 of the items and save to get:

    Conversion failed when converting the nvarchar value '34,35' to data type int

    Where/why is this conversion happening? I've not selected nvarchar anywhere and if you can't have an integer, why is it an option?
    All I want to do is in razor in the template, dependant on which items are selected (0 to all 4 of them), is display an image.
    I am obviously doing something very wrong here and I've not even got to the razor bit yet!
    Deci

  • Tom Fulton 2030 posts 4998 karma points c-trib
    May 16, 2012 @ 21:48
    Tom Fulton
    0

    Hi,

    You should change the datatype from Integer to nvarchar, as Integer won't be able to store comma separated strings.  

    You're right, for the Dropdown Multiple there probably shouldn't be an option for this :)

    -Tom

Please Sign in or register to post replies

Write your reply to:

Draft