Guest Posted November 16, 2009 Posted November 16, 2009 I made 2 fields in a layout 1.food 2.drink. The field food has a value list in it (1.solid food and 2.liquid food), the field drink has value list (1.pepsi and 2.coke) now question is if i select solid food in the field FOOD the field drink should auto enter into coke hope u understood many are explaining not able understand please can any genius can tell me script please please i am just a beginer
Peter (duksis3) Posted November 16, 2009 Posted November 16, 2009 Can you use calculation Case ( Food = "1.food" ; "3.drink"; Food = "2.food" ; "2.drink"; Food = "3.food" ; "1.drink"; "") ? Or you need possibility to manually change drink too?
Guest Posted November 17, 2009 Posted November 17, 2009 oops wats this did not understand sir i want it to be done automatically i want script sir pls pls
Vaughan Posted November 17, 2009 Posted November 17, 2009 I'm guessing you want a conditional value list: choose "drink" from the first field's value list and only the drinks "coke, pepsi" appear in the second field's value list. Search the forums for conditional value list, and read the FMP help. It involves creating value lists that use the "show only values from " option. This in turn involves creating tables to hold the values and creating relationships to the tables to generate the value lists.
Lee Smith Posted November 17, 2009 Posted November 17, 2009 Do a search of the Forum for [color:blue]+Conditional +Value +List use the pluses as shown, and you should get about 100 hits. Read through them, and you will find some examples of what you are asking. You can find several example files at database pros. com Link do a search in the Resource box, for [color:blue]Conditional List and you can download them for your use. Tear them apart to see what make them tick. HTH Lee
Guest Posted November 18, 2009 Posted November 18, 2009 (edited) hi smith and other experts i made search i got 250 woooh i searched i didnt get wat i want please sir pls my work is at halt due to this unknown step pls can anyone tell how to wrte script for this pls . ValueListIDs ( fileName ) ValueListItems ( fileName ; valueList ) ValueListNames ( fileName ) i found this how can iuse this three for my above problem Edited November 18, 2009 by Guest
Vaughan Posted November 18, 2009 Posted November 18, 2009 None of those functions will be of any use to solve your problem. You will not find what you need, you're going to have to do some working out yourself. Take a look at this demo, which was the second item in a google search for "filemaker conditional value list", not too hard to find. http://www.nightwing.com.au/FileMaker/demos4.html
LaRetta Posted November 18, 2009 Posted November 18, 2009 (edited) You can also find several good examples of conditional value lists right here in Comment's blog (scroll towards bottom). And these examples are in fp7 format and not the old fp5. The self-clearing example rocks. Edited November 18, 2009 by Guest
aholtzapfel Posted November 18, 2009 Posted November 18, 2009 If I understand you corectly, you do NOT really want or need a script or a condictional value list, you need to set the autoenter options for your field. Prehaps an auto-enter by calculation. I think what you are looking for is something like If(Food = "solid";"Coke";"") You may want to read the help file on auto entry options for fields.
LaRetta Posted November 18, 2009 Posted November 18, 2009 I like you thinking and I too (at one time) wondered if auto-enter was the answer. But when one creates a test file, it becomes clear that there is no default value and, what if User needs option to set the liquid? The auto-enter can wipe out a user-selected liquid value if Pepsie so I think we need clarification. All I could surmise is that we don't know enough if auto-enter is required and, if conditional value list is the answer, gkr is all set. Either way, I appreciate you bringing up this option for consideration. :wink2:
LaRetta Posted November 18, 2009 Posted November 18, 2009 BTW, gkr, tell me script please please i am just a beginer However, in your profile (see left panel), you rate your skill level as Advanced. Might you want to correct that then? We really use this self-rating to determine how to answer questions. Notice that I don't rate myself because it hasn't been invented yet (take that however you wish, roflmao!) :laugh2:
Guest Posted November 19, 2009 Posted November 19, 2009 i am doctor and i dont understant 99 percent of scripting of file maker as far as i am designing my database i am advanced user daily i sit for 10 hours for my database roflmao
Guest Posted November 19, 2009 Posted November 19, 2009 as sir vaughan suggested i explored the site i saw each and every demo examples but i didnt get what i asked above in first message does it need a script or calculation pls help me
LaRetta Posted November 19, 2009 Posted November 19, 2009 You haven't said what you want if person selects Liquid Food. I don't believe we have enough information but let's start with this file (attached). Tell me whether this gives you exactly what you want and why not. Please be specific. And the skill rating is your design skills. We all thought you were more advanced designer and thus answered accordingly. Since you are beginner, we will change our answers to more basic. Please change your skills to more appropriate level, okay? FoodDrink.zip
Guest Posted November 20, 2009 Posted November 20, 2009 (edited) yay finally i got it yuhu ur awesome wow its working. I made 4 fields in a layout 1.food 2.drink 3.snack 4.dinner. The field food has a value list in it (1.solid food and 2.liquid food), the field drink has value list (1.pepsi and 2.coke),the field snack has value list (1.pizza and 2.burger), the field dinner has value list (1.pork and 2.beef) now question is "if i select solid food in the field FOOD the field drink should auto enter into coke field -snack to burger and -field dinner to pork-hope u understood i understood ur above example when i m trying with new problem i couldnot do it because i didnt understand the function CASE pls if u do this help i guess i will get command on this section. LA RETTA for u its simple example for me as a doctor its like like something something :( Edited November 20, 2009 by Guest
LaRetta Posted November 20, 2009 Posted November 20, 2009 snack to burger and -field dinner to pork- Hi gkr, you do the exact same thing that you did on the drink field ... On the snack field, auto-enter: Case ( Food = "Solid Food" ; "Burger" ) On the dinner field, auto-enter: Case ( Food = "Solid Food" ; "Pork" ) I have a feeling that these are all examples and not at all what you are really going for, so I hope they at least get you moving towards your goal. :smile2:
Guest Posted November 21, 2009 Posted November 21, 2009 (edited) wow understood thanx alot yes its small but for a doc its like miracle thanks alot . i made a field with value list MALE AND FEMALE. i made a button with script to goto(layout). when i select female the button must appear if male selected button should be invisible is it possible how to do it pls pls :) Edited November 21, 2009 by Guest
Zcast Posted November 21, 2009 Posted November 21, 2009 why don't you just make it where you simply go the the layout by choosing either the male or female? Why put a button in at all? If[PatternCount(your_field; "Male") Go To Layout "Male" Else If [PatternCount(your_field; "Female") Go To Layout "Female" End If Then set a script trigger on "your_field", using that script,either as object save, or object exit; whichever you prefer.
Guest Posted November 22, 2009 Posted November 22, 2009 its not about male female layout button is for layout named BABY if i select female in dropdown list button named baby should be visible if not male button should be invisible
LaRetta Posted November 22, 2009 Posted November 22, 2009 Hi gkr, You can either use a portal to hold the button or use a tab panel. I'll show you the portal method (attached). Create another table occurrence of Patients (maybe call it Baby Button). The button is sitting within a one-row portal. Once you understand and see the portal, select it and turn the pen pattern on it to transparent. Baby.zip
Zcast Posted November 22, 2009 Posted November 22, 2009 Gkr, Your original post said the you wanted a button to appear so that you can got to that layout when either male or female was chosen from your valueList. You edited your post after I posted my reply to remove the layout comment. Plus, you never mentioned anything about a baby layout. What LaRetta gave you as an example file should be perfect to direct you to what you wish to have happen. But, I agree with the others, sometimes you have to take examples, and work out the rest yourself. I have only been using filemaker for only about 3 months now, and the examples given to me my people such as LaRetta, bcooney, Vaughan, comment, Lee, and the rest have been GREAT learning examples, and have lead me in the right direction VERSUS just doing it for me. You should simply appreciate their help and "direction" instead of using the fact that yo're a doctor to get them to do your work for you. Sorry if my post has offended anyone else, but I just got the feeling that gkr is not appreciating the help that everyone has given him.
LaRetta Posted November 22, 2009 Posted November 22, 2009 but I just got the feeling that gkr is not appreciating the help that everyone has given him. Zcast, I haven't been given that impression at all. Sometimes after we post, we think of something which clarifies and add that to the post. I didn't think you missed the point and I didn't think gkr was unappreciative of any of our help. Overall, I feel this has been a productive and positive thread and all contributions have been necessary to bring us to a good solution (although we might not yet be there) ... and someone's profession has nothing to do with it. Of course, that's only my opinion. :smile2:
Guest Posted November 23, 2009 Posted November 23, 2009 (edited) :( la retta did un expressable help with the first example it made my database a great robot saved lot time using tab enter and mouse keys ur help is highly appreciable soon i will attach my database here . zcast i am very thankfull to each and every member who replies to my message i did read ur reply but it didnt help me . la retta ur example rocks wow when m entering sex as female the button changed to baby and again female is coming in the cbaby button i dont want female to appear again and i want to change the button name also as female . wow its great that what ever m thinking its possible with filemaker i guess i must give royalty to you for ur help :P Edited November 23, 2009 by Guest
Zcast Posted November 23, 2009 Posted November 23, 2009 LaRetta, Yes, you are corect. In the end, I guess gkr is getting where he wants to be. I believe I over-stepped my bounds a little by saying he wasn't appreciative. I'm sure he is; in his other posts, he definitely sounds like it anyway. I threw in the comment about his being a doctor being sarcastic, as he mentioned it several times himself. GKR, I apologize to you as well. Everyone here on this forum is very helpful, many in different ways.
Recommended Posts
This topic is 5480 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