Jump to content

This topic is 5504 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

Posted (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 by Guest

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.