Replace text with variable - docusignapi

I'd like to use the bulk uploader to override text in a document. E.g. I could have JOB_TITLE in the document and this should be replaced with the contents of the CSV file. I can see how I can put the fields in but it doesn't make space for long titles - text goes over the existing text.
How can I replace a tag with a long string and still have everything fit?
Thanks!

You specify an absolute (i.e., specific) width when you place a new field (tab) in a document, and DocuSign reserves exactly that much space for the field value, irrespective of the location of surrounding text in the document. As it sounds like you're experiencing, if the field value you specify exceeds the space that's been reserved for that field in the document, the value will be written in its entirety to the document, overlapping any adjacent text located to the right of the field.
Therefore, if possible, it's best to format/arrange your document contents in such a way that any variable length fields are placed at the end of their own line, rather than 'inline' within a sentence (in close proximity to other text).
For example, instead of contents like this:
We are pleased to offer you the position of [JOB_TITLE] with a salary of [SALARY], beginning on [START_DATE].
You could instead arrange things more like this:
We are pleased to offer you the following position:
Title: [JOB_TITLE]
Salary: [SALARY]
Start Date: [START_DATE]
That way, regardless of the length of JOB_TITLE, SALARY, or START_DATE (within reason, of course), the final document will be formatted nicely.

Related

Extract part of a string in excel

