Jump to content

duplicate previous records specific fields


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

Recommended Posts

  • Newbies

I have a layout and there are several fields and i have a counter. I want to add new records but set some filelds sometimes previous record.

I tried set ( filed::a)

getnthrecord ( field::a , getfield ( field::counter ) - 1 )

counter is auto enter serial field

but it didnt work.

how can i add new record with some fields are duplicated by previous..?

Link to comment
Share on other sites

I assume you want to create a new record and copy the data of some fields from the current record. I suggest you create a script that would go something like this:

1. set variable $a, table::a

2. set variable $b, table::

//this copies your the content of your fields from current table into memory...then create a new record and write the content of these variables into newly created record

3. New Record/Request

4. Set Field(table::a, $a)

5. Set Field(table::P, $:

Link to comment
Share on other sites

Have you considered using the Insert from Last Visited script step? You'll be able to avoid declaring one variable for each field you want to copy. One limitation with the Insert from Last Visited script step is that the fields have to be on the current layout. It sounds like this is the case with your solution. Also, you need to make sure you select at least one field on the record you want to duplicate before running the script. This selects the record has the last visited. For example:

Go to Next Field

New Record/Request

Insert from Last Visited [MYTABLE:field1]

Insert from Last Visited [MYTABLE:field3]

Insert from Last Visited [MYTABLE:field7]

Link to comment
Share on other sites

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