Announcement

Collapse
No announcement yet.

validation + type of field + saving list to use later

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • validation + type of field + saving list to use later

    hello guys,
    today i have 3 tiny quetions wihle using sc i want to clear the doube about them
    when creating a list field in sc, i have the option to manually define the values, that is fine... i want to make it required, and the validation not to allow the first selection (the default) to be left as is, for my case is: "Select" then how i can disallow this first default value? or what i can do in order to make the user to select from the list??

    next, is it okay to create all varchar in database fields (original fields) then from sc control which is integrer or date or anything else? is that fine? what impact will happen later in this case? becasue, it is offcourse much easier to create original fields all using varchar for example, then from SC to customize them as the applications need? is that ok? or i will have some other sort of problems later?

    ok,, one last thing for now, the list that is used to manually feed the list field lookup feature... there is an option to save it to use later.... when clicking on save, it gives me select destination "public" "project" and "user" what does this mean? what is the different between public?? i don't want end users to see my mess

    thanks in advanced, awaiting for these clarifications...


    Mike

  • #2
    1. In the same section where you select the list set the use title option to on. Enter 'please select...' as Title.
    2. You can but I don't recommend. PHP is more-or-less typeless but you might encounter problems later. i.e. if you want to do calculations in your sql.
    3. You can save your selection with scope. If this is project it will be only selectable from your project. If you set it public then you can use it from other projects you create.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      fine, that is understood Alber thanks a lot indeed

      again, if i select enum in the database and put all selection options in the database, then, in SC it just gives me that is varchar and i have to re-write all the options again! after changing it to "select"

      in this case why should i put it as enum in db? and select options initially in db which is not going to be used, then in SC do that same one more time and SC will control it afterall

      Comment


      • #4
        This question has been asked before and answered. Enum is not a type of field but kind of constraint. When you insert a value it will be validated against the enum on database level. That's complete different than a select box. There you can assign a lookup table to get the values filled automatically or manually where you put them in yourself.

        Unless your database needs to meet certain quality standards I would no supply constraints for that. But if not, just stick to the standard fieldtypes like (var)char, integer, numeric, (long)text etc.
        Albert Drent
        aducom software netherlands
        scriptcase partner, reseller, support and (turn-key) development
        www.scriptcase.eu / www.scriptcase.nl

        Comment


        • #5
          yes Albert you are right, I asked this before, I'm still confused sometimes regarding the field types, you know this is SC syndromes and trying to understand it all + i'm not so familiar with SQL basics

          thanks again, i will just use varchar for all and customize the rest from SC, except for integer and date fields, hence, will make them as INT and DATE in db itself...

          appreciated your time, you are so helpful, I'm yet exploring the SC as per the available and enjoying its powerful functions, so might need some help and explanation from time to time

          Comment

          Working...
          X