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.

creating uncommitted portal records

Featured Replies

Hello

If I am on a layout with portals and need to create a new record in the portal through scripting (and the portal has required fields in it), is there any way I can create it without committing the new portal record and not get any errors for not completing the required fields?

Joe

You can have the user enter dat into global fields and have your script create the related record for you.

  • Author

I'd rather have them enter directly into the fields unfortunetely

You can enter data into a portal row and if you dont want it to commit, you can revert the record. As for your required fields, I am not sure what validation has to do with your reverting the record.

Create the new portal record in a new window.

  • Author

The problem is that I want to create the portal record through a script and pre-populate certain fields, then have the user enter the remaining fields in the record.

When I go to create the portal record through the script (by opening a new window and going to the portal table in the new window to create the record), the script will not close the window or exit the record without committing the record. So I can't get back my layout with the portal record for the user to enter the remaining data.

Edited by Guest

  • Author

I am doing that actually. The script will not close the new window or exit the record without committing it.

You can still address the related fields in your script. The fields that need to auto fill do not need to be on the layout.

Why not have these field do an auto-enter?

  • Author

Some of them are auto-entered.

The problem is that when I try to leave the window with the portal table in it, I cannot because there are required fields in it that I cannot populate through the script. The user must enter these when the script is complete.

1) In the script, do you have the script step, Set Error Capture[On]?

2) Change the validation. You don't say what the validations are so suggestions are tough, but using Get(RecordModificationCount), or a variable set by script can work around this.

  • Author

I just tried set error capture on, but that did not work either.

Its not really validations, but required fields that are preventing me from leaving the window I am using to create the new portal record and returning to the layout.

Its not really validations, but required fields that are preventing me from leaving the window I am using to create the new portal record and returning to the layout.

Isnt that a form of validation?

  • Author

Yes. They are just required fields though. I would rather not unrequire them and validate the presence of data through a script.

I dont follow your process. Why dont you create allow creation of record through your portal to create the record? You can set the data that you want using set field. Then the users can enter in the rest of the data.

  • Author

I can't do that. The layout contains budget information. At certain times, I am "locking" the layout from editing with a script.

However, the locking script does not prevent users from inserting new records. So, I removed the ability for users to create records on the layout and added a "create record" button that when pressed checks if the budget is locked. If not, the script opens a new window to create a portal record and returns to the layout for the user to enter data

You can make each enterable field in the portal row check to see if you have it "locked". If locked then show custom dialog. If not then go to the field.

I am assuming that you dont mean FileMaker's record locking here but rather a lock feature you have incorporated...

  • Author

What you are describing is what I am doing to prevent the editing of existing records. However, this process will not prevent a user from creating a new record.. Thus requiring the need to create new records through the pop-up window and my current dilemma.

The worst case scenario is that I commit the records upon creation through the script and hope users complete the data entry.

I fear we're talking too much in generalities here. How many fields in a related record require validation? What is the validation (not empty, unique, etc)? What does the base table represent? The portal? Rather than us saying, "Try this" and you saying, "I did", tell us what's going on.

Without that I can suggest (again) using Get(RecordModificationCount) for validation in an auto-enter calc.

Edited by Guest

  • Author

The fields are just required, no other validations.

But someone here may have found something that will help: adding global fields to the portal tab. The users can enter the data in the globabls and click a button. Upon clicking, if the budget is not locked and all data has been properly entered, the globals can be copied to the real portal fields.

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.