Getting the selected filter from the multiselect column with yadcf - yadcf

Hi I am using yadcf with datatables which allows me to do multiselect column filtering and that makes me happy. Now I want to display my selected values in the filter as tags to a separate search bar. How do I grab the selected values in my multiselect column filter? Thanks.

You should use the exGetColumnFilterVal method, like this:
yadcf.exGetColumnFilterVal(oTable,1);
See relevant docs (from yadcf js file)
* exGetColumnFilterVal
Description: Allows to retrieve column current filtered value (support ALL filter types!!!)
Arguments: table_arg: (variable of the datatable),
column number: column number from which we want the value
Usage example: yadcf.exGetColumnFilterVal(oTable,1);
Return value: String (for simple filter) / Object (for range filter) with from and to properties / Array of strings for multi_select filter

Related

How can I have a searchable ReactSelect component which displays/switches values based on the input value?

I have a dropdown that I have implemented using ReactSelect. It is searchable. But when I search, it queries for any value with the input string. Rather, I need a startswtih filter. If I type A, it should first go to the first filtered value that starts with A.
I tried using a filter on the handler for 'onInputChange' but it is not getting displayed on the dropdown

SSRS : How to make a data set field appear in the footer?

I have a simple report with a dataset( Patient id, programid, name, address, phone). In my report footer, I am trying to write a condition where the footer value shouldn't show up for specific program ids. But the report footer doesn't display the dataset fields. How do I write this condition for report footer?
Headers and Footers can't display fields from your datasets because the dataset is out of scope for the header and footer - it wouldn't know which row to display the field for.
However, you can use aggregate functions to specify a scope and the row and field; for example, to show the ProgramId field from the first row of a dataset, you can use the First function, specifying the scope of the dataset:
=First(Fields!ProgramId.Value, "MyDataset")
So you could do something like this for the Visibility-Hidden property of the footer:
=IIF(InStr("10090,116,10094,10083", First(Fields!ProgramId.Value, "MyDataset")) > 0, True, False)
The footer and header sections of an SSRS report cannot have dataset items.
You can use the ReportItems to refer to a text box that is on your page.
Create a text box on your page with the value that you need then refer to that text box with the expression in your footer.
=IIF(ReportItems!TextBox1.Value = 4321, NOTHING, "Your Text Here")
MSDN: Report Items
we can use parameters in footers. you can have a parameter for the specific column and pass the value from code and use the parameter in footer expression like,
=Parameters!Param1.value
Page headers and footers can contain static content, but they are more commonly used to display varying content like page numbers or information about the contents of a page. To display variable data that is different on each page, you must use an expression.
If there is only one dataset defined in the report, you can add simple expressions such as [FieldName] to a page header or footer. Drag the field from the Report Data pane dataset field collection or the Built-in Fields collection to the page header or page footer. A text box with the appropriate expression is automatically added for you.
To calculate sums or other aggregates for values on the page, you can use aggregate expressions that specify ReportItems or the name of a dataset. The ReportItems collection is the collection of text boxes on each page after report rendering occurs. The dataset name must exist in the report definition.
For example, to hide or show a logo based on the value of the Customer Type in the dataset, create a Text Box called CustType in the report body, in that Text Box will be your CustomerType field. Then in the header or footer create another Text Box for your aggregate expression like so:
=ReportItems!CustType.Value = "Direct"

How to use the value not displayed by a dropdown when connected to access database

My program uses a database in access which consists of BreedID and BreedName. I have a dropdown box in vb.net which shows the name for the user to select, however in my code I would like to store the ID related to that name so that I can send it over to the access database using oledb. Currently this is what it looks like:
Dim BrVar As String = Breed.SelectedItem.Text
But that isn't working! Please help!
You can add hidden columns to your dropdown box, it may already exist. The first column in a dropdown box is column(0) and you can set the width to 0cm. This can be for the ID value. Leaving column(1) for the Name value.
Then you can use Breed.SelectedItem.column(0)
The first thing to do is on the Data tab set up your rowsource to SELECT both the BreedID and BreedName fields (in that order). Then make sure bound column is set to 1.
Then on the Format tab set Column Count to 2 and Column Widths to 0;1.
That will have the result of displaying the BreedName field but using the BreedID field as the value of the combo box.
Use Dim BrVar As Long = Breed.SelectedItem to get the value of BreedID.

Sharepoint 2010: Update Lookup Field Multiple Value with a Workflow

I want to update a lookup field that contains multiple values through a Workflow, using Sharepoint Designer 2010.
For the moment, the old value is always overwritten, and I would like to "merge" the old value with the new one.
Here is the list of my test by so far:
1) I've managed to Keep the old or the new one, but not both of them.
2) I've tried to add key words like : & ; , between the fields, but only the first element is written in the list ( Example : [%first Element: id%] ;[% Second Element: ID%] --> Result in the column : First Element Id)
I'm out of idea. Do you have any tips?
Do you need more information?
Is this possible to do such things in Sharepoint designer?
Yes this can be done in SharePoint Designer. You need to set both the ID and the lookup value (the text that is displayed in the lookup field) - and these need to be separated by ;#
Build the following as a string before setting it to the lookup value.
[%Current Item:LookupList%];#[%Variable:NewItemID%];#[%Variable:NewItemTitle%]
In the example above, the first item is your original multi-select lookup list. The second, is the ID from the item that you want to add to the lookup, and the third is the title (or the value you're displaying in the field) from the item you're adding.

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.