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.

delete all portal rows

Featured Replies

Hey all. Wanting to write a script that removes all related records displayed in a portal row. Currently I have several scripts a user can run that will create a certain number of related records (in this case, 5 days):

 

Freeze Window
Set Variable [$weekid; Value:${Weeks and Data}::week id]
Set Field [Weeks and Data::global_days_count; 5]
Go to Layout ["Hours" (Hours")]
Loop
  Exit Loop If [${Weeks and Data}::global_days_count = 0]
  New Record/Request
  Set Field [Hours::week id; $weekid]
  Set Field [Weeks and Data::global_days_count; ${Weeks and Data}::global_days_count - 1]
End Loop
Go to Layout ["Weeks and Data" (Week and Data)]

 

Now, the user can create as many "days" as he/she wants. I want this script to remove all the related records (days) no matter how many have been created. I have written a script that potentially just reverses the above, but I'm concerned that it *may* remove all the records within the Hours table, and at this point I would rather get a pro's opinion when so much data is at steak. 

 

Thank you all for your help.

What are you trying to accomplish in real world terms? The point?

  • Author

What are you trying to accomplish in real world terms? The point?

 

hmm. i'm unsure what you mean by "real world terms" - i thought this forum was a place to come when a layman is seeking help. i thought i laid out my intentions pretty well in the OP. the database is merely a small project i've been working on developing since i started trying to learn filemaker. the application tracks hours worked and gives an estimated paycheck amount. sometimes i try to look ahead at what i may earn by entering supposedly worked hours. instead of clearing every field, i'd rather just delete the records.

Try something like this...

If[ Count ( RelatedTable::id ) // make sure related records exist]
    Go To Related Records[ RelatedTable ; RelatedTablesLayout ]
    Delete All Records
    Go to Layout[Original]
EndIf

Madman411,

Thanks. I didn't understand your intent in the OP. your reply spells it out.

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.