drrehak Posted January 30, 2010 Posted January 30, 2010 I'm having trouble defining this in a calc. I realize I could do it with a loop, and setting a global field to concatenate. However, I was hoping for a better solution to "hard code" it. Example: foundset count = 4 output text = (0,1,0 | 0,2,0 | 0,3,0 | 0,4,0) so depending on the number of records in foundset, I need to add a string and add 1 to a specific part of that string. it will always be the second integer, following pattern 0, n, 0. for some reason, I can't figure out how to best do this. thanks in advance. -Kevin
comment Posted January 31, 2010 Posted January 31, 2010 It would be best to use a recursive custom function (requires the Advanced version). If you want to hardcode this, well... it depends on how large your found set can be - any hardcoding will have an upper limit. The simplest way, IMHO, would be: Let ( text = "0,1,0 | 0,2,0 | 0,3,0 | 0,4,0" ; "(" & Left ( text ; 8 * Get (FoundCount) - 3 ) & ")" ) There are smarter ways to generate an ascending series without a custom functions - look for posts by user Agnès.
drrehak Posted January 31, 2010 Author Posted January 31, 2010 (edited) thanks! I never would of thought of that calc. only problem is that only works for foundsets 4 and below. I may have foundset up to 50. i guess I could extend that initial let text string out to ..... 0,50,0. but there has got to be a better way. I will search for Agnes' posts too. Edited January 31, 2010 by Guest
Recommended Posts
This topic is 5504 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