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.

There must be a way to elegantly loop this...

Featured Replies

Greets, all, and I hope you're in for some eats and treats later in the week.

Please refer to the attached. What I'm doing is creating ten child records with the creation of each parent; each child is populated with a different value (in quotations) destined for the Inclusion__lxt field.

As is, it works, but it's clunky; in my never-ending quest to become more competent with FileMaker, I'm sure there's an elegant way to loop this but I don't know how. (I'm sure it involves an Increment-type step to pick the appropriate value with each iteration, but I be flummoxed.)

As always, your help is appreciated. Thanks!

 

 

Screenshot 2015-11-22 22.46.06.png

Set Variable [ $list ; "Awards¶CV¶Military¶Objective etc...  ]
# Hopefully this is a value list or records in a table instead or separate the values using List ( "Awards" ; "CV" ) etc.
Set Variable [ $ParentID ; RESUME_INCLUSION::_kflt__ResumeParentID]
Freeze Window
Go to Layout [ based upon child table ]
New Record/Request
Set Field [ child::parentID ; $ParentID ]
Loop
Set Variable [ $i ; $i + 1 ]
Set Field [ child::Inclusion ; GetValue ( $list ; $i ]
Exit Loop If [ $i > ValueCount ( $list ) ]
Duplicate Record
#in this way, the child record inherits the parentID so it does not need to be set
End Loop
Go To Layout [ original layout ]

This is untested.

Sorry I didn't follow your table/field names exactly ... I usually do.  But when they are not easy enough to type by hand, it is frustrating to me and I drop them, particularly stuff like '_kflt__'  :-)

2 hours ago, WF7A said:

I'm sure there's an elegant way to loop this

Actually, the elegant way is to create records only when you have something real to put into them.

If you want to present your users with a "grid" against which they can enter data, use a portal to a table of Attributes (where each one of Awards, CV, Education, etc. is an individual record) that can create records in the "real" child table - see a similar example here: http://fmforums.com/topic/98488-show-a-portal-of-potential-entries-not-yet-created-based-on-dates/?do=findComment&comment=447756

 

  • Author

Thank you both! I'll play with your solutions today.--it'll be nice and quiet in the office this week so I'll be able to spend some time with them. Cheers!

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.