Author Topic: Shape Data fixed lists, keeping them centralized in a 'Configuration shape'.  (Read 1069 times)

0 Members and 1 Guest are viewing this topic.

Visisthebest

  • Sr. Member
  • ****
  • Posts: 462
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!
« Last Edit: September 14, 2021, 05:35:49 AM by Visisthebest »
Visio 2021 Professional

Surrogate

  • Hero Member
  • *****
  • Posts: 1357
    • ShapeSheet™ Knowledge Base
You need different fixed lists for each page or single fixed list for whole document (global fixed list) ?

Visisthebest

  • Sr. Member
  • ****
  • Posts: 462
For each page.
Visio 2021 Professional

Visisthebest

  • Sr. Member
  • ****
  • Posts: 462
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

  • Hero Member
  • *****
  • Posts: 1357
    • ShapeSheet™ Knowledge Base
The 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.
« Last Edit: September 14, 2021, 06:29:12 AM by Surrogate »

Visisthebest

  • Sr. Member
  • ****
  • Posts: 462
Non-hardcore fortunately, very useful solution thank you Surrogate!
Visio 2021 Professional

vojo

  • Hero Member
  • *****
  • Posts: 1581
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")

Visisthebest

  • Sr. Member
  • ****
  • Posts: 462
Thank you Vojo!
Visio 2021 Professional