How do I refer the shape's data from sub-shape of Visio custom shape - visio

I'm trying to design a custom shape in Visio.
My structure is like this:
In the "Edit Master" page I have some rectangles, I called my shape "MyDay", so that's its document's name in the Master Explorer and in the edit window.
My problem is, that I can't find a way to refer the shape's date itself (like =MyDay!Name() or =MyDay!User.MyUserField) from one of my sub-shapes.
If I add a reference to ThePage and drop the master on a page - I adds that property to the page itself - again - no reference to the main shape from its sub-shapes.
I know there is no "Parent" property in ShapeSheet formulas (only on VBA), but I'm really trying to find a way to refer it using fields or formulas, without the need to write and run VBA code.
Many appreciations for any help!

Paul is correct, but I will add that it is normally expected that a Master contains only one shape, but that can be a group shape that contains other shapes. Therefore, a formula in a sub-shape can refer to any shape in that group, including the top level group shape, using the Sheet.n syntax. When an instance of the master shape is dropped onto a page, then Visio will automatically update the n ID to the actual shape ID in the page. The shape ID has to be unique within the shapes collection that it is part of, so the top-level group shape needs to be assigned a new unique ID, but the sub-shapes do not because they already have an ID that is unique within the shapes collection that they are part of.

You need to find the parent shape's Sheet reference number (select it and then ribbon Developer -> Shape Name -> Shape). This will be something like Sheet.6.
Use this reference in your formula e.g.
Sheet.6!User.MyUserField

Related

Working with elements "diagram properties" in script

I have an my own MDG, consist of several elements. I need change view of those elements when its placed at different diagram. There is a mechanism called "user-selected settings" in MDG and I use its to change view of elements (e.g. via shape script function "HasProp" ). But for several reason I need to change diagram property for element via script. Are there any way to work with diagram property for element within script ?
It's possible but a bit tricky. First of all you need to get hold of the right diagram's table data stored in t_diagram. Issue a SQL like
SELECT StyleEx FROM t_diagram WHERE Diagram_ID = <theID>
Of course <theID> must be the diagram id of the diagram. Now you can use some string operations. Here's what my test diagram brought:
ExcludeRTF=0;DocAll=0;HideQuals=0;AttPkg=1;ShowTests=0;ShowMaint=0;SuppressFOC=1;MatrixActive=0;SwimlanesActive=1;KanbanActive=0;MatrixLineWidth=1;MatrixLineClr=0;MatrixLocked=0;TConnectorNotation=UML 2.1;TExplicitNavigability=0;AdvancedElementProps=1;AdvancedFeatureProps=1;AdvancedConnectorProps=1;m_bElementClassifier=1;ProfileData=;MDGDgm=VW VA Functional 3::Use case activity;STBLDgm=;ShowNotes=0;OPTIONS_9CEFE070=Structure=1:;VisibleAttributeDetail=0;ShowOpRetType=1;SuppressBrackets=0;SuppConnectorLabels=0;PrintPageHeadFoot=0;ShowAsList=0;SuppressedCompartments=;Theme=:119;SaveTag=79E21B13;;
which is a CSV at its best. See the
OPTIONS_9CEFE070=Structure=1:;
which actually encodes the diagram properties. Here it's just one with the name Structure and its value is set to 1. The 9CEFE070 refers to the GUID the diagram object. Of course not directly.
So find the diagram objects of the diagram itself with
SELECT Object_ID, ObjectStyle FROM t_diagramobjects
The Object_ID is for identifying the object behind (you might use a join to get needed information). And the ObjectStlye contains something like (from my test)
DUID=9CEFE070;HideIcon=0;
And there you have that hex string. Now you know that this one object has a diagram property set.
You should issue some queries manually to get familiar with that.
Now, to set a property, you "just" have to find the DUID from the diagram object of the diagram (just use the query above). Now you can add that OPTIONS_<duid> part or in case it already exists you need to modify it with according string operations. Finally you need to update the diagram table with
Repository.Execute("UPDATE t_diagram SET StyleEx = `<new string>` WHERE diagram_id = <theID>")
Note that this is an undocumented operation and you get
a) no support and
b) can easily clobber your whole model which is
c) the reason for a).
Have a backup!

Cannot Hide Data Field in Visio Org Chart

