A search of the QuartetFS Confluence for 'field name spaces' gives little other than a snippet of a document saying:
The names are shown here with spaces, for clarity; in ActivePivot, the names do not have spaces
"Do not have spaces" doesn't mean "can not have spaces" so I am curious if we can safely use spaces in the field names or create a alias with spaces that points to a field name without spaces.
Yes, the following item can contain spaces:
Schema field name
Cube level name / property
Cube dimension name
Cube measure name / property
Could you give the URL of the documentation page you quoted? This should be fixed.
Related
I have a query like this $"https://graph.microsoft.com/v1.0/{_config.SubBaseUrl}/items?expand=fields(select=id,Title,MFG_Name,Manufacturer Part Number)"
How can I select the column names with spaces like "Manufacturer Part Number", so I don't get invalid path error?
Replace the spaces in the field name by _x0020_
https://graph.microsoft.com/v1.0/{_config.SubBaseUrl}/items?expand=fields(select=id,Title,MFG_Name,Manufacturer_x0020_Part_x0020_Number)
Another option is to call query with expand without select and check the format of the column with spaces. Sometimes Graph API returns column's name without spaces.
https://graph.microsoft.com/v1.0/{_config.SubBaseUrl}/items?expand=fields
So it's possible that for Manufacturer Part Number api will return ManufacturerPartNumber.
How can I add text strings to a specific field in a record based on the contents of another field in that record?
One field in each record potentially contains four pieces of data I need to search for with text strings, and if present, I need to add corresponding text strings to another field, with | between multiple strings.
An example field might have content like this:
Some sentence that precedes the info:
This String
That String
*another sentence that precedes other info
A third string
And a fourth string
I'd need to search for "This String" "That String" "third string" and "fourth string", and in fields that had all four, add a string in the other field that read "this|that|third|fourth"
In a field that only had "This String" and "fourth string", the added field data would need to be "this|fourth"
I figured it out. I was overthinking and trying to do it backwards.
I exported a CSV of just the reference column, used a text editor to find and replace the strings I needed to remove and then replace the returns with the stovepipes. Hope this helps someone else. :)
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
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.
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.