April 6, 200619 yr Hi all, Each one of my Records has a Contract layout but not every record has a contract. When I come to draw up a new contract I would like to find the last contract number in the field using a button on the Contract layout. Any ideas?
April 6, 200619 yr Author Can I just sort by the contract field and then copy and paste that number in my new record?
April 6, 200619 yr Hi how about a calculated field (LastContractNumber) and calc: Max(rel::contractNumber) ?
April 7, 200619 yr I do hardly suggest anyone to utilize copy/paste, and in particular now when GeNthRecord( esists. I know I was a little snotty in my previous reply, because what if not relations exists. What you can do is to make a valuelist based upon the contractnumber, the issue you probably here raises, is that autoentering isn't strictly fitting into your business model which could be "Give the emperor what is the emperor's and give God-what is God's." kind of bookkeeping Set Field [ Untitled::contractNumber; GetAsNumber ( RightWords ( ValueListItems ( Get ( FileName ) ; "theNumbers" ) ; 1 ) )+1 ] What it does is to sort the numbers prefereably with leading zeros via a valuelist, causing the latest entry to latest in the valuelist, convert the list which is in textformat back into numerical and add one to it. --sd
Create an account or sign in to comment