Suneido

Integrated Application Platform

  • Home
  • Learning
    • Suneido Manual
    • Beginners
      • Inside Suneido
      • The Suneido Programming Language
      • The Suneido Database
      • Installing Suneido
      • Building Suneido
      • IDE Go To Tour
      • Upgrading To A New Release
    • Advanced
      • Canvas Control
      • DrawControl Part 1
      • DrawControl Part 2
      • DrawControl Part 3
      • SAX Like XML Processing
      • A Plug-In Architecture
      • A Simple Wizard Framework
      • An HTML Include Facility
      • An RSS 2 Feed Creator
      • MIME Generation
      • A New Add-on Facility
      • Workspace Improvement Hack
    • Mockito for Suneido
    • The Suneido Task Scheduler
    • Contributing To Suneido
    • Contributor Assignment of Copyright
    • Language Translation
    • Future Directions
    • Interview With Andrew Mckinlay
  • Forum
    • Announcements
    • Internals & Enhancements
    • Cookbook
    • General
  • FAQ
  • Screenshots
  • Downloads
  • Links

ChooseList not "set"ting

Integrated Application Platform › Forums › General › ChooseList not "set"ting

  • This topic has 4 replies, 2 voices, and was last updated 9 years, 8 months ago by ajith.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • May 27, 2013 at 6:20 pm #752
    ajith
    Participant

    Hi,

    I have a field sT_Type in the table StkTrades with the following field definition

    Field_string
    {
    Prompt: "Trade Type"
    Control: #(ChooseList list: #('Long','Short'), set: 'Long' )
    }

    When I open the table using AccessControl(‘StkTrades’), the field value is not set to Long.
    However, if, from WorkSpace, I run the code

    ChooseListControl( list: #('Long','Short') , set: 'Long' )

    the value is set.
    Similarly, the selectFirst: true is also not setting the value from inside Access.

    What is wrong?

    Thanks in advance,
    ajith

    May 27, 2013 at 9:34 pm #979
    amckinlay
    Keymaster

    I think probably AccessControl is setting the control from the data. On a new record, the data will be “”.

    One way to get a default in an Access is to rename the field (in the query) e.g. to sT_Type_default and then to create Rule_sT_Type_default which is simply function () { return ‘Long’ }

    (It is possible to put the rule on the actual field name, but this can be confusing so it is better to rename.)

    May 28, 2013 at 9:13 am #980
    ajith
    Participant

    Hi Andrew,

    Thanks for the reply. I have left out the set: option and is using a rule to provide the default value. However, I am not renaming the field as you have suggested. I did not understand why it can be confusing to put the rule on the original field name (especiually if set: option is left out).
    ajith

    May 28, 2013 at 2:23 pm #981
    amckinlay
    Keymaster

    If the rule is on the actual field, then it will always be applied. For example, if you look at the table in QueryView you will not be able to see if the field is empty or not because the rule will always show a value.

    May 28, 2013 at 2:51 pm #982
    ajith
    Participant

    Hello Andrew,
    Thanks for clarifying
    ajith

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Log In

Search Forums

Log In
Welcome to the new Suneido Web Site and Forum.
Register
Lost Password
users of the previous PHPBB Forum should be able to log in with their previous username and password.

Recent Topics

  • Alpha copy of gSuneido to play with
  • how to start jsuneido ?
  • Problem Starting Suneido…
  • Dialog not showing buttons
  • New link for Suneidojo

Contact Us | Legal Statement | Privacy Statement | SiteMap

Copyright © 2023 Axon® Development Corporation. All Rights Reserved. - Open Source Integrated Database and Programming Language