Setting Default Values to Drop Down in Orbeon Form Builder - dropdown

I have a autocomplete field:
I need to set the default value selected for this dropdown using another control value as shown in:
This control is passed to the form load as shown in:
For example if use cost center is 110 as shown in:
Then the default selected value of the Site lookup dropdown needs to be as shown in:

The tricky part is that your Site-Item field isn't a dropdown but an autocomplete. An autocomplete doesn't know all the possible label/values, but can only find some label/values doing a search by label. So you can't tell an autocomplete "set your value to 110", because it doesn't know what the label corresponding to 110 is.
If you knew the label, you could do this programmatically with an fr-set-label, but here you don't have the label but the value. You can read more about this in the section Setting by value. So, my advice is to use a Dynamic Data Dropdown instead of an Autocomplete field.

Related

How to mimic values in multi page SSRS Report

I need a lab report that has several pages. Each test has a unique reference number and I would like it to appear in the header according to what I have on the page. At the moment I only see one reference number and it remains unchanged after switching to another page. See attached image.
If possible, I would like to get rid of the SampleNo column so that its value is only in the header
The easiest way to do this is to reference the the textbox in your tablix that contains the "Sample No.".
Click the textbox that you have highlighted in the tablix, show the properties window (F4 in Visual Studio - can't remember in Report Builder, I think View/Properties).
Find the Name property of the textbox, this is often the name of the field it contains but not always.
In the example below the textbox name is 'oYear`
Next, set the expression in your header to be something like
=FIRST(ReportItems!oYear.Value)
Change oYear to whatever textbox name in your tablix is.
ReportItems refers to the rendered object name so here we just get the first on each page.
Here the first two pages from a small sample of data which groups by year.

Clearing semantic ui multiselect dropdown when values are selected dynamically?

I am trying to load multiselect dropdown value based on click button action dynamically. When one click is performed value is selected and appended in the dropdown. But when I clicked next time, the dynamic values are appended to the previous value. So I decided to clear multiselect dropdown on each click.
But when values are selected dynamically, To clear dropdown
$('.ui.fluid.dropdown').dropdown('restore defaults');
$('.ui.fluid.dropdown').dropdown('clear');
Both also not working. Because of dynamic appending of data.
So my question is how to clear semantic mutiselect dropdown dynamically.
I tried to use the following code to clear the dropdown and it works fine.
var class_name = $('.ui.fluid.dropdown');
$(class_name).dropdown('clear');
$(class_name).dropdown('destroy');
$(class_name).dropdown('restore defaults');

combobox properties to allow user to type text in it and let it filter by text entered

I have a combobox where I'll need to allow user to search by text and be able to select that value from the list. So what I'm currently doing is, on CBO_KeyPress, I open the drop down.
Me.cboNames.DroppedDown = True
I set the property of the cbo...
AutoCompleteMode=SuggestAppend
DropDownStyle = DropDown
AutoCompleteSource=ListItems
Everything works beautifully except for one issue. As it stands, i have items in the drop down where the width is significantly wider than the combobox - I have a function that adjusts the DropDownWith to longest string in the list of items. My concern is that while this helps user search for correct item, it's width is only as wide as the combobox. Is there a way to adjust this?
My only other option is to not use AutoCompleteSource=ListItems and instead simply open the dropDown programmatically on KeyPress or something. In this case, it doesn't do as good of a job of filtering the items. AutoCompleteSource does it beautifully but the width issue does not make it look right.
EDIT : Plutonix - here's what I did. I changed AutoCompleteSource=None. On CboName_KeyPress I open dropdown programmatically. Now I type in text, see image below....
It doesn't find text 100% of the time as you can see. AutoCompleteSource narrows it down and only shows you the items that begin with the same text as typed by user but the width is the issue. It actually looks much better with AutoCompleteSource because if they type in text that's not in the list of items then it shows nothing - and user known it's not in the list.
Users tab into the filed and start typing text. They don't open it. That's why they want this to be updated like that. I want them to see the items as they type in.

Show / Hide Fields in Pentaho Report Based on User Input

I'm trying to show / hide fields in a Pentaho report based upon user input.
For example, I would like to offer a checkbox to the user saying "Show Product Count" -- if the box is unchecked, it will not include that column in the report.
Is there a way to do this in Pentaho Report Designer, perhaps using Parameters?
Thanks for the help -Monica
Yes, you have half the answer. Have a Yes/No Parameter "ShowProductCount"
Then on the conditional fields, go to the visible property, click the + formula icon and enter:
=IF([ShowProductCount]="Yes"; TRUE(); FALSE())
Simple! :)
There is more to this that the above answer. For example, if you don't want a field to show on the report, you pass the value mentioned above by Codek but the field will not show but the space for it will. The field has to be in a BAND and the band layout has to be set to ROW. Also, on the field you want to not display or display based on user selection, you have to set that field's style properties under size & position - invisible-consumes-space = false.

dijit.form.Combobox show label Instead of value

I've a dijit.form.Combobox field which uses a ItemFileReadStore to pull Its data.
Teh ItemFileReadStore has two attribute per Item value which will be used for form submission , generally Unique Integers and label which is Human Understandable String.
In ComboBox HTML I've done searchAttr="value" labelAttr="label"
When the ComboBox Shows the list it uses teh label Attribute.
But When the User selects one of the Item it shows the value of that Item.
What I want is , The value Attribute will Still be used for Form Submission. But the User will always see the label in the combobox Control.
alt text http://img822.imageshack.us/img822/6660/dijitcombo.jpg
e.g. I Want to Show The Label for value 3 (Admin) instead of 3
Use FilteringSelect instead of Combobox.
Note: ComboBox only has a single value that matches what is displayed while FilteringSelect incorporates a hidden value that corresponds to the displayed value.
I have tried the following.
var cmbObject = Registry.byId('combo dojo id'); var id =
cmbObject.item.<Code Property>;
You should check if item is null.