Visio - How to use the same shape property for many shapes - visio

I have created one master shape with many properties. In the "Define Shape Data" windows of the master shape (of the document stencil), one of the properties (masterProp) is a variable list (so with a list of allowed values).
Is it possible to re-use the list of values allowed for this property (masterProp) to define the format of another property of type variable list in another master shape so that the list of values has to be maintained only once ?
Maybee is there a way to set up "lists" in Visio and link the expected/allowed values (format field) of a property to this list (without using excel) ?
Thanks for your advises,

Is it possible to use the same property (masterProp) in another master
shape to inherit the same allowed values? Or is it possible to link
the values of another property of type fixed list in another master
shape to the values of this masterProp property ?
You mean mastershape in document stencil or in external stencil ?
You can refer to some cell of mastershape in document stencil
To reference a cell of
Use this syntax
Example
A master
Masters[MasterName]!SheetName!CellReference
Masters[Gear]!Shaft!Geometry1.X1
About Cell References

Well, Thanks to #Surrodate, this is the correct way of doing this:
Add a user-defined cell in the ShapeSheet of the document (or the page)
Open the master shape for editing
In the master shape, open the shapesheet of the master shape and go to the section of the Shape Data
In the Format column, refer to your user-defined cell. Begin typing with a "=" otherwise it takes your entry as text (even if it recognise your data ...). To refer to the document, begin with =TheDoc!User... if your data are in the page, begin with ThePage!User... Do not forget to set the type of data to 1 or 4 (in case of list).

Ok, I found the shapeSheet of the Page-1. I added a user-defined
section, then a cell named "User.Softwares". I set the value to
="Soft1;Soft2;Soft3". Correct for list ? Then in the field "Format" of the "Define Shape Data" windows in have written
"Page-1!User.Softwares". Is that the correct way to refer to the
page-1 ? When I click on the property of a shape, it proposes the text
"Page-1!User.Softwares" and not the value of the user-defined cell in
Page-1 ... What is the mistake ?
You must also change Type field ! If in this cell stores 0, it mean "String". if cell value is 1 it mean Fixed list.
You must write Page-1!User.Softwares, without quotation marks !

Related

Hiding data field name in Visio Data Graphic Displayed as Text

