gsprague Posted October 11, 2004 Posted October 11, 2004 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
-Queue- Posted October 11, 2004 Posted October 11, 2004 An auto-enter of Substitute( RightValues( ValueListItems( Get(FileName); "yourValueList" ); 1 ), "
gsprague Posted October 11, 2004 Author Posted October 11, 2004 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??
-Queue- Posted October 11, 2004 Posted October 11, 2004 Is it an actual number or a textual number like 1.2.1?
transpower Posted October 11, 2004 Posted October 11, 2004 Try the Max function (assuming your version numbers are actual numbers and are stored in one field per record).
gsprague Posted October 11, 2004 Author Posted October 11, 2004 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?
-Queue- Posted October 11, 2004 Posted October 11, 2004 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 );
gsprague Posted October 12, 2004 Author Posted October 12, 2004 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?
gsprague Posted October 12, 2004 Author Posted October 12, 2004 I ended up sorting my relational field as descending and it worked fine. No need for the cal. Thanks, Galen
Recommended Posts
This topic is 7726 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