Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Moving Data from wk 1 to wk2, and wk2 to wk3 using a script

Featured Replies

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

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.

  • Author

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

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.

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.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.