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

Field D is a different value that does not need to be in the equation.

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

Sorry Jimmy i don't get how this helps?

IF [isEmpty (TABLE NAME:: D)]

Beep

Else

Insert Calculatd Results [a; a = b] :

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

  • Who Viewed the Topic

    1 member has viewed this topic:
    Punith baskar 
×

Important Information

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