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.

Featured Replies

  • Newbies

I wrote an app about 6 months and I can't remember how I did this:

1. Add a file to a container (store only the reference to the file)

2. Populate a field with the name of the file

 

I can't find the script or a trigger that allowed me to do this. I remember writing something to do this because I had to parse out the name and set the field with the file name so I know I am not crazy. 

Note: There is no script trigger or button setup on the container field or the field I populated with the name. I also don't see a script (under manage scripts) that is parsing a file path so I don't think I did it with a script.

 

I guess my question is how does filemaker know when a container field is populated, and where would the script be to do something when it changes.

 

THIS IS DRIVING ME CRAZY!

To trap a field being changed using any of the field-level triggers (onModify, onSave, onValidate,...)

 

To get the path of a container you can use any of the GetContainerAttribute function switches, like: GetContainerAttribute ( theContainer ; "all" )

or set a text field to the container field and you will get some info, including the path

  • 3 months later...

You may have done with a calculation field which resturn filename using

GetAsText ( container_field)

then parsing "/"

 

Source

  • 2 weeks later...

I wrote following script and solved my issue. Make sure while running the script the new path is accessible.

 

SCRIPT Update FilePath:

Go to Record/Request/Page [ First ]
Loop
Set Variable [ $old; Value:GetAsText ( Table::container_field ) ]
Set Variable [ $new; Value:Substitute ( $old ; "/old folder/" ;"/new folder/" ) ]
Insert File [ Table::container_field; “$new” ] [ Reference ]
Go to Record/Request/Page [ Next; Exit after last ]
End Loop

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.