Dutchy Posted March 30, 2007 Posted March 30, 2007 I have a couple of fields that I would like to relate to each other is some way. Will try to explain. Field1; status, field2; payment received %, field3; score. Values in these fields: Status field has 6 prefixed values (E/P/O/F/M/C). Payment received values between 0-100 and score also values between 0-100. Now what I would like is that filemaker will automatically fill in the value F(Finished) into the status field if 100% is filled into the payment received field. The same thing for P/E,etc. only with a different scores and payment percentages. I really don't know where I have to look to make this happen. Can anybody help or point me in the right direction? If my explanation is not clear don't hesitate to ask. Dutchy
Inky Phil Posted March 30, 2007 Posted March 30, 2007 Hi Dutchy You can make the status field a calc field, result text and then use the case function to set the content of the status field eg Case(payment received = 100;"F";payment received = 80;"E";payment received = 100 and score = 100;"P";"") If you check the 'do not store' box under options My formula means that status would show F if payment rec = 100 E if payment rec = 80 P if payment rec = 100 and score =100. The last set of "" is the default if none of the conditions are met. You can include as many conditions as you like. The case statement will stop evaluating once it meets a condition that is met HTH Phil
Dutchy Posted March 30, 2007 Author Posted March 30, 2007 Hi Phil Thanks it's working. Just got some more questions now that I have seen how this works. O (payment received <100) score = 100 F (payment received =100) score = 100 I got this and that is working however the other 4 values (E/P/C/M) are not related to a payment. and should be filled in manually. But this is not possible because the field is no longer modifiable. Is there some way to be able to overwrite the calculation when nothing is filled in the payment received field? So that I can fill in one of the other values through a drop-down list? Dutchy
Inky Phil Posted March 30, 2007 Posted March 30, 2007 Not that I know of in a calc field. What you might be able to do is make status not a calc field, allow the user to select all the values then use the same case function (but set up differently of course) to validate the entry that they make ie case payment rec = 10 then selection MUST be F. Phil
Dutchy Posted March 30, 2007 Author Posted March 30, 2007 He Phil, this is working. New question though. Would it be possible fill in more then one calculations (validation). For know I have 0(order) and F(Finished) related to the payment rec field, and E(Enquiry) as a the value entered in the status field as soon a a new record is made. I would like P(Proform invoice) to be entered into the status field as soon as a date is entered into a P-date field (new calculation?). And if possible to relate C(canceled) and M(Missed) to the score field. When score = 0 filemaker gives pop-up menu or something similar and Asks to fill in either C or M? Am I asking to many questions at a time? hope I am still understandable!? Dutchy
Inky Phil Posted March 30, 2007 Posted March 30, 2007 As I said before the case function will run until such a time as one of the conditions is met. With that in mind if you can order your case statement to run in some logical order of what is likely to occur then you can have the validation do what you want Other than that suggestion I am afraid that the scope of all those conditions is something that is beyond my experience within one calculation field. It strikes me also that there has to be a better/different way of achieving what you want Perhaps someone more experienced can step in here to help (Sorens the guy for this one I think) Phil
mr_vodka Posted March 30, 2007 Posted March 30, 2007 I got this and that is working however the other 4 values (E/P/C/M) are not related to a payment. and should be filled in manually. But this is not possible because the field is no longer modifiable. Is there some way to be able to overwrite the calculation when nothing is filled in the payment received field? So that I can fill in one of the other values through a drop-down list? If you want to be able to manually enter data into a field then you will have to use a text field with "auto-entry" calculated value. Uncheck the 'do not replace...' I dont know what your exact test criteria is but as Phil pointed out, you have to keep in mind the order of Evaluation. If you have this calc here, you can override the values if it does not meet any of the test criteria. Case ( payment received <100 and score = 100; "O"; payment received =100 and score = 100; "F"; IsEmpty (payment received) and IsEmpty (score) and IsEmpty (statusfield); "P"; statusfield )
Recommended Posts
This topic is 6509 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