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.

[FP3] script in a portal

Featured Replies

This is my first FM and contains the in/out post between my office and others in diferent cities. I made one file (register) and two related files (in and out): each record with the fields (from, to, date, reference, issue, reference out).

In the register file I made two layouts (in and out), each one with a portal that shows and filters the records.

I would like to automatize one thing. When I create a new record in the out portal, and I type de "reference" field, I'd like FM to find this record in the "in" portal, type the reference in the "reference out" field and get the "issue" field value and type it back in the "issue" field in the "out" portal.

I don't know if it's clear. Sorry for my english.

I made a Script that runs from the "out" file, but when I try to run it from the portal (I made a button) it doesn't work. I think that it tries to run taking the value of the first row in the portal.

This is the script:

SetField ["gRefOut","AllOut::Reference"]

SetField ["gRefOut IssIn",""BCN" & AllOut::Reference & "/" & AllOut::Year"]

RunScript [subscript, in.FP3]

If ["gRefOut IssIn<>"""]

SetField ["AllOut::Issue","gRefOut IssIn"]

EndIf

The in.FP3 Script is a Loop that looks for the related record, sets the "Reference out" field, and gets the "issue" field.

  • Author

I just fixed it from an other topic in this forum: I needed a

gPortalRow= Status(CurrentPortalRow)

in the first line of the script.

Another question. Is it possible to run this script automatically when the "reference" field is just filled?. Now I do it by a button.

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.