Jump 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.
Juggernaut

Autoenter date series in repeating field?

Featured Replies

I need to autofill a repeating field with the dates for a particular week dependent on the the number of the week in the year (in a different field).

1. It works when I do this via a script, but is there a way to autoenter a calculation into each member of the repeating field?

2. Alternatively, is there a way to get a script to autoexecute when New Record is selected from the menu?

Thank you,

Bruce

I don't think it's possible - but you could use a repeating calculation field, instead of auto-enter.

Why do you need this?

Well it's posible, but I'm as Michael pretty sure you're barking up the wrong tree here. Fully normalized calendaring systems ought to follow a structure in the vicinity of this:

http://www.fmforums.com/forum/showtopic.php?tid/176396/post/204083/hl//fromsearch/1/

Frankly speaking are any other approaches, daft quixotic endevours!

Repeaters are only for utility purposes!!!!! ....and here might the scenario be a sans-jointable many 2 many. But with your version is multicriteria relationships posible both from an autoenter and a calc'field.

Daniele's Extend( trickery can be used here, although we were scatching our heads as to where to deploy it at all ...further more is there an error message when you insist on the autoenter should be of type date... therefore must an unstored calc'field be there to translate the stored format into the OS pref. date format.

I attach the template, well knowing that you would abuse the technique ...but perhaps is it the best way to dissuade people, if you deliberatly let them paint themselves into a corner???

But please do not come and say you weren't warned off propperly!

--sd

daftasabrush.zip

You say it's possible, but I don't see it in your file. You too are using a calculation field, and what's worse, you force a structure of exactly one record per week.

I am guessing the purpose is to create a value list showing dates from the week of record's creation. This could be done simply by a repeating calculation field =


Let ( [

today = Extend ( CreationDate ) ;

sat = today - DayOfWeek ( today )

] ;

sat + Get ( CalculationRepetitionNumber ) 

)

See the name of the file, split into single words!

--sd

  • Author

I appreciate all the advice.

The example worked fine and is MUCH shorter than my script solution.

I didn't realize you could use days since the year 1 that way. It is not mentioned in the Help for the GetAsDate function (at least in 8.5 I'm running on my laptop).

The repeating field is just for display purposes so I THINK I'm safe.

Its for a time sheet where the hours worked, annual, sick, etc., can be entered in a separate repeating field. Then another field accumulates the total and there will be normal processing to generate the stub kinds of information- leave used, balances, etc., all linked to the pay period week, or perhaps biweekly pay period.

Thanks very much,

Bruce

ts for a time sheet where the hours worked

This is the purest form of violation of 1NF...

The repeating field is just for display purposes so I THINK I'm safe

You're most certainly not, with utility purposes as such do I mean invisible to the user such as relational keys, or sliding objects when printing.

Please do read up on relational approaches. Snap out of the spreadsheet'ish metaphors.

--sd

Create an account or sign in to comment

Important Information

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

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.