I have to write validation rule on custom object customer as - validation

If city__c is equal to hyd panCard, phone,email blank through error.

i don't know if i understood your question correctly. Try it with:
AND(
city__c = 'hyd panCard',
ISBLANK(phone),
ISBLANK(email)
)

Related

How to make a validation rule in laravel similar to if (condition 1) and (condition 2), true

I have the following validation rule in my controller
"holder_name" => 'required_if:paymentMethod,==,credit_card',
That is, if paymentMethod = credit_card then holder_name is required / mandatory.
Now I need one more condition to be checked.
I'll give the example as it would be in pure php, using if
For example I need to check if (paymentMethod = credit_card and card_id! = Null)
I already tried using two required_if:
'required_if:paymentMethod,==,credit_card'|'required_if:card_id,!=,null'
But it does not work.
Use the following rule for your validation.
The required_with rule mandates a field if any of listed ones are non-empty.
'required_if:paymentMethod,credit_card|required_with:card_id'

Salesforce Validation Formula

I've been stuck on this for a couple of days and can't seem to get it to work.
I'm trying to have an error fire when someone saves an opportunity:
Multi-Select - Call Qualifying
Checkbox - only 1 checkbox of the following can be checked
Here's the code I have so far. There are no syntax errors
AND (
INCLUDES(Metric__c,"Call Qualifying"),
OR( Call_Tagging_Client__c ,Call_Tagging_Est__c ,!Call_Tagging_Service__c
) ,
OR( Call_Tagging_Client__c,!Call_Tagging_Est__c ,Call_Tagging__Service__c
) ,
OR( !Call_Tagging_Client__c,Call_Tagging_Est__c ,Call_Tagging_Service__c )
))
if you haven't already resolved this, here is a pointer: The problem in your original formula is that you are using three OR functions when you actually want AND since, for each set of three fields, you want exactly one to be checked.
Try this instead:
AND(
INCLUDES(Metric__c, "Call Qualifying"),
OR(
/* Any of the next three conditions, each for exactly one checkbox checked */
AND(Call_Tagging_Client__c, !Call_Tagging_Est__c, !Call_Tagging_Service__c),
AND(!Call_Tagging_Client__c, Call_Tagging_Est__c, !Call_Tagging__Service__c),
AND(!Call_Tagging_Client__c, !Call_Tagging_Est__c, Call_Tagging_Service__c)
)
)

Check a date field is blank or empty in MS Flow expression

As part of an email step in our Flow, we are creating an HTML table, where certain rows are hidden using css.
So our expression formula (in the body of the Outlook - Send an email from a Shared Mailbox step looks like this:
if(
And(
Or(
equals(triggerBody()['DD_Artwork']['Value'], 'Bargain New Store')
, equals(triggerBody()['DD_Artwork']['Value'], 'Home & Fashion')
,equals(triggerBody()['DD_Artwork']['Value'], 'Home Store'))
, #empty(triggerBody()?['StoreOpeningDate']))
,'tr.StoreOpenDate {display:visible}', 'tr.StoreOpenDate {display:none}')
this part, checking the Date Selector field StoreOpeningDate is not working:
, #empty(triggerBody()?['StoreOpeningDate']))
we have also tried:
, Not IsBlank(triggerBody()?['StoreOpeningDate']))
and
, Not IsEmpty(triggerBody()?['StoreOpeningDate']))
and even:
, Not equals(triggerBody()?['StoreOpeningDate']), '')
but we always get the error message The expression is invalid
so what's the right way to go about this?
I faced a similar problem. The TriggerBody() function is doing the damage. Just use
Empty(item()?['DateField']) not equal to false in the condition.

metafor package, rma.uni, mods, Model matrix contains character variables

I'm trying to run a meta-regression with MD's as dependent variable. I want to add a numeric moderator (year published) to the rma.uni function.
Formula so far:
metafor::rma.uni(yi=MCID12, sei=SE12, method="FE", data=Pain, slab=paste(Pain$Author, Pain$Year), weighted=TRUE, subset=(Pain$outcomegruppe=="9"), mods =("Pain$Year") )
I always get the error message:
Error in metafor::rma.uni(yi = MCID12, sei = SE12, method = "FE", data = Pain, :
Model matrix contains character variables.
My "Year" veriable is definetly numeric. As soon as I don't use the "mods" argument, everything works normal.
Could anyone help me with this problem?
Thanks in advance!
Don't put Year in quotes. Also, you don't need the Pain$ parts and weighted=TRUE is the default. This should do it:
metafor::rma.uni(yi=MCID12, sei=SE12, method="FE", data=Pain, slab=paste(Author, Year),
subset=(outcomegruppe=="9"), mods=~Year)

Smarty issues with Fckediter

I'm new to this forum , i hope u do not mind questions even if its stupid.
i m trying to post a value from the fckeditor embedded in smarty template.The value submitted is,
a
b
c
d
however when echo the posted value i get ,
a b c d
which is very irritating because i want the actual value submitted.
No matter whatever i do i only see text with these tags i do not understand if have to do any configuration in smarty or fckeditor or what ?
Please help with this any help will be greatly appreciated.
i will appreciate your help
Mukesh ?
It was just that my framework used was sanitizing all GET,POST requests.
Then removed those function that was causing the function and job done .
function sanitize($data)
{
$data = trim(strip_tags($data, "<a><b><strong><em><i><u><br><h3><h4><h5>"));
return $data;
}

Resources