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.

Set data in repeating fields

Featured Replies

  • Newbies

We are using repeating fields over our solutions, but we found that we didn

You can't do it that way actually.

You may use one of the three workarounds :

1) a loop in a repeating field set with a correct tab order and stop the loop when Get(ActiveRepetitionNumber)= TheParameter, then proceed with SetField[(empty);TheValue]

2) change your repeating field to a calculated repeating field and use the Get(RepetitionCalculationNumber) to grab the position where TheValue should be set.

cRepeat*** =

Case(Extend(TheParameter)=Get ( CalculationRepetitionNumber ) and not IsEmpty(Extend(TheValue));Extend(TheValue);cRepeat)

3) use a new occurrence of the Base Table linked to the original from any text id you may have, and set the repeating field to be a lookup from the previous calculation in 2) .

SetField[MyParameter;N]

SetField[iD;ID]

CommitRecord/Request

***the not IsEmpty(Extend(TheValue)) would make sure an empty value cannot be set. If this condition can be valid, then remove it from the calc so that you can delete a specific "row" if needed.

Or use "ClearThisRep" as a marker so that if TheValue = "ClearThisRep", it will be deleted.

HTH

  • Author
  • Newbies

Thanks for your solution. I take the first way. Sometimes, i can

I take the first way

Hopefully not, stop using repeaters at once!!!

i can

Yes, this was part 4 I ommited...

Hopefully, Soren is paying attention smirk.gif

Thanks comment, for pointing me to this thread.

So,repeating fields are kinda' discouraged? I needed a stack and thought a repeating field would be just the ticket. And as you know I ran ino the same "I can't write to a calculated index" thing as well.

Just to get things going I did a nasty hack..

if [index=1]

SetField[stack[1],MyParameter]

else if [index=2]

SetField[stack[2],MyParameter]

else if...

On and on, actually up to 20.

Yuch what a mess! But it got me up and running.

For reading the stack I used a calculated field.

GetRepetition ( stack ; index)

"they're breaking 1NF which dictates one fact per field."

Not being a database person, this may be a really obtuse question but; Why is this something that shouldn't be broken?

-jim lee

Repeating fields are a tool. Like any tool, it depends on the task at hand if the tool fits or not.

Using repeating fields to store "real data", i.e. data that needs to be reported, summarized, extracted, etc., is generally a bad idea. The classic example is an invoice with repeating fields to hold invoice items. Any kind of reporting on the items (e.g. how many of #23 widgets have we sold this year?) becomes virtually impossible.

Repeating fields can ve VERY useful for auxiliary data, such as calculating multi-line keys, or storing values used for other calculations, and certainly for displaying data.

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.