CONCAT doesn't recognize built in function - concatenation

enter image description here
Hi goodevening i just want to ask, how to fix this. the concat says that it doesn't recognize builtin function.

Can you try avoid CONCAT just by using the + operator.
Syntax fill be following, instead of:
CONCAT(username, ' ', 'is created')
use
username + ' is created'

Related

Replacing copyright symbol python

I'm trying to remove copyright symbols in my dataframe. I can recognise the symbol using:
symbol = u'\N{COPYRIGHT SIGN}'.encode('utf-8')
symbol = symbol.decode('utf-8')
But when I then try to replace it, this doesn't work:
print(df_one.replace(symbol, ''))
Do I need to read the data in differently somehow? I'm currently using:
df_one = pd.concat(map(pd.read_csv, glob.glob('data/*.csv')))
You should use the "loc" method with the replace function:
df.loc[:, "column_name"].replace({character},regex=True)
averroes response almost worked. This is the solution I now have that does work:
df.loc[:, "column_name"].replace({symbol: ' '},regex=True)

Reactjs convert input string to upper case

I'm creating an app in Reactjs using react-strap. I would like to convert an input field to upper case.
From googling, it looks like simply appending "toUpperCase()" to the field would work, but this doesn't appear as an option in Visual Studio code.
I had a similar issue with doing a replace all, but finally got that to work using "const" field:
// replace ":" with "-"
const phrase = item.macs;
const replaced = phrase.replace(/:/g, '-')
item.macs = replaced;
However, converting to a const field doesn't work for making the "toUpperCase()" available.
What should I do to turn this into a string so I can call the "toUpperCase()" function?
Edit: change references from "toUpper" to "toUpperCase". The problem is this is not available as a function.
For example of I do
'myString'.toUpperCase();
it works. But it I can't get it to bring that up in Visual Studio Code, and it's ignored if I code it anyway.
I believe you are looking after toUpperCase.
To make a string uppercase in javascript you can call .toUpperCase() method on it. For example
const foo = 'foo'
const fooUpper = foo.toUpperCase()
console.log(fooUpper) // expected result 'FOO'
I got around this problem by forcing the input item to be regarded as a string by prepending it with a '', like so:
item.macs = '' + item.macs;
item.macs = item.macs.replace(/:/g, '-');
item.macs = item.macs.toUpperCase();
After that, all the string functions were available.

Report Builder Expression with a '

I have this field called series that has this expression in it, what does the ' mean in this context?
=(Fields!PropertyID.Value)
'=IIF(Parameters!CombineProperties.Value = TRUE AND (Fields!Campus.Value<>""),Fields!Campus.Value,Fields!PropertyName.Value)
This is an SSRS expression for a label or variable that is parsed at runtime in an ssrs report. The gist here is :
The starting =(Fields!PropertyID.Value) does not make sense as you can't set variables that way, however, after the ' it goes like this:
var result=null;
if (CombineProperties && Campus.Length > 0)
result=Campus
else
result=PropertyName
After reading your post again, I think you are trying to Concatenate strings. Is this your end goal?
=CSTR(Fields!PropertyID.Value) + IIF((Parameters!CombineProperties.Value = True) AND (Fields!Campus.Value<>""), Fields!Campus.Value,Fields!PropertyName.Value)
Update
Doh!, I am rusty on VB. I believe apostrophe comments out a line. Everything after ' is ignored. DOH!

VLOOKUP Salesforce

VLOOKUP( $ObjectType.I__c.Fields.ISO_Code__c,
$ObjectType.I__c.Fields.Name, Case__r.Account.BillingCountry) + '-' + IF(OR(TEXT(Case__r.Account.Type) = 'Cargo Agent',TEXT(Case__r.Account.Type) = 'C Associate') ,'C','P') + '-' + LEFT(Case__r.Account.ICode__c,7)
This allows me to upload something like this format JO-P-NA44694-2.pdf but the user can also upload something like [[JO-P-NA44694-2]].pdf or --JO-P-NA44694-2-][.pdf. How can I stop that, and make the user only able to upload something like this JO-P-NA44694-2.pdf
use Regex something like this REGEX(Name, "[a-zA-Z0-9]{2}-[a-zA-Z0-9]{1}-[a-zA-Z0-9]{7}-[a-zA-Z0-9]{1}")

Updating array values (Appcelerator Titanium Mobile)

I'm using both the 1.5.1 and 1.6.0 to test my apps on my OS X.
I'm trying to update some values in this array:
var myTab = [
{title:'foo1',value:'bar1'},
{title:'foo2',value:'bar2'}
];
If I update a value field in this array, it doesn't do it (which isn't normal):
Titanium.API.info('Before :' + myTab[0].value);
myTab[0].value = 'updated!';
Titanium.API.info('After :' + myTab[0].value);
It displays 'bar1' instead of 'updated!'.
What I tried next is to put the tab as a property list:
Titanium.App.Properties.setList('propTab',myTab);
And then, I tried to do the same thing:
Titanium.API.info('Before :' + Titanium.App.Properties.getList('propTab')[0].value);
Titanium.App.Properties.getList('propTab')[0].value = 'updated!';
Titanium.API.info('After :' + Titanium.App.Properties.getList('propTab')[0].value[0].value);
Same result: It displays 'bar1' instead of 'updated!'.
Is there another solution?
Thank you,
Regards
I've run into this sort of behavior before. While I never ascertained the cause, I found a workaround: you need to set myTab[0] to a value, and not myTab[0].value to a value. So, thus:
myTab[0] = {title: myTab[0].title, value: "updated!"};
Why, I do not know... I should probably figure it out.
You need to mention it as an array element then it should work. For e.g., in your case you may modify as foolows
myTab[0]['value'] = 'updated!';

Resources