Anh_Tran Posted October 28, 2002 Posted October 28, 2002 Dear All, I would like to know if there is a function member of a list ...let's say a list (1,2,3) ....member of vale list is 1 or 2 or 3 ...is there a function to get these values out one at a time? Thanks
Kurt Knippel Posted October 28, 2002 Posted October 28, 2002 There are many ways to accomplish something like this. However they are used for many different purposes, what are you trying to do?
Anh_Tran Posted October 28, 2002 Author Posted October 28, 2002 Dear Capkurt, Since the list is 1 or 2 or 3 ...someone enter diferent value from the list ...the pop-up message come up and don't let them enter different value from the list. I don't want to use validate field. IS there a script or u have a good way to achieve this? In my head now ..i have no clue Thanks
Kurt Knippel Posted October 28, 2002 Posted October 28, 2002 OK, what you could do is one of the following: Format the field as a raido button/checkbox/popup menu (NOT a popup list), as each of these allows ONLY the valid options to be selected from. Setup some kind of validation script which is run by the navigation scripting from this layout. It would check the value in the field vs the list, so that if they try to leave the layout with an invalid value it will not allow them to do so and give them an error telling them what to do.
Anh_Tran Posted October 28, 2002 Author Posted October 28, 2002 Dear CApkurt ... I understand what u said but I really don't know how to check the field vs the list ... field = valuelistitem(dbname,valuelist) ..it does not work CAn u give me a hint how to check a value vs the list? Thanks
Kurt Knippel Posted October 28, 2002 Posted October 28, 2002 PatternCount ( Field, ValueListItems ( Status ( CurrentFileName ), "Value List" ) ) = 1
CobaltSky Posted October 29, 2002 Posted October 29, 2002 I agree with this approach in general terms, but there are a couple of minor flaws in that: 1. Part-entries will be accepted inappropriately. 2. Recurring (part-string) values will be rejected inappropriately (ie the patterncount will be higher than 1). 3. The current syntax is searching for the whole list within the field, rather than the field within the list. 4. Non contiguous multiple selections within the field need to be validated separately (since their pattern forms a sting which does not occur anywhere in th value list). For instance if the value list has four numbers on it as follows: 3527 2442 9279 244 The numbers 15, 24, 25, 27, etc etc will be found in the list and will therfore be accepted as being valid. The same is true for alpha lists. Moreover 244 will be rejected as invalid, since it will be found twice not once in the test string. For a single value field (eg based on radio buttons rather than check boxes) the solution lies in a slight adjustment of the syntax, to include before- and -after delimiters within the test text and the search string, as follows: PatternCount("
Recommended Posts
This topic is 8062 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now