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

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

Recommended Posts

Posted

Good Morning all, I have 52 weeks in my database, and what im trying to do is create a script that will move 3 fiels from wk 1 to wk 2, and wk 2 to wk 3 and so on. I have been using the copy past clear, but this takes to long, and im trying to find an easier more effective way of doing this. The idea is to have 52 weeks of data that can be easily retrieved to create reports and such. each week there's new data and would need to run this script to copy fields to the following week and at the same time clear the fields in Week 1.

Thanks in advance

Posted

I'd recommend rethinking your structure: make a new record for each week.

This gives you more flexibility in reporting and also makes everything simpler. You should be able to delete approximately 153 fields.

Posted

I have a report already build with the same amount of records and every week i just need to move the values over by 1 week. it wouldn't work the same if i create new records everyweek.

Everything is running ok, just need a way to move info from 1 wk to the next without using the copy, paste, clear for each week. don't know if there is something else that will do this.

11111.zip

Posted

OK, you can ponder it later. For now, for starters, use Set Field rather than copy/paste/clear. Start from the end and work your way to the top:

Set Field( 52; 51)

Set Field( 51; 50)

etc

You could play around with object names, variable repetitions etc, but since there's no way to script Set Field by a calculated field name it won't necessarily gain you that much. (This is actually a case where a repeating field with 52 repetitions could have helped, since you can use a calculation to choose the repetition number of a field.)

Another approach is to use a layout where your 52 fields are in a set tab order, and then it's fairly easy to loop through them.

Posted

That picture doesn't tell much, but in general moving/changing data just because time has passed is not a good idea. Data should be tied permanently to its date. What needs to change is your point-of-view. Same as events in a calendar: events don't move into the currently viewed month.

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