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.

MiddleValues trailing return character

Featured Replies

I have just tracked down spurious behaviour in my database to the MiddleValues function. Using it to extract a single value out of a list results in the single value plus a trailing return character.

Whilst this can be removed with substitute function I was wondering if this is deliberate behaviour of MiddleValues as it does not seem consistent with the function description.

Can anyone advise me?

Regards

Jim

Not sure about this being the answer, but I would try using Trim4(Yourcurrentcalc)

Trim4 is a Custom Function you can get Here

The trailing paragraph is expected behaviour with the LeftValues(), MiddleValues() and RightValues() functions. Documented, too.

Lee's suggestion of the Trim4() function is my standard solution.

  • Author

Thanks both.

You are right, it is documented now I read it (twice ) again !

Jim

All xValues() functions return a result followed by a trailing carriage return. To extract a single value out of a list, you'd be better off using GetValue().

All of the xValues include the trailing return and the idea is that you can extract multiple values without having to insert carriage returns.

Since xValues usually returns single or specific item(s), and if you want to concatenate them, you would need to use an If() statement in the middle to decide whether or not to place a return in the middle of both lists. If either list is empty, the extra leading carriage return would corrupt your list.

So I think the idea is ... you are working with lists and a carriage return follows every list data-line so it has to be one way or the other for consistency. A trailing CR isn't an issue ... ValueCount() skips trailing. But somewhere, somehow (when you least expect it), you'll have to decide whether you want a CR or not. With all xValues including a carriage return, it seems safest than removing it later.

At least that's my theory and I'm sticking to it. :mickey:

OOOPS ... I was typing slowly attempting to formulate my words properly (for a change), Michael, and I didn't see your post. :blush2:

Edited by Guest
Added update

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.