I am using Data Graphic to format my shapes. The data field that I am using to specify data graphics is 'name' and the formatting scheme (Displayed As) I am using is 'Text'. But when I do that, it not only shows value against the shapes but also field name i.e. 'name'. I don't want field name to appear, only values. Is it possible?
Data -> Advanced Data Graphics -> Available Data Graphics
In Edit Data Graphics window select Edit Item
In Edit Item window select field Label position and change it value to No show
Sorry last screenshot with Russian interface :(
I figured it out -- basically Label field has to be made blank , by default it is [Default].

Is it possible to have multi/custom field type inside a w2ui grid column with inline-editing for each type based on cell value?

Is it possible to have a grid column containing multiple types inside of it based on the value of a cell? Where each cell is rendered based on value. For instance, with in the same column a cell could be of type 'text' or 'datetime' or 'list' etc... and for each type I can use built in inline-editing? See image illustration below. Basically a key/value editor where the value column need to contain more than one 'type. Please post a sample answer.
It's possible, but you cannot rely on standard funtionality.
The idea of a w2grid is to assign a renderer to a column and render all cells of the same column in the same way.
You could implement a render function for your column and then generate the HTML for each cell based on those arguments:
http://w2ui.com/web/docs/1.5/w2grid.columns
Or you could override getCellHTML() for your grid.
Have a look at the implementation of getCellHTML() to see what awaits you if you want to customize it:
https://github.com/vitmalina/w2ui/blob/master/src/w2grid.js#L7396
Although it was a hack solution I ended up creating multiple grids aligned vertically each with a property & value column but the value column's 'type' attribute is different for each grid based on the w2ui framework out of box functionality I Desired for it. Each Grid is also separated by the header without padding to give it a feel like it is one grid. See Image below. now obviously the draw back of this is you cannot sort on all the fields but this is not required in my use case.

Visio: Creating Automatic Numbered Label

I'm currently working on creating a new stencil for several components I use in Visio and I'm stuck at the point of providing proper labels. If you use a resistor from Visio stencil it automatically generates a label "R1" (for first resistor) and "Rk" for the kth resistor. How can I do something similar for my own stencil ?
1- I need to generate a label "ABCD #" (# number automatically generated based on instance count)
2- How can I position the location of this field?
PS:
1- Visio components have a custom defined field which allows for this (which I don't know how to create)
2- For capacitor for example the shapesheet shows an interesting entry
=SETF(GetRef(User.Label),"""C""&"&ThePage!User.AccumulatorCount)&SETF(GetRef(ThePage!User.AccumulatorCount),ThePage!User.AccumulatorCount+1)
which supposedly is how the count and name are generated (I'm not sure how the AccumulatorCount is defined it differs from element to element).
Thank You!
The EventDrop ShapeSheet cells for various electrical shapes have formulas similar to the one you have discovered:
SETF(GetRef(User.Label),"""C""&"&ThePage!User.AccumulatorCount)&SETF(GetRef(ThePage!User.AccumulatorCount),ThePage!User.AccumulatorCount+1)
The ShapeSheet for the page has a cell: User.AccumulatorCount for capacitors. Other User cells will be added as other shapes are dropped. You can set up your own system by adding a User cell to the page, say: User.Widget. Then you place the "Widget" version of the "SETF" formula into your own shapes.
You can create user cells by:
Open the ShapeSheet for the Page (right-click blank area of page, Show ShapeSheet)
Right-click in ShapeSheet and choose Add Section
Add a User-defined cells section
Find the User-defined cells section and similarly add rows to it via
right-clicking
You change the row names by typing over the red, row-name text on the left.
You enter values and formulas in the cells as you would in Excel.
You can toggle viewing formulas vs. viewing values by pressing F5
while in the ShapeSheet.
You have to make the User cell in the page first, so that your shape can reference it. Once your shape references the page cell, you can drag your shape into a stencil, and it will "drag the page User cell along too". So now, you can drop your Widget shape into a new document, and it will create the page User cell on the fly.
The system is basic and fragile. The count only goes up, and never down. If you have shapes with 1, 2, 3, 4 and you delete 1 and 2, the next shape will still be 5.

Unity Input field not setting value on change

I simply want to set a room name using input fields and the fact that it can pass the input through as an argument, but this does not seem to work for some reason.
here is the function that is called
here is the output in the console when typing in the field
why does it send in a blank string?
I followed this tutorial: Youtube
When you add a listener (HostGame.SetRoomName) you have two sections from which you can choose your functions: Dynamic string and Static Parameters. Your function should be in both sections:
Dynaic string - SetRoomName
Static Parameters - SetRoomName(string)
You have to choose the first one if you want to receive as parameter the input field text. The parameter in the second option is whatever you put in the field below HostGame.SetRoomName in your first image (in your case blank).
I worked around this by creating a reference to the text in "SetRoomName" it's not ideal but works
It hasn't been explained well but you want to select the top method under dynamic value. If you look at this image, you will see two methods, selecting the bottom (static) one will show the input field as you see but the top (dynamic) one (which is what you want) will show no input field.

How to design textbox visibility expression in SSRS?

I have an RDL with a table/textbox visibility set to:
=iif(Fields!question_caption.Value = "OBJECTIVE 1",false,true)
I am trying to make this textbox display the value named "narrative" only if the question_caption record = "OBJECTIVE 1". How can I do this? Currently this textbox displays nothing with the above logic. I have the narrative field stored in a Placeholder if that makes any difference.
Here is some sample data for you:
create table #dummy_data
(
question_caption varchar(max),
narrative varchar(max)
)
insert #dummy_data values('1st week dates','week 1'),('2nd week dates','week 2'),('3rd week dates','week 3'),('OBJECTIVE 1','obj 1'),
('5th week dates','week 5')
select * from #dummy_data
I don't see anything wrong with your visibility expression. However, in your question, you're discussing two separate things as one (i.e., visibility & displaying a value in a placeholder).
The hidden property will show an object (tablix, textbox, image, chart, container, etc) if the expression returns false and will hide an object when the expression returns true. When I say hide, I mean that it will remove the object from the grid and, if all is setup properly, the surrounding objects will be shifted to fill the now empty space of the hidden object.
To display (or not) a value is an entirely different thing. To show or hide a value, you would put the following expression in the value property of the placeholder:
=IIF(Fields!question_caption.Value = "OBJECTIVE 1",Fields!narrative.Value,"")
Notice that I've set it up such that if the desired value of the question_caption field is present, it will display the value of the narrative field. Otherwise, it will return an empty string. This will maintain the layout of the report but simply display the desired value or an empty string, based on some criteria.
As for the issues you're current experiencing, I'm not sure why that would be happening. I would first check that you don't have a typo in the Objective 1 hardcoded value in your expression.
If this doesn't help, please comment and let me know some more information about your problem and I'll do my best to help.