Jump to content

Two problems!!!!! Dos Problemas!!!!!


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

Recommended Posts

English

Hi, all

1)I have my DB with a some repeting fields, my questions is.

Can I paste the Current date, just with a click? or a tab? this is in a repeting date field

2)In the same DB I have a script to paste some information from 2 fields (pay, date) the script it's to paste this 2 filed in a last repeting field and when the repeting filed it's full send a message i.e.:

SCRIPT

Cut [select, "date"]

Go to Layout ["Payments"]

Set field ["Last(howpay)"]

Paste []

Go to layout ["oroginal layout"]

Cut [select, "date"]

Go to Layout ["Payments"]

Set field ["Last(howpay)"]

Paste []

Go to layout ["Original Layout"]

With this script doesn't work, you know something to do this.

Thanks alot for your help.

---------------------------------------------

Spanish

Espa

Link to comment
Share on other sites

The script you have described doesn't really do anything. A Set Field step needs two parameters. The field to be set and the value to set it to. The Set Field step in your script takes the last non-empty value in the field "howpay", but doesn't do anything with it. The Last() statement is useful in TAKING information from the last non-empty repeat not PUTTING information in the last repeat. To do this you will need to test each repeating field repeat and set the first that tests empty.

If(IsEmpty(GetRepetition(howpay,1)))

SetField("howpay"-1, "date)

End If

If(IsEmpty(GetRepetition(howpay,2)))

SetField("howpay"-2, "date)

End If

If(IsEmpty(GetRepetition(howpay,3)))

SetField("howpay"-3, "date)

End If

If(IsEmpty(GetRepetition(howpay,4)))

SetField("howpay"-4, "date)

End If

etc.

You might want to review the use of the Last() and SetField() function in the FM manual or using the built-in help.

-bd

Link to comment
Share on other sites

I'm not getting a clear enough picture of what you are doing to answer your question. The script I posted is how you would "paste" to the first open repeat of a repeating field. If this doesn't help, do you mean paste to the last repetition of a repeating field or the last record in a set? Paste to "last field" is not clear. -bd

Link to comment
Share on other sites

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