soriano Posted January 6, 2001 Posted January 6, 2001 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
LiveOak Posted January 6, 2001 Posted January 6, 2001 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
soriano Posted January 9, 2001 Author Posted January 9, 2001 I do it but how can I paste my information to the last field? It's posible When I paste, the information paste in all the fields
LiveOak Posted January 9, 2001 Posted January 9, 2001 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
Recommended Posts
This topic is 8989 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 accountSign in
Already have an account? Sign in here.
Sign In Now