Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Hi,

I'm having trouble figuring out why ValueCount always return 1 when I trying to count the number of values in a repeating variable.

Here's is my test


   Set variable [$test; Value:1]

   Set variable [$test[2]; Value:2]

   Show Custom Dialog ["Test"; ValueCount($test)]

I'm sure the answer is very simple, but it's just not coming up right now...

Posted (edited)

So what you are saying is that there is no way we can use variables as arrays?

The only work around I found was concatening the same variable with a ¶ between each values.


   Set Variable [$test; Value:1]

   Set Variable [$test; $test & "¶" & 2]

   Show Custom Dialog ["Test"; ValueCount($test)]

This is a pretty awkward method don't you think so?

Edited by Guest
Posted

So what you are saying is that there is no way we can use variables as arrays?

Sort of. I am saying they ARE NOT arrays.

This is a pretty awkward method don't you think so?

Hard to say without knowing what you're trying to do.

Posted

Here is a print screen of my script

I'm trying to print multiple layout in a single PDF file using PDFTK.

What I need is to merge all the filenames from results of different scripts. This way I can create the required parameters for PDFTK.

Actually, I used the workaround, but I would have prefered to used a more standard way to develop.

sshot-14.jpg

This topic is 6382 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.