Matthew R White Posted March 4, 2014 Posted March 4, 2014 I'm trying to create a field that displays a single number 0,1,2,3,4 depending on the following. If field A is not empty, display "1" if field B is not empty, display "2" If Field C is not empty, display "3" If Field D is not empty, display "4" If field A is empty, display "0" Thoughts?
Lee Smith Posted March 4, 2014 Posted March 4, 2014 Try Case ( not IsEmpty ( Field D ); 4; not IsEmpty ( Field C ); 3 ; not IsEmpty ( Field B ); 2 ; not IsEmpty ( Field A ) ; 1; "" ) If you want it to be reflecting 0 then exchange the “” to 0
Matthew R White Posted March 4, 2014 Author Posted March 4, 2014 Mr Lee Smith, that worked!!! Thank YOU SIR!!
Rick Whitelaw Posted March 4, 2014 Posted March 4, 2014 I must be missing something here. The Case function will return True for the first, and only the first, condition met.
Lee Smith Posted March 5, 2014 Posted March 5, 2014 Read the help on Case. http://fmhelp.filemaker.com/fmphelp_11/en/html/func_ref3.33.2.html In particular, the Description.
Rick Whitelaw Posted March 5, 2014 Posted March 5, 2014 Hi Lee, I understand the Case function. i think I don't understand the op's original question. Returning a single digit from a number of conditions seems problematic.
comment Posted March 5, 2014 Posted March 5, 2014 I must be missing something here. Obviously, there is an order of priorities at work here, that both Lee and Matthew understand and you and I don't. Otherwise Matthew will be back with a follow-up question.
Lee Smith Posted March 5, 2014 Posted March 5, 2014 You made a good point in your first post, and I wasn’t sure what their final need would be. In fact, I fully expected the OP to post that they need a way of tracking which ones had data in them. In any event I gave them a way to move the need down the road while taking the opportunity to make it a learning process. comment posted just as I was making this up, but I will post this anyway.
Recommended Posts
This topic is 3973 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