Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5821 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

Hi,

I wonder if there is already a custom function out there that does the following:

parameter: listField, that would be a field with a list of items, e.g.:B

oranges

apples

bananas

I would need the following result:

NumberListItems(listField) =

0001 oranges

0002 apples

0003 bananas

Any ideas? Thanks in advance!

Edited by Guest
Posted

The function itself could be rather trivial:

SerializeValues ( listOfValues )


Let ( [

countValues = ValueCount ( listOfValues ) 

] ;

Case ( countValues > 1 ; SerializeValues ( LeftValues ( listOfValues ; countValues - 1 ) )  & ¶ )

&

Case ( countValues ; SerialIncrement ( "0000" ; countValues ) & " " & GetValue ( listOfValues ; countValues ) )

)

See also:

http://www.briandunning.com/cf/677

However, if you need this you should probably keep the values in separate records of a related table, rather than in a single text field.

This topic is 5821 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.