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.

Field is missing (error 102) on a Repeating Field

Featured Replies

On my layout I have a field called ProblemList that is defined as a repeating field with up to 50 repetitions. In php I'm trying to insert a record into the table on this layout but I can't seem to do it if I include setting the ProblemList field with a repetition greater than 0.

All of the "problems" I want to insert into the ProblemList field are stored in an array called $problems. I am looping through them and using the setField command to specify the repetition number. Here's my code:


$counter = 0;

foreach($problems as $problem) {

  $request->setField('ProblemList', $problem[1], $counter);

  $counter += 1;

}
  



On my layout, I have the ProblemList field set to an edit box, and I've hidden it by making the text the same color as the background.



It works if I do the following:




$request->setField('ProblemList', $problem[1], 0)

But then of course it only stores one of them. When the counter is incremented, it stops working. Any ideas on this?

Thank you!

~Joanna

You need all of the repetitions that you want to write to displayed on the layout.

Also, it sounds like you are using the same layout for client access and API development. This is generally a bad idea that can lead to long page load times. You will be better off building API specific layouts that contain only the fields you wish to access via the API.

I'm also assuming that your $problems array is an array of arrays and you always want to grab the second value.

something like

$problems = array(array("a","one"), array("b","two"), array("c","three"));

where you want to write "one", "two", and "three" to the database.

  • Author

Baloo, that solved my problem, thank you so much!

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.