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.

Return in parsed order

Featured Replies

I have a ¶ delimited list of numbers in a field.

I need the outcome to be:

first value - second value

second value - third value

third value - fourth value

etc.

Example :)

List is

900

200

600

500

Outcome:

900 - 200

200 - 600

600 - 500

I managed to have the first and the second, and then I'm stuck.

Any hint ?

TIA

Two questions:

1. What is the purpose of this manipulation?

2. Is the number of given values constant, and if not, how many values will there be at most?

  • Author

1. One of the ivory tower guys wants to see it that way.

2. Can range from 1 to 20 - 25

This is a recursive calculation, so a custom function would be in order. However, since it's for display only, you could use a repeating calculation field instead (result is Text ) =


Let ( [

v = Extend ( YourField ) ;  

i = Get ( CalculationRepetitionNumber ) 

] ; 

Case ( 

i < ValueCount ( v ) ;

GetValue ( v ; i ) & " - " & GetValue ( v ; i + 1 )

)

)

  • Author

Thanks Comment.

Or I do something wrong, or I don't know how to implement this but I get as result only the two first values.

And probably I don't know how to use a repeating calculation....

When defining the calculation field, specify the number of repetitions as 25 (or more). Back in Layout mode, double-click the field and specify "Show repetitions:" 1 through 25 (or more).

  • Author

That did it.

Learned a lot today.

Thanks again.

  • Author

Comment,

just to close the circle, what do I have to change to make your calc act as a custom function ?

Change? Everything - or nothing, depends on how you look at it. It's not a matter of changing, it requires another approach altogether.

I am more than sure that Michael could write a more refined Recursive CF but here is one.

Function Name: Hyphenate ( Field ):)

Case ( ValueCount ( Field ) > 1; 

       GetValue ( Field ; 1 ) & " - " & GetValue ( Field ; 2 ) &  ¶  &  

       Hyphenate ( RightValues ( Field ; ValueCount ( Field ) - 1 ) )

     )

No, that's pretty much it, come to think of it*. Though I would put ValueCount (Field ) into a variable, instead of counting twice.

---

(*) That is assuming we want to return null when the input is a single value. Otherwise it gets a bit complicated.

Edited by Guest

  • Author

Works great.

Thank you.

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.