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

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

Recommended Posts

Posted

Hi Serge: Thanx for reply. I've a group of same character (text) field that

I like to be able to code in a loop, ie. A1,A2,A3...A50, instead fo code

individually, one by one, ie "set field (A1, "X"), "set field (A2, "Y")...etc)

If you said FM doesn't supportarray in the scrip, then I guess I've no choose

to specify the array individually, right ? or there is other way to do it?

George

Posted

You can use repeating fields to implement arrays. These fields are not recommended for holding data that you may eventually want to search/sort/index etc., but can be useful in scripts. There are a lot of limitations though. While you can retrieve the nth element using the GetRepetition() function, there is no corresponding SetRepetition() function.

Some users implement their own arrays using regular or global text fields, using some character like

Posted

Hi George,

Yes, you can create arrays, I think - if arrays are simply 'multiple field data within one field.' Take a look at the first two of Ray's demos in the section on Dealing with Data and Arrays. If you can expand them you should be able to create them, right? After all, it would be simply inserting a pipe or other character between each 'content' wouldn't it?

Something like placing all fields (to be array'd) on a layout:

Go to Field [First field in tab order] ... this is important

Set Field [gGlobalTxt, Status(CurrentFieldContents]

Loop

Go To Field [Next]

Exit Loop If [status(CurrentFieldName), FirstField]

Set Field [gGlobalTxt, gGlobalTxt &

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