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

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

Recommended Posts

Posted

I am trying to do a script that will duplicate a record and keep some fields but empty others for new data, my problem is that the Replace Field Contents option then replaces the fields in the original record too?? Is there a way to do this?

Help!!

Posted

If you set the auto-entry option of "Value from last visited record" for the fields that you want to keep the data the same for, then when you duplicate the record, it will carry over the value.

Posted

Thanks, but I don't always want a new records to show the last viewed information...

Wouldn't it then even if I say New Record (starting from scratch or other user) get whatever was looked at before instead of a clean layout with blank fields?

Thanks

Jim

Posted

You could always set variables to the field values of those you want to carry the data over.

Set Variable [ $field1; Name ]

Then in your autoentry option, use a calculated result of the variable.

$field1

Posted

Theres also the old standby using a script parameter to pass all the values at once.

http://fmforums.com/forum/showpost.php?post/172406/

Posted

Well... I feel the use of globals whatever should be restrained, and replaced by more object'ish methods.... Here a CF that only works if a certain script is running - Case(0;0) is fieldtype independent.

--sd

DuplicateSomeFields.zip

Posted

Some of us can't create custom functions. Can the same process be done without a custom function?

In my file, A global field is not neccesary as the value it contains could be passed as a script parameter. However, It does make it easier to visualize the process.

I tend to like having a script for the process. For me it's easier to add to and track down problems that might occur, YMMV.

Posted

Yes, since it isn't recursive - could it be done without:

Case ( Get ( ScriptName )=_scriptName;Case(0;0);_fieldName)

...if you in each autoenter hardwire the right content. The first is the name of the script where the duped data should be overwritten with void a.k.a Case(0;0) which deals whith all field types container, time or date you name it.

--sd

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