Jump to content
Sign in to follow this  
skearton

If C is empty then copy D to A...Question

Recommended Posts

Trying to make a script that looks at Field C to see if it is NOT empty. If so it copies contents of Field D to Field A, otherwise it does nothing. Can someone tell me how to write this?

Edited by Guest

Share this post


Link to post
Share on other sites

You maybe better off with an Auto-entry calculation field ... can you give a bit more info in order to understand the context.

It will require an If script or a case statement in a calculation.

best

Stuart

Share this post


Link to post
Share on other sites

I need something that will work with records already entered. Will the previous example only work with new records? I tried it and it doesn't work with existing records.

Edited by Guest

Share this post


Link to post
Share on other sites

Uncheck Do Not replace existing value (if any) and it will update when records are modified.

or

Just make it a straight calculation field with the same calculation.

As i said i am not really clear on the context as you did not expand on it as requested.

Share this post


Link to post
Share on other sites

Script to set the field:

Freeze Window

Go To Record [ First ]

Loop

If [ not IsEmpty ( Field C ) ]

Set Field [ Field A ; Field D ]

End If

Go To Record [ Next ; Exit after last ]

End Loop

Share this post


Link to post
Share on other sites

HI,

This may do the trick

IF [isEmpty (TABLE NAME:: D)]

Beep

Else

Insert Calculatd Results [a; a = b]

You may have play with the syntax

Take Care

Buck

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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