Azure Devops - hosted XML: Conditional based Rules - azure-devops

we are using azure devops hosted xml process.
i am trying to set Field A as required when Field B equals to Field C but the comparison do not work with i compare two reference fields.
if i compare a reference field to a specific value it works, but i need to compare 2 fields.
This is the comparison (G.CR and G.FixFor both equal 815)
<FIELD refname="G.BugReason">
<WHEN field="G.CR" value="G.FixFor">
<REQUIRED />
</WHEN>
</FIELD>
both of the fields are defined as strings.
it does work when i do the following comparison (when G.CR equals 815):
<FIELD refname="G.BugReason">
<WHEN field="G.CR" value="815">
<REQUIRED />
</WHEN>
</FIELD>
please help.
thanks.
Guy.

The scenario you ask about isn't supported.
You can define conditions that are based on what value is assigned to
a specific field or whether a user modifies a specific field.
According to our official doc -- Assign conditional-based values and rules. It's not able to directly compare two field as a conditional-based rules.
You could create a related user voice and vote up in our feature request page from Developer Community site. Our PM will kindly review your suggestion.

Related

Get the relations between dimensions and measure groups

There is the "Show fields related to:" feature in Excel:
I want something like this, but return in the following form:
MeasureGroup1: Dimension1, Dimension2, Dimesion3
MeasureGroup2: Dimension2, Dimesion3
...
Can't find out how Excel retrieve this data. I need to write a script which will automatically generate the relationship data for a chosen cube. It can be MDX or XMLA. ADO.NET in the last resort (it should be a portable script after all).
Hope you can help.
The following returns a recordset which Excel uses to determine which dimensions are related to which measure groups:
select *
from $system.MDSCHEMA_MEASUREGROUP_DIMENSIONS
Plus the xmla solution:
<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
<RequestType>MDSCHEMA_MEASUREGROUP_DIMENSIONS</RequestType>
<Restrictions />
<Properties />
</Discover>

MongoDB/Doctrine not unsetting fields when null or empty array is set

I have a table in MongoDB with xml schema similar to the below:
...
<field name="fieldNameA" type="string" />
<reference-many field="fieldNameB" target-document="RelatedObject" strategy="set" />
...
If I update these records everything works fine, unless I try to unset the values. i.e.
$object->setFieldNameA(null);
$object->setFieldNameB([]);
In this instance when I call persist and flush on the object the two original values remain in the database. I would expect/want these properties to be unset in the collection.
I have tried including nullable="true" for the string field and I have tried changing the strategy used on the referenced object, however neither updates have had any impact. Any help would be greatly appreciated.
NOTE: MongoDB version = 2.6.9
I had the exact same issue. Turned out that first I had to make this document managed by Doctrine. Was enough to select it by id from database. Only then Doctrine was removing the null values and empty collections.

How to send column/fields to subreport as collection in jasper

So I've been able to make a second data source, pass down parameters, im all but ready, but I cant figure out how to send a collection of the field values in a column to the sub report. Ive tried setting a variable to the field value and sending that, I've tried sending the field directly.
I sort of assumed these wouldn't work because the data type is wrong, but i just don't know how to tell jasper that i want the fields as a collection.
I use this in JasperSoft Studio 5.6.0 and it work fine :
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{subReportDataField})]]></dataSourceExpression>
Where "subReportDataBean" is a field like this :
<field name="subReportDataBean" class="java.util.List">
<fieldDescription><![CDATA[subReportDataBean]]></fieldDescription>
</field>

Jasper REST pass collection as parameter

I have a report which receives a List parameter to use it in a IN clause:
$X{IN, personID, _personID}
The report works when running it through the web application or remote repository view in iReport.
Now I need to call it using the REST api. I have tried several different ways of passing the list value in my resource descriptor but none of them worked.
<resourceDescriptor name="Test_Report" wsType="reportUnit" uriString="/Test/Test_Report" isNew="false">
<parameter name="_personId" isListValue="true"><![CDATA[1]]></parameter>
</resourceDescriptor>
The above example returns the following error:
Invalid type java.lang.String for parameter _personId used in an IN clause; the value must be an array or a collection.
I have also try the following:
<parameter>
<name>_personId</name>
<value isListValue="true">
3
</value>
</parameter>
But this returns a report with all the records, not only the person with Id=3.
My workaround for this problem was to use the REST V2 services of JasperServer.
Added to this the V2 has two advantages over the first version of the service:
it doesn't require a resource descriptor
it runs and exports the report in a single GET request
All the information required to run and export the report is passed through the request URL, for example:
<host>/rest_v2/reports/Test/TestReport.html?_personId=3&_personId=4&_personId=5&_personId=6
Your approach is totally fine, but there is also another small tip with collection type arguments ( might be a bug)
If you have more than 1 item in the collection this is totally working correctly:
(3,4,5,6)->?_personId=3&_personId=4&_personId=5&_personId=6
If you have only 1 item in the collection you have to add empty one too:
(3)->?_personId=3&_personId=
By the way, I am using Jasper Server CE 7.2.0 on the docker.

Accessing metadata in Fetch-based reports

In reports I need to show localised field labels and entity names. For this I need to retrieve some pieces of metadata, namely -- localised entity names.
Can you access metadata in Fetch-based reports? If you can, how severely will performance suffer?
There is a hack to sort of get pick list values and default labels. Quoting from reference:
You must use the distinct clause, and create a seperate dataset to
fetch only the option set field like this.
<fetch version="1.0" output-format="xml-platform" mapping="logical"
distinct="true"> <entity name="account">
<attribute name="accountratingcode" /> </entity> </fetch>
This actually returns 2 columns to BIDS -
accountratingcode
accountratingcodevalue
Create a report parameter for the main report and in the Available
Values tab specify:
Get Values from a query
Dataset: Seperate Dataset with the Fetch XML
above
Value Field: accountratingcodeValue
Label Field:
accountratingcode
Sorry to say that entity metadata is not exposed via the FetchXml interface as neither "attributes" nor their corresponding "labels" are entities, so cannot be queried.
You can prove this by using the FetchXml builder ([details of getting it and making it work with CRM 2011 are here][1]). You will note that none of the available entities contain the information you seek.
Edit: looking at the core requirement (rather than answering the question in isolation as I originally did), it is possible to include "label" values in FetchXml statements, as #skfd notes in his own answer.