George Hsu Posted November 25, 2003 Posted November 25, 2003 Is there anybody know how to code/define/create an array (A1, A2, A3...)(or even 2 dimension array A11, A12, A13...) in a loop of a FM script ? Thanx
jondolar Posted November 25, 2003 Posted November 25, 2003 Hi Georges Arrays are not supported in FMP. What are you trying to do exactly? Tell us more if you want us to help you. Serge
George Hsu Posted November 25, 2003 Author Posted November 25, 2003 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
BobWeaver Posted November 25, 2003 Posted November 25, 2003 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
LaRetta Posted November 26, 2003 Posted November 26, 2003 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 &
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now