Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Hi,

I have a table, which i have a field named "clientnames"

i would like to copy its contents into another table.

By using setfield, it only copies the first value. i have tried using an id in another field.

using setfield with if function but it returns same result.

i know i have to loop it somewhere but i really have no clue now because i can't seem to specific a value using an id to update into the new table.

please shed some light on this.

thanks

regards

Could you provide a more detailed description of what you have to start with, and what are you trying to accomplish?

  • Author

i have a portal, which has enabled "allow add new records"

i also have another table, which contains a field named "clientnames" that have multiple records

i would like to add all the "clientnames" into the portal by using "go to last record and setfield via the field name"

But it only adds the first record of "clientnames" only.

What I am having a hard time with is understanding what tables do you have. I understand there is a table of Clients, and another table of ??. In this table, each record has a return-separated (?) list of client names in a field?

Also, is this a one-time conversion, or will you be doing this periodically?

  • Author

sorry for my poor english

1 table named "sales record", which has 3 fields, "clientnames", "date" and "salesperson"

1 table named "potential sales", which has also 2 fields, "clientnames2" and "salesperson"

now i have a layout based on "sales record" which contains portal of "potential sales", linked by "salesperson". i am hoping to copy the all the entries of "clientnames" into "clientnames2".

sorry sir for the confusion.

I am still a bit confused, so let me use a generic example with these two tables:

Parent:

• ParentID (auto-enter serial number)

• ParentName

• ChildNames (a return-separated list)

Child:

• ChildID (auto-enter serial number)

• ParentID

• ChildName

The script to create a related Child record for each name in the ChildNames field would look like:

Set Variable  [$parentID ; Parent::ParentID ]

Set Variable [ $childNames ; Parent::ChildNames ]

Go to Layout [ Child ]

Loop

	Set Variable [ $i ; $i + 1 ]

	Exit Loop If [ $i > ValueCoount ( $childNames ) ]

	New Record

	Set Field [ Child::ParentID ; $parentID ]

	Set Field [ Child::ChildName ; GetValue ( $childNames ; $i ) ]

End Loop

Go to Layout [ original layout ]

  • Author

i tried making one sample base on your example, i can't seem to get it working. the value count return as 1 as i tested it on the field.

the use of $i is to identify the records, right?

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.