Progressive drop downs

Started by jebuxx, December 30, 2014, 09:54:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jebuxx

Hello,
  Sheet 1 is a drop down list of 20 items. example; SF-01;SF-02;SF-03;SF-04:
  I am trying to create a second drop down that is populated by the selection of sheet 1
Example;
SF-01 has two address panels available, 1F & 2F
SF-02 on the other hand has 2 panels also but due to the folding config these panels are 2F & 3F
When SF-01 is the selection in sheet one I would like it to trigger sheet 2 to be a drop down with only 1F & 2F to be available in the drop down selection list
When SF-02 is selected on sheet one I would like only the panels that are available to be in the drop down selection list.
And so on for all 20 items.
Thanx again

Thomas Winkel

Hi,

I'm note sure if I got it right.
But please try out the attached example.
This are two different implementations, see the user and property fields in the shapesheet for more information.

Has someone an idea why the string "2F" ist displayed as "2 ft" in the drop down menu?

Regards,
Thomas

jebuxx

Works great!!! I just needed to add DOCMD(1312) to the Event dropdown in the shape sheet and wella  worked as I had hoped. Thanx a ton!!!!

Visio Guy

Looks like Visio also accepts "F" and "I" as abbreviations for feet and inches.

Oddly, you can't type 2F into a ShapeSheet cell, but you can type 2Ft into a ShapeSheet cell.

But if you type = 0 + "2F", it will evaluate to 2', which is 2 feet. The text is getting evaluated. The workaround would be to not have items like 5F, but, perhaps 5-F or 5/F, if possible. I know this sucks. Yet another Visio quirk.
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Thomas Winkel

Ups, Chris was faster...

Great.
Btw. I guess Visio interprets "xF" as x feet -> "x ft" with x = any number.

jebuxx

attached is the file sent with the DOCMD(1312) added to the EventsDblClick - the drop downs work

Thanx again!! This site ROCKS!!!

vojo

Note...you can play with hide/unhide cells to make more complicated drop downs using docmd(1312)

props.base.hidden = 0
user.select = 0
eventdblclk = docmd(1312)
<this presents a single prop cell formatted to a list of values....say "first","second","third">
<user picks the value>
user.select = props.select + setf(getref(props.base.hidden),1)+ docmd(1312) + setf(getref(props.base.hidden), 0)
props.first01.hidden = if(strsame(user.select, "first"), 0,1)
...
props.first99.hidden = if(strsame(user.select, "first"),0,1)

props.second01.hidden = if(strsame(user.select, "second"), 0,1)
...
props.second99.hidden = if(strsame(user.select, "second"),0,1)


props.third01.hidden = if(strsame(user.select, "third"), 0,1)
...
props.third99.hidden = if(strsame(user.select, "third"),0,1)

etc.


I have used this approach to go 2 deep / 4 wide

Thomas Winkel

#7
Nice one, vojo!
But I don't understand what props.base is for.
I guess you want to hide the base property when the user is asked for the sub-properties?

I attached a document with all variants:
* 1+2: As above, but in a single shape
* 3: New variant, my favorite
* 4: My interpretation of vojos code

Another shape data tip:
I require my users to have the shape data panel always open, it can nicely be docked below the shape panel, see attached screenshot.
A problem with docmd(1312) is that it requires a second iteration to update the drop down list.
In the shape data panel the list is instantly updated.
Also you can modify the data of all selected shapes at once.


Edit:
Just discovered the delimiter argument of the index function.
So substitute is no longer required in variant 1.
Attached document is updated.