Shape Data fixed lists, keeping them centralized in a 'Configuration shape'.

Started by Visisthebest, September 14, 2021, 10:29:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Visisthebest

I would like to use several Shape Data fixed lists on my shapes, but keep the list store in a centralized 'configuration shape'.

I can easily accomplish this by setting Format in all the shapes to point to the Format field in the centralized shape, like this formula:

=ConfigurationShape!Prop.Row_1.Format

Please note for this use case I don't mind that the shapes break when copied to another page that does not have the configuration shape. (I do a lot of verification in code on the shapes).

(I can verify if a shape is copied, which invalidates the lookup data as these lists may be different and lead to incorrect results).

Another issue is the user changing the list in the configuration shape (via Define shape data) and invalidating all the lookup values in the other shapes.

So the lookup will actually be something like:
=ConfigurationShape!User.LookUpX.Format

So the user can no longer use Define shape data. I will add a custom WinForm editor that does validation on the changes to the lookup list. (forcing the user to add a unique ID in a separate field that I add to the beginning of the lookup's text)

The configuration shape cannot be deleted without the user going in to the Developer Tab. (as far as I know that is the only way to remove delete protection).

One problem is still that the user can change the Format (lookup list) in each shape, is there a way I can block editing the settings of (a particular) shape data field?

Thank you for sharing your insights!
Visio 2021 Professional

Surrogate

You need different fixed lists for each page or single fixed list for whole document (global fixed list) ?


Visisthebest

One problem is still that the user can change the Format (lookup list) in each shape, is there a way I can block editing the settings of (a particular) shape data field?

The user can still change which lookup value is selected, but no longer edit the Format field/list of available values.
Visio 2021 Professional

Surrogate

Quote from: Visisthebest on September 14, 2021, 10:37:28 AMThe user can still change which lookup value is selected, but no longer edit the Format field/list of available values.
What kind of users do you mean: hardcore users (who use ShapeSheet) or non-hardcore (who use only user interface) ?
If non-hardcore, you can use trick like as in attachment.

Visisthebest

Non-hardcore fortunately, very useful solution thank you Surrogate!
Visio 2021 Professional

vojo

have to play around with this, but

user.myformat = guard("a;b;c")
prop.format = user.myformat

or try
prop.format = guard ("a;b;c")