FredP Posted March 28, 2008 Share Posted March 28, 2008 I would like to have a value list that is just a text string, but that I would like to update with a script step. I know how to look up the contents of a value list with my_vl=ValueListItems ( Get(FileName); "Status" ) but what If i wanted to erase and re-populate the text in value list "Status" of the current file? Fred Link to comment Share on other sites More sharing options...
Weetbicks Posted March 30, 2008 Share Posted March 30, 2008 Create a field somewhere which will be the value list. In that field, put the value list contents, one value per line. Then setup the value list to show all values from that field. Then when you want to change the contents of the value list, simply change the contents of the field using the Set Field script step. Link to comment Share on other sites More sharing options...
FredP Posted March 30, 2008 Author Share Posted March 30, 2008 Right! I knew that! hehe. thank you .... Link to comment Share on other sites More sharing options...
FredP Posted March 31, 2008 Author Share Posted March 31, 2008 Well, I tried using a global field as my field to fill with the value list items I want. But when I try to create a value list that is based on that field, it tells me i cannot because the field cannot be indexed. Any thoughts? Fred Link to comment Share on other sites More sharing options...
Ender Posted March 31, 2008 Share Posted March 31, 2008 Don't use a global field. It's best to use a separate table for this value list (and maybe even use the same table to hold multiple value lists, distinguished by a Type field). Link to comment Share on other sites More sharing options...
FredP Posted March 31, 2008 Author Share Posted March 31, 2008 Ok Cool. I have that working. thank you for your help all. Now i have a question. The drop down list seems to be inactive in find mode. I would like to enter find mode, and be able to select from the drop down list the available value list options. It works as expected in browse mode, but in find mode, it reacts as if there is no drop down list at all. Or atleast an empty dropdown list. Not sure... any thoughts? Fred Link to comment Share on other sites More sharing options...
Ender Posted March 31, 2008 Share Posted March 31, 2008 Check that the field you're searching is not globally stored. Link to comment Share on other sites More sharing options...
FredP Posted March 31, 2008 Author Share Posted March 31, 2008 Nope, not global. I created a second table with the record in it to look up values for. What it seems to be, is that I can only get this value list to work in my tableB, if i enable : Include only related values starting from : TableA (Which is the table I am in when I am trying to access this "slightly dynamic" value list. If i turn that relationship off, the drop down works in find mode, but it shows ALL of these value list options that do not pertain to the current tables current record. Obviously i want the drop down to only show values that pertain to the ValueList field in another table based on the relationship. Sorry, its so easy for these things to get convoluded. Link to comment Share on other sites More sharing options...
David Head Posted March 31, 2008 Share Posted March 31, 2008 ... I can only get this value list to work in my tableB, if i enable : Include only related values starting from : TableA (Which is the table I am in when I am trying to access this "slightly dynamic" value list. If i turn that relationship off, the drop down works in find mode, but it shows ALL of these value list options that do not pertain to the current tables current record. Obviously i want the drop down to only show values that pertain to the ValueList field in another table based on the relationship. Think about what you are saying here. Your value list works on the basis of a relationship between a field value and that in another table (related values). When you are in Find mode, does that field have a value? No. So the relationship breaks and no values are displayed. Thinking some more. When you are in Find mode, which value would you like the value list relationship to be based on? The value of the current record in Browse mode? You need to define more clearly what you want to happen, understand why it does not happen, and then make it happen. Link to comment Share on other sites More sharing options...
FredP Posted March 31, 2008 Author Share Posted March 31, 2008 Yeah, I know. Im so confused. Yes, I would "like" the value list, when in find mode, to respect the relationship of the previously browsed record. Or to say it another way, I would like the value list drop down to function identically in find mode, as it does in browse mode where the value list is based on a relationship to the currently browsed records. Its hard for me to think of another way to express this one. Link to comment Share on other sites More sharing options...
David Head Posted March 31, 2008 Share Posted March 31, 2008 Well then the relationship for the value list needs to be based one or more global field values. These values can be set in a scripted process to find records. Make sure you clear them out at the end to avoid unexpected results. The problem is that when you are in Browse mode, you also want the relationship and the value list to work. Tricky issues there. Link to comment Share on other sites More sharing options...
FredP Posted April 1, 2008 Author Share Posted April 1, 2008 How about 2 copies of the field ontop of each other. One uses the value list with relational info and is only available in browse mode. Then a second, that uses a global based dropdown and is only available in find mode. My Find Button executes a script to get me into find mode, I can have that script update the global list before hand. ?? eh? Link to comment Share on other sites More sharing options...
David Head Posted April 1, 2008 Share Posted April 1, 2008 That would work. Link to comment Share on other sites More sharing options...
Recommended Posts