cosworth Posted December 29, 2005 Posted December 29, 2005 Can anybody tell me how to make a field automatically change when you select another option through a drop-down list
mr_vodka Posted December 29, 2005 Posted December 29, 2005 Need more info. What kind field? how do you want it to change and exactly how? The more information provided, the better we can assist you.
cosworth Posted December 29, 2005 Author Posted December 29, 2005 I am trying to make a system where i can make bills. My question is, when i have bought something than i have a buying bill and when i select it through a drop-down list i want the system to automatically put "For you to receive" at the bottom of the bill, but when i have soled something i will change the billtype to selling bill and then i want to have "For you to pay" at the bottom of the bill. Both the drop-down list (buying bill and selling bill) and the field with the pay/receive are on the same layout. Thanx 4 the fast reply
Zero Tolerence Posted December 29, 2005 Posted December 29, 2005 evaluate(Quote("text you want it to change to"); Dropdownfield) Make it an auto enter calc, with do not replace existing value unchecked. Anytime the drop down changes it will put "text you want it to change to in the field.
Ender Posted December 29, 2005 Posted December 29, 2005 How about a simple case() statement in a calc field: flag (calculation, text result) = case(Bill_Type="buying bill"; "For you to receive"; Bill_Type="selling bill"; "For you to pay")
cosworth Posted December 29, 2005 Author Posted December 29, 2005 Do you know any sample because i am a real noob to fm
MetaSys Software Posted December 30, 2005 Posted December 30, 2005 Hi, Just make it as a calculation field and check the value of the field associated to the drop down to decide what should be the valueof the field displayed atthe bottom.. Regards, MetaSys
Himitsu Posted December 30, 2005 Posted December 30, 2005 Idon't know if you want to go this far, but it is a way to make it very user friendly. make a table with as many fields as you want, say, value value_text then make a value list using the value from the value field. For the value_text field, put in the message you want to show when that value is place. Then back to your invoice area, the message field would look like: =messagetable:value_text make your relationship from the pull down field you want to the value field in that new message table. This sounds like a lot of work, but it will make for a very verstile system once it is running. If you didn't like the wording, it is very simple to change and anyone can do it. Just an option.
Zero Tolerence Posted December 30, 2005 Posted December 30, 2005 Ender has the right idea, I replied with the evaluate function before I saw the second response.
aldipalo Posted December 31, 2005 Posted December 31, 2005 I have a very similar situation with an invoicing app and effectively use what Ender has suggested. Works fine. You need two fields. One for your "Buy" or "Sell" decision. Lets call it "Check_Field" and a calc field with the calcualtion Ender supplied. Enter the calc field on your invoice layout where you want it to appear. Check or enter the data, I made a drop down list, in your "Check_Field" and Voila' the proper text is on your invoice.
Recommended Posts
This topic is 6960 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