Visio Guy

Visio Discussions => Programming & Code => Topic started by: OldSchool1948 on August 08, 2019, 02:17:52 PM

Title: Returing Value for a Type 1 Shape Data Element
Post by: OldSchool1948 on August 08, 2019, 02:17:52 PM
I have a database shape with a "DBVersionNum" shape data element.  It is a dropdown list.

Relevant ShapeSheet cell entries:

I'm trying to return a Format value using vsoShape.Cells("Prop.DBVersionNum").Resultstr("")

Instead of getting the value showing in the Shape Data window, e.g.,SQL2017, I get "INDEX(0,Prop.DBVersionNum.Format)"

Any help would be appreciated.
Title: Re: Returing Value for a Type 1 Shape Data Element
Post by: wapperdude on August 08, 2019, 03:17:47 PM
Everything looks OK and a quick test verified that you ought to see the desired value.  I'm assuming you manually typed in the cell entries rather than copy / paste, as there are minor issues with each one.

Perhaps a simple upload would be beneficial.
Title: Re: Returing Value for a Type 1 Shape Data Element
Post by: OldSchool1948 on August 08, 2019, 09:06:19 PM
Sometimes you can't see the forest for the trees.  In my "MS Database Server" shape sheet, I removed the quotes from around "INDEX(0,Prop.DBVersionNum.Format)"

Problem solved.  How the quotes got there in the first place is another matter. :-\

Thanks for your response, I helped me figure out what I was doing wrong.
Title: Re: Returing Value for a Type 1 Shape Data Element
Post by: Yacine on August 09, 2019, 03:57:22 PM
Clear case of  8) - bad glasses.  ;D
Title: Re: Returing Value for a Type 1 Shape Data Element
Post by: OldSchool1948 on September 10, 2019, 12:28:36 PM
Yep :)