I am using NINTEX FORMS, no previous experience, and I want to set the value of a tag's text based on the value of a key I send through the query string.
What I am trying to accomplish is something like this:
If(fn-GetQueryString(TipoSolicitud) = "X", "Text1", "Text2")
But this doesn't work at all. Anyone knows if this is possible? and How to do it?
Thanks!
You should use "fn-If" instead of "If" in your formula.
The correct formula should be like this:
fn-If(fn-Equals(fn-GetQueryString("TipoSolicitud"),"X"),"equal","not equal")
Related
I'm doing some XSL transformations on an XML timestamp element:
<LastModifiedDateTimeStamp>2017-03-03T12:23:59.044Z</LastModifiedDateTimeStamp>
I'm trying to pull out the time using this following saxon function:
format-dateTime(LastModifiedDateTimeStamp, '[H01][m01][Z001]')
I'd like to pull just the values so it looks something like this:
2017030301223044
However, format-datetime defaults to using a "+" sign and my result always looks like this:
201703031223+000.
Does anyone know how to pull out just the timezone value?
Given:
<LastModifiedDateTimeStamp>2017-03-03T12:23:59.044Z</LastModifiedDateTimeStamp>
the following expression:
format-dateTime(LastModifiedDateTimeStamp, '[Y0001][M01][D01][H01][m01][s01][f001]')
will return:
20170303122359044
which is slightly different from what you posted, but I believe it's correct.
i am in the process of writing a Capybara Automation suite. one thing that i am trying to do is extract a value between the td tags from the html source
<td class="table-column-data">CB/AE9999XX/A001</td>
i.e. find and extract the value CB/AE9999XX/A001 then save it into a variable to use later on.
i hope you can help
thanks
saved_text = find("td.table-column-data").text
Will get the text from the element - obviously the selector passed needs to select a unique element, which will depend on the surrounding html
You can use the below mentioned way to extract and save the value in a variable:
extractedValue = find('.table-column-data').text
This will fetch the text "CB/AE9999XX/A001" and store it in the variable "extractedValue".
Apart from this, you can also extract the text using jquery as shown below:
extractedValue = page.evaluate_script("$('.table-column-data').text()")
Hope this helps :)
Enterprise Architect was introduced to me only today, and i also got a task related to document generation, which should be done as soon as possible.
I have to write a template for doc generation, and this template should do some filtering or conditioning on a specific element.
From a closer look: I have an element, which has a special field {Element.SpecialField}, that can hold values of true or fase. If the field's value is true, then the field's name should be generated into the doc, else nothing.
Which is the easiest way to do this? Scripting or selector/fragment filters? Thanks.
EDIT:
The generated document should look something like this:
![EA Document]: http://s29.postimg.org/68edfthdz/EA_doc.jpg
The cells containing question marks are the specific element values I mentioned above the EDIT section.
There are three element fields: TagValue_X, TagValue_Y and TagValue_Z.
They can be true or "" (empty string) individually.
But in the table cell I don't want to see their values, but the names of the fields separated by commas. For example: if
{Element.valueOf(X)} == true AND {Element.valueOf(Y)} == "" AND {Element.valueOf(Z)} == true
, then the cell should contain "X, , Z".
EDIT 2: To Geert's answer.
The following script works well, when I want to to search in the Model (CTRL+ALT+A in EA 12):
SELECT t_objectproperties.Property FROM t_object, t_objectproperties
WHERE t_objectproperties.Value='True'
AND t_objectproperties.Property='X'
AND t_object.Object_ID = t_objectproperties.Object_ID
How should I modify this to apply it as a Custom Query in the fragment template? I tried some queries like this, but they never returned anything. Probably this is a basic conceptual misunderstanding issue from me...
SELECT t_objectproperties.Property AS SomeQuery
FROM t_objectproperties
WHERE t_objectproperties.Value='True'
AND t_objectproperties.Property='X'
AND t_objectproperties.Object_ID = #OBJECTID#
TemplateMain:
package>
element>
{Template - TemplateFragment}
<element
<package
TemplateFragment:
custom>
{SomeQuery}
<custom
I suppose the fragment template should be inserted into the element section.
The easiest solution would be to create an SQL fragment.
Using SQL you can return exactly the fields you need based on the PackageID passed to the template fragment.
Check the learning center (Alt-F1) for a step-by-step guide on creating SQL fragments.
I've search hard for an answer to this but haven't found anything that works. I have a NodeJS app, with the Mongoose ORM. I'm trying to query my Mongo database where a result is LIKE the query.
I have tried using a new RegExp to find the results, but it hasn't worked for me. The only time I get a result is when the query is exactly the same as the collection property's value.
Here's what I'm using right now:
var query = "Some Query String.";
var q = new RegExp('^/.*'+ query +'.*/i$');
Quote.find({author: q}, function(err, doc){
cb(doc);
});
If the value of an author property contains something LIKE the query (for instance: 'some. query String'), I need to return the results. Perhaps stripping case, and excluding special characters is all I can do? What is the best way to do this? My RegEx in this example is obviously not working. Thanks!
You likely want to create your RegExp as follows instead as you don't include the / chars when using new RegExp:
var q = new RegExp(query, 'i');
I don't know of a way to ignore periods in the author properties of your docs with a RegExp though. You may want to look at $text queries for more flexible searching like that.
I was wondering if it is possible to do a range search on a MultiValueField. I have a model that looks like the following:
Book
Title = 'Awesome Book'
Prices = [ Decimal('10.00'), Decimal('15.00'), Decimal('20.00') ]
I am indexing the prices field with a MultiValueField and I would like to be able to do the follow:
sqs = SearchQueryResult()
sqs.filter(prices__gt=Decimal('10.00'), prices__lt=Decimal('20.00'))
Is this possible or do I have to use something else to do a range search on multiple values?
Update:
I forgot to mention that the __gt doesn't work and I think it's because it's indexing it as a list of strings. I found the following link where they talk about subclassing MultiValueField. I tried this but I can't get it to give me a list of decimals. The subclassed MultiValueFiled looks like the following:
class MultiValueDecimalField(fields.MultiValueField):
field_type = 'decimal'
One way to solve this problem is doing the following:
sqs.filter(prices__in=['%.2f' % (x/100.00) for x in range(1000, 2000)])
It's very ugly but it works. Still open to other answer though.
Same thing: when I applied filters __gte, __gt etc. I noticed that SearchQuerySet returns incorrect data. When I changed field type to FloatField everything started working right. looks like bug, or smth
Have you tried the range field lookup?
SearchQuerySet().filter(view_count__range=[3, 5])
http://django-haystack.readthedocs.org/en/latest/searchqueryset_api.html#field-lookups