Is there a function in Archer that could draw a line separating two outputs in a single field? - archer

I am trying to concatenate 2 outputs in calculated text field. But I would like to draw a line in between them or at least give them a heading, so that the users will be able to identify them easily. I could make different fields and have them calculated. But the requirement is to concatenate 15 fields into one field. So, I do not want to create 15 fields and write separate calcs. See below example
Example 1)
Hello, this is an example of what I am trying to explain with an example (o/p 1)
Hello, this is how I would like to present to the end users avoiding confusion (o/p 2)
As you see above, I was able to concatenate 2 o/p's, but I would like to draw a line. This one scenario that would work for me.
Example 2)enter image description here
Users Watch
Hello, this is an example of what I am trying to explain with an example (o/p 1)
Admin Watch
Hello, this is how I would like to present to the end users avoiding confusion (o/p 2)
As you see in 2nd example, I would like to put a heading for o/p 1 as "users watch" and "Admin Watch" for o/p 2, so that the users can differentiate it.
I have tried sub-string function for example 2, it looks 'OK' but it would be of more help if anyone has better solution.

The beauty of Archer is that you can use HTML in the calculation; providing that the calculated field is a text field and that its display is set as text area.
You can use the following calculation:
CONCATENATE("<H3>Header 1</H3>", [Field 1], "<H3>Header 2</H3>", [Field 2])

Related

PostgreSQL: How to extract text from a particular letter?

I'm practicing exercises with SQL and I've got a problem I couldn't resolve yet.
I have a table with a column named: **'email' ** and I want to extract just the Domain of each mail. Then I was thinking to extract since '#' to get that information.
But idk how to do it, was trying with SUBSTRING, but that didn't work because that's about position, and each mail has different size.
I attach a screenshot about the table's composition (does not contain real information). Thank u so much :)
I tried with SUBSTRING method but that didn't work
Example email: example_email#outlook.com
Output expected: #outlook.com
We can use SPLIT_PART to fetch everything after the # and then append the #:
SELECT CONCAT('#',SPLIT_PART(email, '#', 2)) AS mailDomain
FROM people_practice;
Here the documentation about this and other useful string functions.

#Dblookup and formatting on web

I have been developing a web application using domino, therein I have dblookup-ing the field from notes client; Now, this is working fine but the format of value is missing while using on web.
For example in lotus notes client the field value format is as above
I am one, I am two, I am one , I am two, labbblallalalalalalalalalalalalalalalalalalaallllal
Labbbaalalalallalalalalalaalallaal
Hello there, labblalalallalalalllaalalalalalalalalalalalalalalalalalalalalalalala
Now when I retrieve the value of the field on web it seems it takes 2 immediate after 1. and so forth, I was expecting line feed here which is not happening.
The field above is multi valued field. Also on web I have used computed text which does db lookup from notes client.
Please help me what else could/alternate solution for this case.
Thanks
HD
Your multi-valued field has display options associated with it and the Notes client honors those. Obviously, your options are set up to display entries separated by newlines.
The computed text that you are using for the web does not have options like that and the field options are irrelevant because you aren't displaying the field. Your code has to insert the #Newlines. That's pretty easy because #DbLookup returns a list, and if you concatenate a list and a scalar, the scalar will be appended to each element of the list. (Look at the third example under "concatenation, pairwise" here to see what I mean.
The way you've worded your question is a little unclear to me, but what you need in your computed text formula is either something like this:
list := #DbLookup(etc,. etc.);
list + #Newline;
Or something like this:
multiValueFieldContainingListWithDbLookupResult + #NewLine;
I used #implode(Dblookupreturnedvalue;"");
thanks All :)

SSRS Loop through data, adding a new title if the chapter/section changes

I'm building an SSRS report in Report Builder 3.0 (2014). I have five sections of data I'm working with: inspection number, chapter, section, code, and description. The report is only going to show data for one inspection, so all data is filtered on InspNo first. There are often multiple codes associated with an InspNo.
What I have: for every code associated with an inspection, the code is listed along with its description.
What I need: I need to add the chapter and section info, but only when it changes. For example, let's say the codes associated with an inspection are 302.7, 304.10, 304.12, and 505.1. I would like the result to be as follows:
Chapter 3
Section 302
302.7 - Description
Section 304
304.10 - Description
304.12 - Description
Chapter 5
Section 505
505.1 - Description
I have tried using Lists, but the chapter and section get repeated for every code. Any ideas how to make it work?
****UPDATE****
I'm getting closer to a solution. Right now I'm using a combination of textboxes and lists. The chapters and sections are text boxes, and the codes/descriptions are lists. All of the elements have a visibility expression using InStr. The lists are working perfectly. However the text boxes are giving me issues.
It seems my visibility expressions on elements outside of lists are only looking at the first piece of the pulled data. In the example above, Section 302's visibility expression is =IIF(InStr(Fields!FAILEDCODE.Value, "302") > 0, False, True). This is working great because the first code is 302.7. Section 304's visibility expression is =IIF(InStr(Fields!FAILEDCODE.Value, "304") > 0, False, True). This text box is always hidden. It seems like Report Builder is only checking this InStr value against the first line of data, not the entire set. Does anyone know if this is accurate or if there's a workaround?

Pentaho Report Designer resource message

I'm currently using Pentaho 5.2.
I have 1 data field that comes from the .ktr file ( organization_name )
I have 1 resource-label ( org_name ) that is text/translated in the report itself.
I was wondering how I could combine the fields as 1 field. Someone advised me to fill in the resource-message field, but I'm not sure how and the Wiki doesn't have any information: http://wiki.pentaho.com/display/Reporting/resource-message
Any advice? Thanks in advance.
If you combine two fields, by using concatenate also you can achieve your requirement.
eg:- You have two fields i.e, Field1,Field2
Now, you can combine two fields like these.
=> Take another field i.e, text field and select that text field and go to Attributes tab and find out value and press + button and add these line.
=CONCATENATE([Field1];" - ";[Field2])
Thank you.
Venkatesh got me on the right path, what I did to translate the labels:
Text field with value:
=CONCATENATE([ResourceMesssageFormatExpression0];" - ";[organization_name])
==> You want to add a Resource Message Format Function ( under Data > Add Functions > Advanced functions ) that looks toward resource-identifier
With the Resource-Key of Pattern which contains the label: org_name
Then you can use this in the =CONCATENATE
This will get the label translated.

Selenium IDE: How to count the number of lines in a text area?

I have this textarea where anyone can type/paste in multiple phonenumbers, with only one phone number entered per line. When this is saved, the numbers will then appear in a table listing all phone numbers for that user.
I am trying to create a test where I can count the number of phonenumbers that the user entered. I will use this number to compare the total number of phonenumbers before and after the user added them in the textarea
For example a user might type in 2 phonenumbers in the textarea:
123456789
102563987
StoreCSS and xpath count won't work in this case since the characters that a user types in won't be saved in the html.
I have tried storing the value that is typed in the textarea and splitting the lines, but I'm stuck there and not sure what to do next.
Any help will be most welcome. Thanks!
You can do this way. Say for example, stackoverflow's comment area is of textarea. Its css is:
textarea[name='comment']
I could able to do this:
String commentText = driver.findElement(By.cssSelector("textarea[name='comment']")).getText()
Then you can split the string using \n, like this:
commentText.split("\n").size()
is giving me the number of lines entered by the user.