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

Value list pop up to only display 1st word


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

Recommended Posts

Posted

I have a value list with items like:

rro Rushford Ross Orton Design

scc Salt City Candle Company

cure CureCrete

A field with a pop-up us used to select an item. Is there a way to have it so that when the item is selected only the first word is populated into the field and the rest are ignored?

And also a variation, is there a way to do the same but have just the first word ignored and the rest are used?

LR

Posted

There are ways to achieve both the things you mention, however which approach is best depends somewhat on how your value list is defined (eg whether it is hard coded or taken from a field) and also on what the final purpose is for wanting to do this.

Perhaps the simplest way is to define the value list to take values from two fields (one which has the acronym and the other which has the name). although both fields will be displayed in the resulting list, only the first (in this case the acronym) will be entered into the field.

A further set of tecniques involves the use of a separate calculating field which strips off the first word (or everything but the first word). If you set it on your layout exactly over the top of the pop-up field, give it an opaque fill color and turn the "Allow entry into field" option off.

Then when you click on the calc field, the pop-up field will jump to the front and you will be able to select a value - however as soon as you click out of it, the pop-up will return to the front and the calculation result will be what shows.

A formula you could use to parse the first word would be:

Middle(popUp, 1, Position(popUp, " ", 1, 1) - 1)

or to parse out everything but the first word, you could use:

Middle(popUp, Position(popUp, " ", 1, 1) + 1, Length(popUp) - Position(popUp, " ", 1, 1))

Some other quite different approaches would include:

1. Using look-ups from a reference file to bring the separate elements across based on the value list selection

2. Using an internal look-up from an unstored calculation to automatically replace the selected value with the desired value (as per the formulae suggested above.

3. setting the pop-up field as a button to trigger a script which pauses in a loop until the value is selected, then performs a Set Field [ ] command to strip the unwanted component of the value list selection from the value in the field.

There are a few other variations also... Which is best depends on where the values are coming from, how often they change and what you hope to do with the values once you have them in the form you want.

Posted

This is a good tip. I follow what you are saying. A bit of a odd workaround, but it sounds like the perfect solution. Thanks. I am going to give it a whirl.

LR

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