String:
"Department=Acc:2";"Classes=Accessoire";"Suppliers=xxx23";"Category=Décor";"Discount=no";Related_Carousel_Products=[23043]";"Accessory Type=Crinolines et Shorts";
My excel cells are filled with data like this and I want to extract a specific part of it, for example I would like to extract Accessory Type="Crinoline" into a new column so that I can edit them separately. I've tried this article it has many creative ways to extract the data but I cannot find a way to extract in the way I want, I want to extract part of the string, including the quotes.
https://www.extendoffice.com/documents/excel/3639-excel-extract-part-of-string.html
UPDATED - screenshot showing breakdown of each key function
You can do this using mid + search as follows (screenshot below/this sheet refer):
=MID(B2,SEARCH($F$2,B2),SEARCH(";",MID(B2,SEARCH($F$2,B2)+1,LEN(B2))))
where:
B2: the raw text
F2 = 'Accessory Type' (or any other thing you specify that satisfies final bullet)
Entire string you want to return (with or without quotation marks) falls after 'Accessory Type' and before the very next semi-colon (;) - per your example/below screenshot/above link.
How does this work?
We need to find the part of text that starts with the selected word(s) (e.g. "Accessory Type" in this case) and ends after the description of that accessory type (in this case, it's made up "asdfhadhgk")
Working from inside out mid function (A) returns everything after the words "Accessory Type"
Great, now we just need to it 'stop' a bit sooner, i.e. after the semi-colon that first appears after the words Accessory. This is exactly what the outer Mid function (D) achieves (it returns the string starting with "Accessory Type" up to the semi colon)
Screenshots below refer.

Highlight Specific Word in Associated String and String Variable in Tableau

My goal is to create a highlight function for keywords contained within an associated string, and the overall string variable.
After trying "contains" function, trying variations of the logic contained in these links (1st - https://community.tableau.com/thread/214410, 2nd - https://community.tableau.com/message/846896#846896), and receiving an answer from Tableau Support that they don't know how to highlight keywords contained therein, I wanted to try the Stack OverFlow community before giving up on this one.
To illustrate, below is a table showing my goal with a matrix that contains a keyword and an associated string:
The next shows the ability to select a keyword that is then highlighted within all observations in the string variable:
The closest I have achieved is the following where only the associated string and its entirety are highlighted, as opposed to the broader string variable and just the keyword within the relevant string:
The logic is the following:
Create a parameter for users to enter their search keyword, and create a calculated field to see if the keyword is contained in the Comment field
Create and show a Highlighter for the Comment field.
To use a parameter to call attention to the comment using color:
Create a Parameter called "Search Keyword" with data type string. Select "All" for allowable values.
Create a calculated field called Matches or Color Matches, with the following formula:
CONTAINS([Key Words], [Search Keywords])
OR CONTAINS([Comments], [Search Keywords])
Drag this calculated field onto Color on the Marks card
Right-click the parameter and select "Show Parameter Control
Type the keyword to search and highlight.
To use a Highlighter:
Once the dashboard with keywords and comments has been created, navigate to the options menu for the Comments sheet and select Highlighters > Comments
This now displays a Highlight control which will highlight the row of a comment, instead of changing the text color like the parameter does.
This option will also allow for clicking on keywords, but clicking will only highlight the corresponding comment rather than all comments with the keyword.
As a potential third alternative, if viewers only want to see the matching words and not the entire string, we can modify the parameter method to add an IF statement to the calculated field we created earlier:
IF CONTAINS([Key Words], [Search Keywords])
OR CONTAINS([Comments], [Search Keywords])
THEN [Search Keywords]
END
Do you have any suggestions on how to tweak what I have, or even take a different approach? Any help would be greatly appreciated
As I am sure you know, Tableau is going to colour the entire text string as the CONTAINS condition results in TRUE for the entire string. A different approach could be to restructure your data to a 'long' format with 1 row per word (as below).
Doing this will ensure that Tableau knows each word should be evaluated separately and that the Color Marks Card will partition each word. You can then structure your worksheet like this. To ensure the words are showing in the correct order, you'll need a calculated field to create a unique row (I have called sort_order right("000000" + str([sentence_id]),7) + right("000000" + str([Position]), 7). Note that the Text Marks Card is sorted by sort_order and also that the order in which you drag on/order the Mark Cards is important
The colour_keyword formula then is simply something like [word] = [Keyword Parameter] (maybe check for upper/lowercase variants).
I would recommend maintaining your original table's data structure as well as this 'long table format and link the two datasources via a Relationship (Data > Edit Relationships) and use Dashboard Actions. This would hopefully satisfy your highlight requirements and mean less rework for your other worksheets.
I've published the demo tableau workbook to tableau public here

how to get all values from dropdown from web application in blueprism

I want get all values of dropdown and want to store them somewhere. from follwing NASDAQ site https://www.nasdaq.com/symbol/ge/historical i want get all values of Timeframe and want to somewhere so that i can use those values one b one in loop and get the values of stock for all timeframe. Click below image screenshot
It's not that easy to get each of the values, but it's not impossible. First you can get all the values in a Data Item as text. If you spy the element, you will notice that the attribute Value contains what you want. So you will need to use a read stage and get this specific attribute's value (you can ignore the PDF elements):
Doing so will give you the following:
The problem with this is that you cannot use this in a loop. One way around would be to split on space:
And the resulting collection (I called it Split Values) will look like this:
But it's not quite there yet. You should however be able to use this collection to get the collection you need (or use it directly).
If you use it directly, I would say it should look like this:
Empty? has the expression [Split Values.words]="" (notice the last row is blank)
Value is number has the expression IsNumber([Split Values.words])
Set Current Item as Number has expression [Split Values.words] with store value Current Item.
Append word to Current Item has expression [Current Item]&" "&[Split Values.words] with store value Current Item.

Extracting text from complex string in excel

The attached image (link: https://i.stack.imgur.com/w0pEw.png) shows a range of cells (B1:B7) from a table I imported from the web. I need a formula that allows me to extract the names from each cell. In this case, my objective is to generate the following list of names, where each name is in its own cell: Erik Karlsson, P.K. Subban, John Tavares, Matthew Tkachuk, Steven Stamkos, Dustin Brown, Shea Weber.
I have been reading about left, right, and mid functions, but I'm confused by the irregular spacing and special characters (i.e. the box with question mark beside some names).
Can anyone help me extract the names? Thanks
Assuming that your cells follow the same format, you can use a variety of text functions to get the name.
This function requires the following format:
Some initial text, followed by
2 new lines in Excel (represented by CHAR(10)
The name, which consists of a first name, a space, then a last name
A second space on the same line as the name, followed by some additional text.
With this format, you can use the following formula (assuming your data is in an Excel table, with the column of initial data named Text):
=MID([#Text],SEARCH(CHAR(10),[#Text],SEARCH(CHAR(10),[#Text])+1)+1,SEARCH(" ",MID([#Text],SEARCH(CHAR(10),[#Text],SEARCH(CHAR(10),[#Text])+1)+1,LEN([#Text])),SEARCH(" ",MID([#Text],SEARCH(CHAR(10),[#Text],SEARCH(CHAR(10),[#Text])+1)+1,LEN([#Text])))+1)-1)
To come up with this formula, we take the following steps:
First, we figure out where the name starts. We know this occurs after the 2 new lines, so we use:
=SEARCH(CHAR(10),[#Text],SEARCH(CHAR(10),[#Text])+1)+1
The inner (occurring second) SEARCH finds the first new line, and the outer (occurring first) finds the 2nd new line.
Now that we have that value, we can use it to determine the rest of the string (after the 2 new lines). Let's say that the previous formula was stored in a table column called Start of Name. The 2nd formula will then be:
=MID([#Text],[#[Start of Name]],LEN([#Text]))
Note that we're using the length of the entire text, which by definition is more than we need. However, that's not an issue, since Excel returns the smaller amount between the last argument to MID and the actual length of the text.
Once we have the text from the start of the name on, we need to calculate the position of the 2nd space (where the name ends). To do that, we need to calculate the position of the first space. This is similar to how we calculated the start of the name earlier (which starts after 2 new lines). The function we need is:
=SEARCH(" ",[#[Rest of String]],SEARCH(" ",[#[Rest of String]])+1)-1
So now, we know where the name starts (after 2 new lines), and where it ends (after the 2nd space). Assuming we have these numbers stored in columns named Start of Name and To Second Space respectively, we can use the following formula to get the name:
=MID([#Text],[#[Start of Name]],[#[To Second Space]])
This is equivalent to the first formula: The difference is that the first formula doesn't use any "helper columns".
Of course, if any cell doesn't match this format, then you'll be out of luck. Using Excel formulas to parse text can be finicky and inflexible. For example, if someone has a middle name, or someone has a initials with spaces (e.g. P.K. Subban was P. K. Subban), or there was a Jr. or something, your job would be a lot harder.
Another alternative is to use regular expressions to get the data you want. I would recommend this thorough answer as a primer. Although you still have the same issues with name formats.
Finally, there's the obligatory Falsehoods Programmers Believe About Names as a warning against assuming any kind of standardized name format.

How to eval a field name contained in another field in an Access Query?

I need to create a long list of complex strings, containing the data of different fields in different places to create explanatory reports.
The only way I conceived, in Access 2010, is to save text parts in a table, together with field names to be used to compose the string to be shown (see line1 expression in figure). Briefly:
//field A contain a string with a field name:
A = "[Quantity]"
//query expression:
=EVAL(A)
//return error instead the number contained in field [Quantity], present in the query dataset
I thought doing an EVAL on a field (A), to obtain the value of the field (B) which name is contained in field A. But seems not working.
Any way exist?
Example (very simplified):
Sample query that EVAL a field containing other field names to obtain the value of the fields
Any Idea?
PS: Sorry for my english, not my mothertongue.
I found a interesting workaround in another forum.
Other people had same problem using EVAL, but found that it is possible to substitute a string with a field contents using REPLACE function.
REPLACE("The value of field Quantity is {Quantity}";"{Quantity}";[Quantity])
( {} are used only for clarity, not needed if one knows that words to be substituted do not compare in the string). Using this code in a query, and nesting as many REPLACE as many different fields one want to use:
REPLACE(REPLACE("<Salutation> <Name>";"<Salutation>";[Salutation]);"<Name>";[Name])
it is possible to embed fields name in a string and substitute them with the current value of that field in a query. Of course the latter example can be done more simply with a concatenation (&), but if the string is contained in a field instead that hardcoded, it can be linked to records as needed.
REPLACE(REPLACE([DescriptiveString];"[Salutation]";[Salutation]);"[Name]";[Name])
Moreover, it is possibile to create complex strings context-based as:
REPLACE(REPLACE(REPLACE("{Salutation} {Name} {MaidenName}";"{Salutation}";[Salutation]);"{Name}";[Name]);"{MaidenName}";IIF(Isnull([MaidenName]);"";[MaidenName]))
The hard part is to enumerate all the field's placeholders one wants to insert in the string (like {Quantity},{Salutation}, {Name}, {MaidenName}) in the REPLACE call, while with EVAL one would avoid this boring part, if only it was working.
Not as neat as I would, but works.

Resources