October 11, 200421 yr Hello All, OK here is a newbie question for you guys. I have a conditional pop-up menu which I am auto-entering via my last pop-up menu selection. My first pop-up menu has a list of Computer Applications and my second conditional pop-up menu has a list of versions per the Computer Application picked in the last menu. I want to have the versions pop-up menu auto-enter the highest version number rather than having to go into the menu everytime to pick the highest version number. It is currently getting the right version numbers but not the highest number. Any ideas or similar post? Thanks, Galen
October 11, 200421 yr An auto-enter of Substitute( RightValues( ValueListItems( Get(FileName); "yourValueList" ); 1 ), "
October 11, 200421 yr Author Thanks for the reply. Exactly, i don't need the last number I need the highest number. But how would I loop through my fields. I don't see any options to do a Loop Function in the Auto-Enter Calculation??
October 11, 200421 yr Try the Max function (assuming your version numbers are actual numbers and are stored in one field per record).
October 11, 200421 yr Author It's currently a text field. Can I still use numbers with a decimal and make it a numeric field and then try the Max function?
October 11, 200421 yr It will work for text fields, as long as you only have one decimal point in the number. I think I would create a repeating calculation field, with one value list item in each repetition, and then use a Max calculation to pull the largest rep. The unstored repeating number calculation would be Let([ v = ValueListItems( Get(FileName); "yourvaluelist" ); c = ValueCount(v); r = Get(CalculationRepetitionNumber) ]; Case( c >= r; Substitute( MiddleValues( v; r; 1 );
October 12, 200421 yr Author Thanks for the code. I am a newbie to Filemaker scripting though. So all I have to do is add my table::field where it says yourValueList and it should work?
October 12, 200421 yr Author I ended up sorting my relational field as descending and it worked fine. No need for the cal. Thanks, Galen
Create an account or sign in to comment