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

Generate value list from number


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

Recommended Posts

Posted

Hi All,

I don't know if it is possible but I would like to generate a value list based on a field (Jobs::sets) with a number. If the number is 5 for example, I would like to be able to have a drop down list of numbers 0 - 5 as well as a selection for all. So it might look something like this:

-All-

1

2

3

4

5

Any help is greatly appreciated

Posted

This can certainly be done with a separate table containing the numeric values you want to display.

Set up a value list to show only values in the related table starting from the current table. The relationship is values less than or equal to the number you have in your field (e.g. 5).

Posted (edited)

So let me see if I understand correctly. In a new table I would have a field called number, then create a record for each number up to the maximumum that I need. Then I would create a relationship from Jobs::sets to New Table::numbers ( less than or equal to Jobs::sets ). Then set up a value list based on the number field and showing only values in the related table starting from Jobs?

Is that correct?

Edited by Guest
Posted

Yes, that is correct.

Adding in an extra entry "-Any-" to the value list will be trickier but not impossible. One way might be to add a second field (for value list display) to the new table. An extra record with a number '0' could hold this "-Any-" value so that it would appear on all lists.

Posted

I do know a technique for adding the -All- with a calculated field.

xset_select= "-All-" & ¶ & ValueListItems ( Get ( FileName ) ; "Sets" )

So I should be ok there.

I got pulled away from the project today but I am sure I understand it so I should be all set when I get back to it.

Thanks so much for the help.

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