I am trying to get only the first item in my view. and then increase it by one.
For example I want to look at the view “work orders” get the first document assuming the view is sorted descending and then add 1 to create the next work order. I tried using the @MAX function however it only works if i save the field formula and then try it. It will only work once.
Subject: Retrieve First Document Using @DBColumn
Please show your code. There are a lot of ways to do this–we can’t help if we can’t see what you’re trying.
Subject: RE: Retrieve First Document Using @DBColumn
This is the code im using on the field:
@Max((@DbColumn(“”;“”;“fall08”;1)))+1
Field type is text- editable.
Subject: RE: Retrieve First Document Using @DBColumn
It’s because you’re caching the results. Check out the help for @dbcolumn, an empty string specifies caching, use “NoCache” instead.
If you’ve got your results sorted, you don’t really need to use @max, you could use @subset. It may be quicker, but I’m not 100% sure on that one.
Also, if you’re trying to use this to get sequential numbers you’ll come unstuck when more than one person creates a document at the same time.
Subject: RE: Retrieve First Document Using @DBColumn
Sequential numbering by outside database