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.

Convert script to be Server sided

Featured Replies

Hi all,

in regards to this Post,

I tried another way of doing it..

I have an Applescript that takes value of a field,

then uses the "do shell script" command to generate a txt file on the HD,

then another "do shell script" to change line endings from CR to LF, where the output goes to another directory.

This works just fine when ran from FMP,

but I need to make this Server sided, in order to have the resulted file to be updated on a schedule..

here is what I have so far:

file script is:(based on this example

copy cell "PROFESSIONNELS INTER::CalendarName" of current record to fileName

copy cell "PROFESSIONNELS INTER::tout ensemble" of current record to exportMe



set TextFilePath to "~/Desktop/TestCal/"

set CalendarFolderPath to "/Library/Webserver/Documents/phpicalendar/calendars/"



do shell script "echo -n " & quoted form of exportMe & " >" & TextFilePath & quoted form of fileName & ".txt"





set f to TextFilePath & fileName & ".txt"

set target_file to CalendarFolderPath & fileName & ".ics"

do shell script "tr r n < " & f & " > " & target_file

So

Maybe my logic is too complicated, but i tought of making it server sided like this:

1-Search record to send to file

2-Define the variables

3-pass the variables to shell script.

4-execute shell script

is there a way to actually pass the filemaker variables to a shell script?

What would be a good logic to do what i want?

Data can come from a External table, or straight from source table.. which would be best?

Should I try via PHP instead?

Thanks for your answers, (or for your reading) :wink2:

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.