Chosen Jquery Plugin - setting multiple values - jquery-chosen

I want to set multiple values like this:
$('#field-partners').val("1,7,9");
$('#field-partners').trigger("chosen:updated");
but it's not working..
I can only set one value like this :
$('#field-partners').val("1");
$('#field-partners').trigger("chosen:updated");
How can I set multiple values ?

I figured it out,this is the answer:
$('#field-partners').val(['7','9','11']);
$('#field-partners').trigger("chosen:updated");

Related

How to filter tag values in template variable of Grafana?

all.
I'm new to Grafana and I want to get only tag values what I want.
For example,
As you can see,"23" is a value of tags, I just want to get template variable by "23".
But now I get so many template variables so that every time I have to seek it for long time.
I'd like to get some tags like "23" rather than seek it from all tags.
Thank you very much for your support.
Unfortunately you cannot use "IN" when filtering TAGs youll need to do something like this (i.e only show 23 and 24)
Your query should be
SHOW TAG VALUES WITH KEY "measurementPoint" where ("measurementPoint" = '23') or ("measurementPoint" = '24')
Ofcourse if you know its only going to be 23 or something else you could just use static variables or have i misunderstood your question ?

Create absolute link with specific value of cell in table view

I want to render a absolute link in table from value of cell but I got a relative link instead.
Here is my configuration:
What I got when click on cell:
http://10.93.9.209:3000/http%3A%2F%2F10.131.227.253%2Fjob%2FPerformance%20Testing%20Pipeline%2Fjob%2Fstable%2F21%2F
In Grafana 7 (new table panel) it's ${__data.fields[2]} where number is column index.
This is a change introduced in one of the new Grafana versions. If you want an absolute URL, you must use ${__cell:raw} instead of ${__cell}. Reference
If you want to reference another column when clicking:
This is possible, I am using 9.1.7 and originally used the old table; however, after migrating noticed the same issue. That said, I found a way to make this work:
Add the ID column that you want to hide; example simID
If the column is the first column, say 0; then use:
var-whatever=${__data.fields[0]}
Now, override the column, field with name: simID Add option ‘Hide in Table’ and turn on
I also had to format the number, e.g. remove decimals & set unit to standard
Hope that helps someone… took me a good 2 hours to figure.
Btw, it also works on graphs and you do not have to hide; aka reference your original query in the datasource and add a data link with the same options.
What result do you get if you try $__cell_2?
The syntax above no longer works. The value is now ${__value:raw}
$__cell_2 above solution worked for me.
With the new table panel introduced in Grafana either ${__cell} or ${__cell:raw} do not work for this now.
You must use ${__value:raw}

$GLOBALS['TCA']['tt_content']['types'][$myCType]['columnsOverrides']['imagecols']['config']['items'] not overriding default list

$GLOBALS['TCA']['tt_content']['types'][$myCType]['columnsOverrides']['imagecols']['config']['items'] = [[2,2],[3,3]];
But above not working it just replace fist two items with my list but other items are still visible how can i override items array for my custom ctype?
It seems, \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule(), which is used to handle the columnsOverrides, does allow unsetting a key (or array), but not replacing a substructure.
Maybe it's possible to find a combination of unsetting and afterwards merging with new values.
In this case you can use TCEFORM to solve your task.
TCEFORM.tt_content.imagecols.types.myCType.keepItems = 2,3

How to run multiple calculations using `oninput` (HTML5)?

I need a way of running a few calculations based on the contents of a single text box. I'm currently using a form, with the text box what accepts numeric values. I then use the oninput to calculate the other values eg.
<form oninput="x.value=7+y.value">
However I need a way of running multiple calculations using oninput. Is this possible? If so how? If not, what are my other options?
I solved this issue. You can do something like so:
<form oninput="x.value=7+y.value;z.value=y.value+300">

Can I set a default field value of an EntityProxy?

Say I have this:
TimeEntryProxy timeEntry = someRequestContext.create(TimeEntryProxy.class);
The created proxy is empty. Is there a way to set some of it's fields with a default value? For example, this proxy has a timeAllocation which is a double. Can it be set to 0 without having to do this:
timeEntry.setTimeAllocation(0);
Thank you
How about setting default values in your custom Locator.create(Class c) method?