I am trying to print custom field in PDF template, got from a saved search with the naming syntax Bank Name(Custom). How to use this name in the freemarker pdf template ? I am not able to fetch the value using any of the below : subs.bankname where subs is the result of the saved search.
A NetSuite custom field is prefixed with "cust" (ie. custrecord, custentity, custbody, etc), so you need to find out the correct field's id in order to display it using the Freemarker syntax. Also, as "subs" is the result of a Saved Search, you might need to interact with all rows.
In your case it would be something like (to display the first row):
${subs[0].cust_bankname}
Or the following to interact with all rows:
<#list subs as sub>
${sub.cust_bankname}
</#list>
I hope it helps.
Related
I have a requirement to translate our Quicksight dashboard.
We are currently configured a "language" parameter which contains the language user desired to see the dashboard in. We are using this parameter to filter the data in our data set which has rows for each available language. This works well for the data display in our visuals on the dashboard.
The problem I have is regarding the titles and labels on the visuals. I'd like these to be updated depending on the language parameter as well. I've found you can template the title, i.e., <<$language>> to include the parameter, but I can't find anyway to "lookup" the desired value using the parameter as a key.
I've looked at calculated fields which can be determined using parameters, but unfortunately you can't template titles/labels with them.
The only option I've considered at this point is having to duplicate the dashboard in every single language supported and then routing the users to the correct dashboard.
Does anyone else have any other ideas?
I have .csv file with several fields. One of them (for example 3th) contains email. How can I add additional filed that will contain only serverName from email field?
Example:
input:
01;city;name#servername.com;age;
result:
01;city;name#servername.com;age;servername;
I guess it possible through ReplaceText processor, but I can't choose correct value in "Search Value" and "Replacement Value" fields.
You can convert your flowfile, to a record with the help of ConvertRecord.
It allows you to pass to a JSON (or something else) format to whatever you prefer.
Then you can add a new field, like the following, with an UpdateRecordProcessor:
I recommend you the following reading:
Update Record tutorial
How do I query using Sitecore fast query to retrieve those records that has published date? I tried using the below but it did not return any value.
And how do I retrieve only the last node? Because when I use descendant::*, it will also return the parent out.
fast:/sitecore/content/test//[##parentid='{5656C582-A876-41E6-8441-A3F0BA0D2601}'
and #Publish>'20170101T000000']/descendant::
The Sitecore Field name for the publish field is not Publish. You need to make use of the following syntax for publish field: #__Publish.
You can see the right field name in the Inheritance from the template. You will be able to see the field names as shown below:
So, your query will looks as follows:
fast:/sitecore/content/Home//*[##parentid='{5656C582-A876-41E6-8441-A3F0BA0D2601}' and #__Publish > '20170101T000000']/*
I have a use case which is a bit similar to the ES example of dynamic_template where I want certain strings to be analyzed and certain not.
My document fields don't have such a convention and the decision is made based on an external schema. So currently my flow is:
I grab the inputs document from the DB
I grab the approrpiate schema (same database, currently using logstash for import)
I adjust the name in the document accordingly (using logstash's ruby mutator):
if not analyzed I don't change the name
if analyzed I change it to ORIGINALNAME_analyzed
This will handle the analyzed/not_analyzed problem thanks to dynamic_template I set but now the user doesn't know which fields are analyzed so there's no easy way for him to write queries because he doesn't know what's the name of the field.
I wanted to use field name aliases but apparently ES doesn't support them. Are there any other mechanisms I'm missing I could use here like field rename after indexation or something else?
For example this ancient thread mentions that field.sub.name can be queried as just name but I'm guessing this has changed when they disallowed . in the name some time ago since I cannot get it to work?
Let the user only create queries with the original name. I believe you have some code that converts this user query to Elasticsearch query. When converting to Elasticsearch query, instead of using the field name provided by the user alone use both the field names ORIGINALNAME as well as ORIGINALNAME_analyzed. If you are using a match query, convert it to multi_match. If you are using a term query, convert it to a bool should query. I guess you get where I am going with this.
Elasticsearch won't mind if a field does not exists. This can be a problem if there is already a field with _analyzed appended in its original name. But with some tricks that can be fixed too.
I'm trying to write a couchdb view that takes a created_at timestamp in a sortable format (2009/05/07 21:40:17 +0000) and returns all documents that have a greater created_at value.
I'm specifically using couch_foo but if I can figure out how to write the view I can create it in futon or in the couch_foo model instead of letting couch_foo do it for me.
I've searched all around and can't figure out the map/reduce to do this, if it's possible.
This is the kind of problem I ran into initially before I fully understood how views work.
The key to the understanding is that the view is only run once for each (revision of) a document. In other words, when you query a view, you don't run the function, you simply look up the results of when the function ran. As such, there is no way to pass any user-submitted parameters into a view.
How then to compare a value in a view with a user-submitted value? The secret is to emit that field as a key in the map function and rely on letting couchdb order by the keys.
Your map function would be something like
"map" : "function(doc) { emit(doc.created_at, doc); }"
and you would query it like so:
http://localhost:5984/db/_design/ddoc/_view/view?startkey=%222009/05/07%2021:40:17 +0000%22
I have taken the liberty of uriEncoding the quotes and spaces in the url so that it should be usable as is.
You want to write a view that creates a key of the timestamp field in that format, then query it with the startkey parameter.
So the view would look something like:
"map" : "function(doc) { emit(doc.timestamp_field, doc) }"
And your URL would be something like:
http://mysever/database/_design/mydoc/_view/myview?startkey="2009/05/07 21:40:17 +0000"
The HTTP view API page on the Wiki has more info. You may also consider the User Mailing List.
Please mind that couchdb works only on json values. If the timezone if the document stored in couchdb is different to the timezone of your startkey the query likely will fail.