Multiple Values in one "SMW Page Forms" field - mediawiki

I ran into a problem with Semantic Mediawiki using the Page Forms extension.
I wanted to create a field in a Page Form, that can take more than one value. So I decided to use the tokens input type.
The problem is the following: If I type some values into the form field and save the page, Page Form puts all the values - seperated with commas - into one single SMW value.
For example: I have a form that will create a page about a scientific paper. And in this form I have a field that is called Authors. And when I fill the field with two Authors, lets say Pascal and Tesla, then the final page does not have the two SMW values [[Author::Pascal]] and [[Author::Tesla]] - It has the SMW value [[Author::Pascal, Tesla]].
Does anyone know, how I can achieve the mapping from different values in the form field to different values as SMW strings?
Thanks and greets,
J

Multiple values for the same field covers this.
Put the following in your corresponding template:
{{#arraymap:{{{Author|}}}|,|x|[[Author::x]]}}

Related

field in semantic mediawiki with options where label and value are different

How can I have a select field (e.g. combobox, tokens) with options where label and value are different in semantic media wiki?
I tried "Allows value list" with json. The list works but somehow I can't use it as datasource for a field.
A mapping template could work but is hard to maintain because the syntax of the template is very confusing for users compared to json and the values are stored in two pages (form and mapping template)

MS Access Expression That Includes Dynamic Field Names

I have a crosstab query which returns results based on consumer demand for a bunch of material numbers. The material numbers become my field names in the crosstab query, and later the values from those fields are displayed in a form.
In the form, I display the value in a textbox. There are a couple of these textboxes where I need to sum the total of two or more values from these fields. Not a big deal it's a simple expression. For example (in the Control Source property): =[H123457] + [H123456].
This works well UNTIL there is no demand for a particular material number. In this case, the field doesn't show up in the crosstab query and I'm left trying to sum two fields where one doesn't exist.
I've tried IIf(IsError([H123456]), 0, [H123456]), Null expressions, Nz function, etc but cannot figure out how to dynamically solve the #Name issue that ends up populating the text box.
Essentially what I want is for a 0 value for the field that doesn't exist, so I can add it to the value where the field DOES exist - is this possible?
Regards!
June7 provided the answer in the allenbrowne.com link. Essentially, you need to add all of the possible field names to the Column Headings property in the crosstab query property window. Then it's a simple matter of adding an Nz() function to handle null values.
Thanks June7!

Microsoft Report Builder: How to display selected chosen values from a multi-value parameter in a table?

I'm using MS Report Builder v3.0 to create a report. As part of this report, I have a multi-valued parameter (named #Diagnoses). The labels and some of the values (truncated by the size of the display boxes) of this parameter are shown below:
What I would like to be able to do is display the labels / values the user chooses in a 2-column tablix (I've tried using separate textboxes for the labels / values but the results are mis-aligned).
However, this does not appear to be straightforward. The closest method I've found is this one, which stores the user's choices in an internal parameter in xml format, then queries this parameter to produce a dataset from the xml.
So, I created the xml-producing internal parameter like this:
...and I've created a dataset based on this data, with the following query:
But now when I put these values into a tablix, the labels and values are now on separate rows, like this:
Does anyone have a straightforward way of sorting this out?
Best Wishes
C J
OK - I've solved it (it's not pretty, but it works!)
Basically, the problem comes from having to use the join statement when creating the xml - you can't really put both the label information and the value information on the same row in the xml.
To get round this, you have to use two internal parameters to create two datasets - one for the labels column, one for the values column. The method for creating these is essentially the same as that shown above, except for the values parameter, the expression for the default value is:
...and for the labels parameter, it's this:
(by the way, make sure you set the available values to "None" for internal / hidden parameters - the expressions here are for the default values)
Then, when you create the values dataset, you use the following syntax in its query:
...and similarly for the labels dataset.
Finally, in the report, you create one matrix from each of the two datasets, then put them next to each other, using fixed row heights and setting "can shrink" / "can grow" to false so that they look like they're in the same table:
I hope this helps somebody!

Solr field:needle or q=needle&qf=field different results

Let's say I'm trying to search for 'Douglas' in any field. If I just do:
solr/query?q=Douglas
I get 0 responses, but if I do:
solr/query?q=firstname:Douglas
then I do get responses, why is this? I've also tried:
solr/query?q=Douglas&qf=firstname
which still gives me nothing. How do I just do a search for all fields? Then how do I 'boost' the relevancy of some fields? For example, if I search for Douglas, then people called Douglas should come up before items with the word 'Douglas' in their description.
You've got two concept mixed up here.
The default search goes against one field. That's the field defined by df (default field) parameter (not qf). So, solr/query?q=Douglas&df=firstname should have worked. Solr examples usually have text field set as default and copyField instructions to copy other fields into that. This works, but does not allow to use different analyzers for different fields. Nor does it allow ranking based on which field content is found in.
If you want to search multiple fields with different weights, you need to switch to dismax or edismax query parser. Then, you do use qf parameter to show which fields to search through.
You can experiment with all of that in the Solr Admin UI.
You have to use copyfield to copy your field into text to make it searchable. In default, all fields values which wanna searchable will copy into text field. You have to add a copy field as here or here
To add boosts at query time:
q=(firstname:douglas)^100 OR (body:douglas)^50 OR (someField:douglas)^25

Parameter query doesn't return the value of an auto number control

I have a form linked to a table. The form has 4 text boxes: one linked to the autonumber field, and the other three to text fields.
There is also a subform, from which I wish to launch a query (via button and macro) combining results from the subform and a control on the main form. When I specify any of the three text-based controls in a parameter query, this works fine, but asking for the value of the first (autonumber) control results in a symbol being displayed instead of a value.
I wasn't sure what specific information/images would be helpful. Please ask for specific information if you feel it would help.
I've been given the answer elsewhere. I had to implicitly convert the results of the batch field into an int.
INSERT INTO heat_treat_jobs ( card_id, batch ) SELECT atheattreat.id, CInt([Forms]![heat_treat_loads]![batch]) AS Expr1 FROM atheattreat WHERE (((atheattreat.index)=[Forms]![heat_treat_loads]![atheattreat subform].[Form]![index]));