hi
so i have a long list of asset id’s these consist of one several prefixes and a number e.g. ‘LXCAB0025’.
I have a page where i am trying to show the range that has been put into coda.
as you can see its not quite working correctly. from some testing i beleave the issue is the 0’s in some of the asset numbers. i think slice might be how i solve this but cant quite work out how to include it in the formula. here is my current formula. (yes MAST_inventory is sorted correctly for this to work)

any help would be greatly appreciated.
thank you
@Michael_Paget
i think a better way to approach this is to have a column which just includes the numbers .e.g. 2785, 3639. This prevents coda messing up with the 0’s. You can use regex or if you have standard/predictable asset IDS - any of the string formulas (Left(), Right(), Middle()) for this, and then do your formula as screenshot and use Sort() with that column of only numbers.
That or because you said your MAST_Inventory is already sorted, then can do table position column e.g. thisTable.Find(thisrow) and use Min() or Max().
Lots of ways to skin a cat.. hope this gives you some ideas to work off.
Cheers!
Mel
Hey Michael,
Wouldn’t it work if you just used .first and .last to find the match across the range?
Or could you share a small screenshot of the data your targeting to show a few rows. Might be easier to identify any issues.
Chris
hi
part of the problem is that the asset numbers already exist as barcodes on around 6000 real world items. and iv inherited allot of those barcodes as different people from diffrent times have tried to build asset management systems. this is how iv ended up with 5-6 different prefixes and defiantly need to keep the zeroes for when people scan the barcodes.
table position colum could work.might have a play with that.
thank you
see this is what’s interesting right, because i think that’s exactly what im doing. if i try and do this manually by filtering the master table i get this
but my formula is doing this.
when i make ‘Prefix’ variable ‘LXCAB000’ i get this
which is why i think the zeroes are the issue and why im trying to get the formula to ignore them.
i would send a screenshot but the table is about 6000 entries with 40 odd collums so not sure what i would show you haha.
ok i fixed it. really simple apparently i simply deeded to add a .sort() to the actual formula as the table sort wasent carrying over i guess.
thank you for the help though
Hahah yeah I just found the same thing. I noticed that the filter doesn’t actually respond to the table order being sorted if the original filter had an unsorted table then that’s what it’s using.
I haven’t checked to see if it’s an issue but I sorted my table before doing the filter but it’s late here and it’s probably the same thing.