You need to sign in to do that
Don't have an account?
Lauren B
PageBlock Title attribute based on condition
Hi,
I'd like to have the title attribute of pageblock tag based on a condition, that is something like this (not working so):
How could I do?
I'd like to have the title attribute of pageblock tag based on a condition, that is something like this (not working so):
<apex:pageBlock title= "{(!IF (!ca.GROUP_ENROLL_STARTD__c = 99999999 && ca.GROUP_ENROLL_ENDD__c != 99999999 ) 'Test Types', '')}"So I would have the title of this pageblock to be Test Types depending on the value of the both fields (If one field is equal to that value and another is not. Both fields are date field.
How could I do?
I guess you have missed a comma in the syntax while building the formula and could be the reason its not working, try modifying like below and check:
Hope above information helps. Please mark as Best Answer so that it can help others in future.
Thanks.
Thank you for your reply. This is the error I'm getting- Incorrect parameter type for function 'not()'. Expected Boolean, received Date. How to resolve this, please let me know. My requirement is - if start date is equal to that value and end end is not then title should be ' Test Types'. If we have to give date then how shall I give?
Thanks for sharing more details about the error.
Can you please let me know what is the value 99999999 being used for comparison? Can you try using a valid format instead and check?
Here are some examples with date field in the formula:
https://help.salesforce.com/articleView?id=sf.formula_examples_dates.htm&type=5
Hope above information helps. Please mark as Best Answer so that it can help others in future.
Thanks.
Thank you for your prompt reply. If I have to compare 09/09/1999 in the above code then what will be the format. Both are date fields.
One question just asking out of my curiosity- In date field if we have to compare number then how will we do that. Thank you so much. Plese help.