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

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

Recommended Posts

Posted

I have a value list called "Pricelist". I have a popup showing the value list so that I can select an item. Now I want a script trigger that after someone selects a current category, only the items from this category will be displayed.

If I go into the value list editor, I can select "show only related items, …) and this works fine but of course I want to do this in a script step, so that when there is no category selected, it will display all items (if I do this now, it won't display anything based on the relationship).

Posted

I'm not sure about the script triggers... You can get a ValueList to automatically switch between two different lists by setting up some special relationships and calculations.

Assuming that you have two fields: 'Category' and 'Item', then do the following:

Define 2 calculated fields:

1. 'ValueList calc' = If (IsEmpty(Category) ;

ValueListItems ( Get(FileName); "All Items" ); ValueListItems ( Get(FileName); "Related Items" ) )

2. 'RecID' = Get(RecordID)

Create 2 extra instances of your table in the relationship graph and create the following self-join relationships:

1. Table::Category = Table2::Category

2. Table::RecID = Table3::RecID

Define 3 value lists:

1) 'All Items' = From Field: "Table::Item"

2) 'Related Items' = From Field: "Table2::Item (related values only)

3) Define the 'PriceList' = From Field: "Table3::ValueList calc" (related values only)

Posted

Thanks, mfero's one seems to work well. I like calculation fields better to be honest, there are still some people in the office using 8.5.

I have one other question. If I have a calculation field that is filled with price IDs (13, 15, 3032, 3504), is it possible to have another relationship with a table that can give names to this, so that I can have a value list with the first column being the ID and the second value the actual name of the corresponding price item?

Posted

... is it possible to have another relationship with a table that can give names to this, so that I can have a value list with the first column being the ID and the second value the actual name of the corresponding price item?

I don't think the "Also display values from 2nd field" feature of Value Lists will function correctly with the approach I described.

However, you can display a corresponding name or number to your item in a second field if you set up a relationship for this.

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