I am creating an org chart from an excel spreadsheet. Each row has Employee Name and Job Title, but also Employee ID and Supervisor Employee ID (both number data types).
I am using the Organization Chart Wizard to automatically create an org chart as a starting point (its pretty big). In doing so, I use the two numeric fields in the "name" and "reports to" fields because we have employees with the same name. However, I do not want these numerical fields displayed in the org chart shapes. You can see in the second picture I cannot remove the three default fields from the chosen "Shape Data Fields."
Here's what the shapes look like, I want to remove the number field altogether. Regardless of the shape stencil I select, I get the same behavior.
If I try to delete the shape, I get the error "shape protection, container and/or layer properties prevent complete execution." Even when I go to Developer -> Protection -> Unlock, the issue persists. Thus, it must be an issue with the container or layer properties.
Lastly, this page has a "To Delete a data field" section at the bottom. I tried exactly this, and the fields were removed from the Define Shape Data box, but the shapes remained unchanged, still showing all fields:
https://support.office.com/en-us/article/Add-data-to-shapes-09272394-5243-4e1b-bcfa-425a8b4d1ce2?ui=en-US&rs=en-US&ad=US
Tweak the master you want to use by decorticating its structure.
In the drawing explorer check whether the shape (the master) is group or a single shape. Find out where the ID (the 3rd field) is used for display, adjust accordingly by correcting the shapesheet.
Sorry for such a generic explanation. If we could exchange files, I would have had a look at your master and could have corrected it.
HTH, Y.
I had the same issue, and eventually found that I could prevent the ID field (used in Name) from displaying, using Display Options - on the Org Chart tab, using the dialog box launcher button (bottom-right) in the Shapes section.
The ID field is shown as 'Name' under Block 2 - you can use the drop-down to set this to 'None' (so that it doesn't display at all), or pick one of the other fields that you chose to display in its place.

How to find a table in a big diagram?

Using MySQL Workbensh 6.3.7 on Windows 10, I am finding the search behavior strange.
There is an entry box that you could use to enter the name of the table, however, this does not work every time! I mean it sometimes finds the table and sometimes it does not! When it works, it is very good. I can enter 1 or more chars from start and the tool would highlight the table in the diagram, for some tables, even entering the full name, it does not find the table!
If I go to a specific table from the tree on the left-hand-side nav, and double click the table, it opens its properties, but it does not select it on the drawing area!
I have generated the DDL and searched it as text to find columns and relations then traced that back manually but this is difficult for large diagrams.
I want to be able to search for a table (even with wild card) and find it in the drawing surface - Also, what does the dot at the right side of the table name in the schema treeview mean?
The search behavior sounds like a bug to me. It should always select the table figures that match. When you file a bug report for that (http://bugs.mysql.com) it can be fixed.
The dot in the catalog treeview is just an indicator which db object has been placed already on the current diagram.
A tip: use layers to organize bigger diagrams. Use colors for different groups of db objects, like this:
You can change the colors on the Properties tab in the lower left corner, even for multiple figures in one step.
And don't forget you can increase the size of the diagram to fit more figures on it. See the menu Model -> Diagram Properties and Size....

How to Check node existence in dell Boomi.

How to Check node existence in dell boomi, Like I have name element in source and sometime name is blank then I do not want to map that data on the target.
You can use Decision Shape component for this purpose.
From the configuration window in the First Value parameter Choose Profile Element -> select your profile and then your element(on the basis you want to add conditon) From the configuration window in the Second Value parmeter Choose Static and blank value. Now the Decision shape will behave as per your requirement. If the element has a value it will go to True branch else it will go to False branch. Find more option and information:Decision Shape example Boomi I hope it answers your question.
The mapping behavior you'll see is that the document that comes out of the map will not have any data profile fields that weren't set.
The destination data profile in the map can have a default value set to guard against the source data missing the desired field contents.
If I understand your question, if the name element/field is blank for a given mapped document, the document that emerges will "not map" that field, it will emerge with that mapped field missing.
Dell's doc on this doesn't cover your question, but does have some helpful detail: http://help.boomi.com/atomsphere/GUID-CA9E44A0-5621-46AE-8419-C334B374D7E3.html

Filtering by custom dimension

I created a hit scoped custom dimension called "type". Also I created a view with include filter "type" = "Books". However in reports I see click hits with other dimension values (e.g., Books Sci-Fi). Do I have to add also exclude filter for view?
Essentially problem was that filter value have to be reg. exp. I changed it to ^Books$ and now hits with custom dimension "Books Sci-Fi" are excluded.