Sharepoint calculated if statement not working - sharepoint

I've done a lot of googling and no solution I've found works for me.
Under the screenshot I have translated what it says.
=IF(ISBLANK([ToDate]),"",[ToDate]-[DaysToWarn]
This only throws an syntax error. I've tried many different solutions but none of which seems to work.
I even built a replica in my test environment to see if that worked, which it did. I'm out of options and I don't know what I am doing wrong.

The problem, most likely, is due to the parameter separator. The documentation says:
All example formulas in this topic use commas "," as the parameter delimiter character. In some countries, the comma is reserved for use as the decimal mark. In such countries, users creating a calculated field must use semi-colons ";" as the delimiter character.
If I'm correct to assume your localization is Swedish, the decimal separator is ',' (comma), and hence the parameter separator to be used shall be ';' (semicolon).
=IF(ISBLANK([ToDate]); ""; [ToDate]-[DaysToWarn])

Related

Vim regex to search and highlight words with hyphens in it

I have a JSON file, and it has double quotes around keys and values. I want to remove double quotes from the keys(I know it would be invalid JSON, but still trying something). to do so I used this regex
:%s/"\(\w*\)":/\1:
But now the issue is that some of the keys have hyphen(maybe multiple) in them. The aforementioned solution won't work anymore. It only selects the keys that don't have hyphens. I tried to find a solution for this, but couldn't find anything concrete. Would be very helpful if you could help a little.

In Azure Mapping Dataflows has anyone been able to successfully change the escape character of a Source Dataset?

Has anyone tried this using the Mapping Dataflows?
Example input field is:
"This is a sentence, it contains ""double quotes"" and a comma"
The escape character is a " and the quote character is a ".
When I use a regular Copy activity this works without a problem, however
when using the same Dataset in a Mapping Dataflow it gets parsed into 2 fields instead of one. In fact changing the escape character makes no difference.
Closing this issue. I've realised that output still has the \ as the escape character so when opening the output file in Excel it appears corrupted

Tab Delimiter in Data Factory

I am running into an issue when trying to parse the data from a config file in Data Factory.
I am using a configuration file and the items are called in the copy activity. We have the option to parameterize the 'Column Delimiter' field from a data set, so I am using the value from the file (because in some cases is ';' and in others '\t').
When the delimiter is semicolon is working perfectly, but when it's \t , I get the following error :
Copy activity doesn't support multi-char or none column delimiter.
When I'm checking the value that goes into the field, I see that the value is not the one from the file (\t), but \\t.
Do you have any idea why this behavior or if there is an escape character for this one. I also tried with ASCII code (\0009) and I get the same error - it doesn't know to transform it. Thanks a lot!
Can you try passing a real tab copied from a text editor, like - ' '.
This has been seen to work.
Had there been no parameterization in the delimiter, you could have done it through the GUI or even the code.
The short answer, is when entering a tab value in the UI, do not use \t, instead use " ".
Between the empty quotes, I pasted an actual tab character.
Based on the statements in the official document, Currently, multi-char delimiter is only supported for mapping data flow but not Copy activity.
You could try to use mapping data flows which is also designed data transformations in ADF. Please see more details here: https://learn.microsoft.com/en-us/azure/data-factory/concepts-data-flow-overview
Any concern,please let me know.
You should use t instead of \t. Data Factory replaces t with \t itself. That is why \t ends up as \t

Combining formulas that include "" using putexcel

I'm trying to save some time generating a lot of reports on Excel with a program from Stata using the putexcel command.
It has worked perfectly. However, I'm encountering a problem when mixing 3 formulas in which one includes quotation marks to denote a space " ".
To be more specific, this is the code I'm using:
putexcel B2=formula("IF((VLOOKUP(A2;HI!$1:$1048576;2;));" ";VLOOKUPA2;HI!$1:$1048576;2;))") using "`archivo'", modify sheet("DEFGGF")
The problem here is that it works in Excel, but instead of the space enclosed in " " I'm getting a 0 since it doesn't read the quotation marks.
I have tried enclosing the "" in several other ways, like
'""`
or
"'"'`"`"
but they don't work.
I would post this as a comment, but I never am able to get the backtick (`) character to display properly in a comment.
I think your code should look like
putexcel B2=formula(`"IF((VLOOKUP(...));" ";VLOOKUP(...))"') using ...
but I admit to not having tested this solution. But the general principles involved are explained in the output of the Stata command help quotes##double.

Issue with escape characters in Watir/Cucumber

Was hoping someone could help me with an issue I am having with escape characters in Cucumber/Watir.
I have automated tests setup. When I perform a search, 1 of the assertions I use to verify that the search has returned the correct result is to check the page for text. So my code looks like this:
Then /^I should see the following text: "([^"]*)"$/ do |str|
assert #browser.text.include?(str)
end
Here I pass in the text to search for in the string variable. e.g nike, reebok etc
So in my feature file the step is like this:
Then I should see the following text "search results for nike"
This works fine apart from 1 issue. 1 of the sites I am testing has decided to put the search term in double quotes i.e - search results for "nike"
As a result this screws up my test as I need to include the quotes as part of the search term. Therefore I need to put the word nike in escape quotes or else cucumber will recognise the first quotation around the word nike as a closing quotation. (as there is already a double quotes before it)
I have tried various different escape characters but nothing seems to work. For example I have tried the following:
\" – double quote
\\ – single backslash
Has anyone experienced similar problems and if so, how did you overcome the problem?
Thanks!
You need to change the regex rather than the string.
Problem: Your current regex says "([^"]*)", which says to match all characters between the quotations that are not quotations. This is not good given that you want to include quotations.
Solution: Change the step to the following:
Then /^I should see the following text: "(.*?)"$/ do |str|
assert #browser.text.include?(str)
end
The .* says to match all characters between the quotations. The ? makes the search lazy (instead of greedy). The ? is optional in this case, but would be important if there were additional parameters being captured. A good explanation of the greedy vs lazy can be seen at http://www.regular-expressions.info/repeat.html.

Resources