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

Picking a value from a value list


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

Recommended Posts

Posted

Hi guys,

Im sure there must be a calculation for this, but I have a value list which contains

A

B

C

D

I want to create a field that picks the second value, i.e B from the value list. Can anyone help please?

Thanks

Jalz

Posted

Have your value list be a repeating global field. Then use the GetRepetition command.

That's one way. It's kinda kludgy.

The other alternative? Use the "SetField" command to put a specific value into the field, rather than choosing from a value list.

Posted

You can extract text from a field using this function:

Middle (text, start, size)

You can extract text from value lists with this function:

ValueListItems (dbname, valuelist)

E.g.: ValueListItems(Status(CurrentFileName), "abc")

E.g.: Middle (ValueListItems(Status(CurrentFileName), "abc"), start, size)

Each value in a value list is separated by a carriage return. The second value in the list starts 1 character after the first return, and ends 1 character before the second return.

You can find where the carriage returns occur with this function:

Position (text, search

Posted

Thanks Guys,

Fitch's solution worked perfectly for me.

  • 3 months later...
  • Newbies
Posted

I needed to extract:

[email protected]

from

Joseph Sample <[email protected]>

This seemed to work:

Middle

(Contact Name_Email Address,

Position(Contact Name_Email Address, "<", 1, 1) + 1,

Position(Contact Name_Email Address, ">", 1, 1) - Position(Contact Name_Email Address, "<", 1, 1) - 1)

I modified your formula to my needs. Thanks for your help!

Posted

Hi,

Here's an alternative, adapted from a post by Ray (CobaltSky) sometime ago.

Substitute(MiddleWords(Substitute(Substitute(Contact Name_Email Address, " <"," <"& "

This topic is 7810 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.