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.

Get (ActiveFieldContents): invalid argument was encountered

Featured Replies

  • Newbies

Hi,

I've written a simple script to copy any active selection to a field, using the following functions:

Middle

(

Get (ActiveFieldContents);

Get (ActiveSelectionStart);

Get (ActiveSelectionSize)

)

The problem is that for some types of content the script copies only a portion of the selection (whether the field be a text or calculation field).

When I try to evaluate the first expression -- Get (ActiveFieldContents) -- in the DataViewer, I get the following message:

invalid argument was encountered

and then the DataViewer goes blank.

In particular, this bug occurs when the source field in question contains text with a lot of unusual characters and diacritics (I work on medieval german and english), e.g.

Ni sínt thie ímo ouh derien, in thiu nan Fránkon werien; 104 thie snélli sine irbiten, thaz síe nan umbiriten. 105 Wanta állaz thaz sies thénkent, sie ịz al mit góte wirkent; 106 ni dúent sies wíht in noti ána sin girati

Could it be that such characters confuse the Get (ActiveFieldContents)-function? Because when I insert normal text in the same field the function works fine... (Although I see no particular reason why?)

Any suggestions?

Kind regards

Daan Ghent Belgium

This is kindof a long shot, but if the "ActiveField" is defined as numeric, that could cause your script to return errors.

Please tell me if this is the case.

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.