• Gayatri
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 5
    Replies
Hi Everyone,

I have a complex requirement, for which I need a dashboard to show all records in their respective state timestamps
Has anyone implemented Timezone conversion in Einstein Analytics Dataflows
I have a requirement where the pulled data from salesforce native object is showing timezone of integration user
Based on the service resource/user state I need to change the timezone in einstein and show date/timestamp fields of service appointments in state timezone
This is currently maintained in Excel sheets
I want to know is there a way I can get Canada USA state zip code timezone dataset which will show difference/offset. Any web links from where I can download these datasets.
Then this offset/time difference value, I can use for computation of timestamp fields which will give correct data always.
Also, I was thinking is there any API that I should explore to always have this timezone information up to date considering the daylight saving in some countries.

Thanks
Gayatri
Hi All,

I have a scenario to calculate the workdays excluding weekend and/or Public Holiday In Einstein Analytics. 

We need something like date = now()+workdays(5) that respect weekends and/or Public Holidays - ideally taken from the "Business Hours" setup. 

In "Business Hours": We insert Holidays for countries globally.

Please, can anyone help how they implemented or it can be implemented in dataflow computation field?

Thanks

Gayatri Sharma
Hi All,

I have a scenario to calculate the workdays excluding weekend and/or Public Holiday In Einstein Analytics. 

We need something like date = now()+workdays(5) that respect weekends and/or Public Holidays - ideally taken from the "Business Hours" setup. 

In "Business Hours": We insert Holidays for countries globally.

Please, can anyone help how they implemented or it can be implemented in dataflow computation field?

Thanks

Gayatri Sharma
Hi All,

I have a scenario to calculate the workdays excluding weekend and/or Public Holiday In Einstein Analytics. 

We need something like date = now()+workdays(5) that respect weekends and/or Public Holidays - ideally taken from the "Business Hours" setup. 

In "Business Hours": We insert Holidays for countries globally.

Please, can anyone help how they implemented or it can be implemented in dataflow computation field?

Thanks

Gayatri Sharma
When attempting to create my Apex trigger for this Trailhead development exercise, I receive an error. I don't understand how this is possible, because the records haven't been updated, and still aren't updating.
"Challenge not yet complete... here's what's wrong:
Setting 'Match_Billing_Address__c' to false updated the records anyway. The trigger should only act when Match_Billing_Address__c is true."


Here's my code:
trigger AccountAddressTrigger on Account (before insert, before update) {

    for(Account a : Trigger.new){
        If (a.Match_Billing_Address__c = true) {
            a.ShippingPostalCode = a.BillingPostalCode;
        }   
    }

}


 

Hi,

   

        i am using  <apex:images> component not displayed images why? what i missied please help me.      

 

       my vf page image:                

<DIV id="pl_animation" CLASS = "pl_slide" >
<apex:image STYLE="PADDING: 2px; BORDER:2px solid #ccb" HEIGHT="150" WIDTH="205" value="{!plan_c.Image1__c}" />
<apex:image STYLE="PADDING: 2px; BORDER:2px solid #ccb" HEIGHT="150" WIDTH="205" value="{!plan_c.Image2__c}"/>
<apex:image STYLE="PADDING: 2px; BORDER:2px solid #ccb" HEIGHT="150" WIDTH="205" value="{!plan_c.Image3__c}"/>
<apex:image STYLE="PADDING: 2px; BORDER:2px solid #ccb" HEIGHT="150" WIDTH="205" value="{!plan_c.Image4__c}"/>
</DIV>

 

and 

 

class:

 

String strImg1 = String.valueOf(plan_c.get('Image1__c')); 
if(strImg1 <> null) { strImg1 = strImg1.substring(33, 153); }
String strImg2 = String.valueOf(plan_c.get('Image2__c')); 
if(strImg2 <> null) { strImg2 = strImg2.substring(33, 153); }
String strImg3 = String.valueOf(plan_c.get('Image3__c')); 
if(strImg3 <> null) { strImg3 = strImg3.substring(33, 153); }
String strImg4 = String.valueOf(plan_c.get('Image4__c'));
if(strImg4 <> null) { strImg4 = strImg4.substring(33, 153); }

Plan__c pc = new Plan__c( Id = String.valueOf(plan_c.get('Id')), 
Image1__c = strImg1, Image2__c = strImg2, 
Image3__c = strImg3, Image4__c = strImg4 
);

 

 

Thanks 

 

Trying to create an Visualforce email template but having issues using IF statement to displaying a field if another field is not blank but getting an error message:

 

Error: Syntax error. Missing '}'

 

Here is the code below:

 

{!IF(relatedTo.Prior_Campaign_Link__c != ''), relatedTo.Prior_Campaign__r.Name, '')}

 

Thanks

  • February 05, 2010
  • Like
  • 0
Hello experts,
 
I want to know the way of using condition in visualforce page. I have a custom object 'Person__c' having few fields. Two of them are:
Name, Active(Checkbox), Birthday, Age(Numberic)
 
What I want to do is list values in these fields in visualforce page. While displaying, I want to display:
 'Minor' if Age<16, otherwise 'Adult'
 
I want to be able to do this in any of the following 3 ways:
 
1. By using If clause in apex page
2. By passing 'Age' as a parameter to my extended controller
3. And using case (or similar) in SOQL
 
Below is my code:
 
Code:
<apex:page standardController="Person__c" extensions="PersonExtension">
 <apex:form>
  <apex:pageblock title="My Persons Infos">
   <apex:pageblockList value="{!PersonList}" var="p">
    <apex:column value="{!p.Name}"/>
    <apex:column value="{!p.Active__c}"/>
    <apex:column value="{!p.Birthday__c}"/>
    <apex:column value="{!p.Age__c}"/>
    <apex:column value="{!anystring}"/>
    <apex:column value="{!IF((p.Age__c>16),'Adult','Minor')}"/>
   </apex:pageblockList>
  </apex:pageblock>
 </apex:form>
</apex:page>


public class PersonExtension{

  private final Person__c person;

  public PersonExtension(ApexPages.StandardController stdController){
    this.person= (Person__c)stdController.getRecord();
  }

  public Person__c[] getPersonList(){
    return [Select p.Id, p.Name, p.Age__c, Birthday__c, p.Active__c from Person__c p];
  }

  public String getAnyString(){
    return 'Anything';
  }
}

The error I get is: Error: Syntax error. Missing ')'
 
If I change the if condition to: <apex:column value="{!IF((p.Age__c<16),'Minor','Adult')}"/>
The error will be: Error: Syntax error. Found 'lt'
 
Even a simple clause is not working:

<apex:column value="{!IF(CONTAINS({!anystring}, 'Anything'),True, False)}"/>
 
1. What is wrong in my code? Can I use IF condition in this way?
2. Can I pass a parameter (Age in above case) to my controller and return a string based on parameter supplied to it? If so, how?
3. Can I use case...when clause (or similar like in sql) in my SOQL? If so, how can I do so?
 
Thanks