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.

Coping in an empty field...

Featured Replies

Hi, again:

In my DB a user needs to copy information to a portal without having see the portal, it is possible to do this with a Script...

He needs to copy of three fields towards the portal which contains six fields, the first three fields used, by which I need that he copies in the field 4, 5 and 6..

It is important that they are copied in the empty fields, for example, in my portal(See above) I have 2 records of which 1 do not have descripcion in fields 4, 5 and 6 he begins for the record 2 field 4...

PORTAL

FIELD1 FIELD2 FIELD3 FIELD4 FIELD5 FIELD6

VALID VALID VALID VALID VALID VALID

VALID VALID VALID EMPTY EMPTY EMPTY

I hope you can understand my message, please forgive my English, I am in wait of your commentaries.

Best regards

If there is only one unique related record this is easy, just use the Set Field command in your script to set the fields in the related record.

Set Field [::”Relationship::Field4”, “Field in this file”]

Set Field [::”Relationship::Field5”, “Field in this file”]

Set Field [::”Relationship::Field6”, “Field in this file”]

If you only want to enter data if the field is empty, you will need to add an “If” step:

If [“IsEmpty(Relationship::Field4)”]

Set Field [::”Relationship::Field4”, “Field in this file”]

End If

And do this for each field.

When you enter the set field command in a script and click on “Field” to tell it which field, there is a drop down menu at the top of the popup, you can select the relationship here.

Hope this helps,

Rigsby

  • Author

thanks for your answer...

the script works but just work with the first empty filed in the first row, if I create many records in my portal this script doesn't work with the next portal rows, what do you thing it's happening ?

I need that this is applied in every field of the empty portal due to the fact that he is a user who can not see the portal just need copy the informatio trough the script.

Thanks again for your help.... This is the best forum about File Maker

Thanks (GRACIAS)

Jorgito

In your original question: I'm not sure what you mean by portal fields. Do you mean the portal rows, or fields in each related record.

A portal lists related records in the form of a table. The "order" of the rows (related records) is determined by the sort order that is associated with the protal's relationship. So part of the challenge when dealing with portals is determining exactly which related record is the "first".

I think this could be done with a script: on the master record with the portal, use the "Go to related record [show]" step to perform a "find" in the related database and isolate the records. Then perform a script in the related database that sorts the records (so the order is the same as the portal) then performs whatever field magic is neccesary. Call a script in the master file to return to the original databaase and layout.

The trick here is 1) sorting the related records; and 2) having scripts in both databases, each to perform their own part of the process.

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.