tableau change dimension to attr(dimension) in dashboard - tableau-api

In a worksheet, if I have a dimension as second dimension in a row label I can "collapse" that dimension with ATTR() by selecting Attribute in the menu:
However, this menu is only available on the worksheet view. How do I enable the user to accomplish this switch on the dashboard?

Create a boolean valued parameter, call it say Should Expand. You can choose readable aliases, such as "Expand" for True and "Collapse" for False.
Show your parameter control and customize the look as desired
Create a calculated, call it, say Collapsable Foo, where Foo should really be the name of your true second dimension. Define it as
if [Should Expand] then [Foo] end
Make sure Collasable Foo is a dimension and use it as desired, presumably in place of Foo. You can edit the aliases for Collapsable Foo to set Null to a single blank to improve the way text appears when collapsed.

Related

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

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 !

Fiori Element: Checkbox in a table

I'm working with Fiori elements, and in the ObjectPage I want to display a table inside a section. For this table I have a column as a boolean type.
Is it possible to manage this column as a checkbox by annotation, or some other way? If so, how?
I am not sure why it should not be possible. Since a checkbox basically has two states, it should be able to handle the boolean variables very well. Care to explain more about what exactly you want to achieve?
When using Fiori Elements currently a boolean value is displayed as text.
Expect you are in edit mode - then a checkbox is rendered.
So, the answer is 'No' for display mode and 'yes' (by default) for edit mode.

Updating the selected dropbox item in a GUI

Currently I have a GUI in which once a 'Submit' button is pressed the drop menu which is left blank is then populated by a calculated value determined by the three other values.
I have successfully figured out how to grab all of the values using this logic:
temp=get(handles.FSTOPpopmenu,{'String','Value'});
fstop=temp{1}{temp{2}};
if (strcmp(fstop,'Select'))
fstop = 0;
else
fstop = str2num(fstop);
end
I just have two questions about this that I can not seem to find an answer for.
How would I go about updating the 'empty' drop menu to the calculated variable (the calculated variable will already be one of the possible values in the predetermined list)?
How would I go about presenting an error, say if I have an if statement checking that the amount of zeros in the array? Would a pop up box be sufficient?
Cheers.
As for your first question matlab's set command is what you're looking for. The documentation is here. You would probably need:
MyValueIndex = find(DropDownValues==NewValue);
switch handleToChange
case handles.handle1
set(handles.handle1,'Value',MyValueIndex);
case handles.handle2
set(handles.handle2,'Value',MyValueIndex);
otherwise
error('Uh oh!');
end
Note that MyValueIndex is the index of dropdown box values that you want. Which is found with a find command on the actual value.
Question two is more of an opinion question but I think that a pop-up box describing the problem is sufficient. Maybe add in a system beep for good measure!
Reference:
http://www.mathworks.com/matlabcentral/answers/22734-resetting-a-pop-up-menu-in-a-gui
http://www.mathworks.com/help/matlab/ref/find.html
http://www.mathworks.com/help/matlab/ref/switch.html
For a popupmenu uicontrol the Value property determines which element of the String property is currently being displayed. Get the String; compare its contents to the calculated variable to get the index; then set that index as the Value property. If the calculated variable is not currently in the String then add it to the String and then set the Value. (Note when comparing you need to compare numbers to numbers or string to strings, so you may need to do an appropriate data type conversion first).
Use an errordlg.

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.

Checkbox Reference Value in LibreOffice Base Form

I want to make a checkbox in the form editor of Base to fill boolean values (in this case, "Male", and "Female") in my table.
I am currently stuck in the checkbox control window's "Data" tab because I do not know what to put in the fields "Reference value (on)" and "Reference value (off)".
I know that in the table design view that Base refers to the boolean TRUE/FALSE values as "Yes" and "No". Should I use Yes and No as reference values? Should I go TRUE and FALSE? Or 1 and 0? I can just assign arbitrary designations for male and female if I know what to put in the reference value.
Ok, I tested it by trial and error. One apparently has to use TRUE and FALSE as the reference values, otherwise, Base will not fill the boolean checkbox in the table even if you've filled it in the form.