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}")
Related
This is how I use router.query to get hold of the token that I need so that the user can update one's password. But when I e.g. print it to my hidden, it removes e.g. + and / etc.
I have tried to use encodeURIComponent to be able to solve the problem but it seems that it does not help in any way.
Token in url: CfDJ8Pf5H7I0LCJKuxB2jm5JU0EGFK7KC45kBnwAkPgbAO2+kPijFxxb5CW6wyE/ft74if6V5ouwrHE8wK8Vz2ZTlc0s82XwwC9rZD4CvA5UQnv9eyL0UxdCqNEVjlusntVTn4d+41nLwlADsSqhLYajkRHwSHx8DhvJZa9OBGX9iYpR2EXnBOMa1EZcvvKDhEX+9+pgOtW8shPAo4p+F5nG0C+qnK4s5u/rO5vgA7SFhEkWS
When I get it into the content of the page, it looks like this. After it is displayed on the page.
CfDJ8Pf5H7I0LCJKuxB2jm5JU0EGFK7KC45kBnwAkPgbAO2 kPijFxxb5CW6wyE/ft74if6V5ouwrHE8wK8Vz2ZTlc0s82XwwC9rZD4CvA5UQnv9eyL0UxdCqNEVjlusntVTn4d 41nLwlADsSqhLYajkRHwSHx8DhvJZa9OBGX9iYpR2EXnBOMa1EZcvvKDhEX 9 pgOtW8shPAo4p F5nG0C qnK4s5u/rO5vgA7SFhEkWS
I have tried to do this:
encodeURIComponent(String(router.query["token"]))
And i have try
router.query["token"]
How can it be that you change the sign from + to between spaces or something completely different.
You can decode the encodded string before printing on the page.
const encoddedUri = encodeURI("https://example.com/asdasd asdasd");
console.log(`encoded URI: ${encoddedUri}`);
console.log(`Decoded URI: ${decodeURI(encoddedUri)}`);
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'
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!
I have created a custom field of type Text Area in my Sandbox environment and would like to know how to normalize the text typed into this custom field.
In order to make a normalization I've implememted the following method:
public String domainNormalization(Account accountObj) {
String domain = accountObj.Domain__c;
if (domain != null) {
domain = domain.replaceAll('[ ]+', '');
domain = domain.replaceAll('[,;:*]+', ' ');
domain = domain.replaceAll('(https?://www.|https?|www.)', ' ');
domain = domain.replaceAll('(A-Za-z\\d._~:/?#\\[\\]#!$&\'()*+,;=-)', ' ');
accountObj.Domain__c = domain;
return domain;
}
return '';
}
But when I am able to add in the domain field:
Screenshot 1
The code in the normalization method does not work because I get the following:
Screenshot 2
It should always look for string(domainname) + dot "." + the extension of the domain(com, eu, bg and etc). Where the separator between these must be a single space for example: domain.com secondomain.com thirddomain.com
Coud you please advise how to normalize the text typed in the domain field in order to achive the same result in the given example?
I also would like to know is there a way to get all possible domain extensions(com, eu, bg and etc)? Do I need special consideration about domains such as for instance (co.uk)?
Regards,
Dilyan
I am using asp.net 2.0 and c#.
I have a dataset, which is getting the employee info. Now I want to filter the gridview based on a name that the user has put in the search textbox.
I am doing this:
DataSet ds = new DataSet("EmployeeInformation");
//........ loading DataSet ds with emploee info
string strExpr;
strExpr = "Name LIKE %" + txtSearchEmployee.Text.Trim() + "%";
ds.Tables[0].Select(strExpr);
I am getting an error in the last step, that the operator is missing.
Please guide me how can I achieve this. Thanks in advance.
You just need to add single quotes around your LIKE criteria:
strExpr = "Name LIKE '%" + txtSearchEmployee.Text.Trim() + "%'";
ds.Tables[0].Select(strExpr);