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.

rewrite of an expression when moving to a server

Featured Replies

On a local machine I have been using the following expression as part of a script to set an image reference to a container field:
 

If (inv_INVOICE_LINES::pose<>" ";"imagewin:/W:/" &INV_INVOICES::id_Session&"/Previews/" & Trim(inv_INVOICE_LINES::pose) & ".jpg";"")

Now I have moved the Fm12 file to a server and have moved all the images to the root drive of the server in a folder named "images".

In other words the images are now in c:images ...     on the server.  All the sub folders previously on the "W" drive have been moved as well.

I can't seem to get the imagewin expression to find the new location.

 

Keep in mind that most everything is evaluated by the client in this case.  So if you change the path to c:images, the client machine will look on its OWN c: drive, not the server's.

The fact that the file is hosted is irrelevant for the most part since the FM "code" is executed by the client

  • Author

So if the server name is "mainserver" would this than be correct?

 

If (inv_INVOICE_LINES::pose<>" ";"imagewin:/mainserver/c:/images/" &INV_INVOICES::id_Session&"/Previews/" & Trim(inv_INVOICE_LINES::pose) & ".jpg";"")

No, the syntax that Comment mentioned uses the UNC format of a network share.

What you had before was (very likely) a drive letter (W) mapped to a network share

 

The common ground here is the network share.  First you need to decide whether you want to work with mapped drives or not, or if you want to address the network share directly

  • Author

OK Thanks

I will designate  the shared folder on the server to "W" and hopefully all will be good.

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.