I have created the below-pasted formula to SUM the numeric picklist values and the compiled size is 6,217 characters to a maximum of 5000. How can I rectify?  IF(ISPICKVAL(CR_Form__c, ""), 0, VALUE(TEXT(CR_Form__c)))+  IF(ISPICKVAL(CR_Contract_Language__c, ""), 0, VALUE(TEXT(CR_Contract_Language__c)))+  IF(ISPICKVAL(CR_License_Grant__c, ""), 0, VALUE(TEXT(CR_License_Grant__c)))+  IF(ISPICKVAL(CR_Content_Options__c, ""), 0, VALUE(TEXT(CR_Content_Options__c)))+  IF(ISPICKVAL(CR_Exclusivity__c, ""), 0, VALUE(TEXT(CR_Exclusivity__c)))+  IF(ISPICKVAL(CR_Term__c, ""), 0, VALUE(TEXT(CR_Term__c)))+  IF(ISPICKVAL(CR_Termination__c, ""), 0, VALUE(TEXT(CR_Termination__c)))+  IF(ISPICKVAL(CR_Pricing_for_Multiyear__c, ""), 0, VALUE(TEXT(CR_Pricing_for_Multiyear__c)))+  IF(ISPICKVAL(CR_Payment_Terms__c, ""), 0, VALUE(TEXT(CR_Payment_Terms__c)))+  IF(ISPICKVAL(CR_Invoicing__c, ""), 0, VALUE(TEXT(CR_Invoicing__c)))+  IF(ISPICKVAL(CR_Service_Level_Agreement__c, ""), 0, VALUE(TEXT(CR_Service_Level_Agreement__c)))+  IF(ISPICKVAL(CR_Rep_Warranty__c, ""), 0, VALUE(TEXT(CR_Rep_Warranty__c)))+  IF(ISPICKVAL(CR_Limitation_of_Liability__c, ""), 0, VALUE(TEXT(CR_Limitation_of_Liability__c)))+  IF(ISPICKVAL(CR_Indemnity_Hold_Harmless__c, ""), 0, VALUE(TEXT(CR_Indemnity_Hold_Harmless__c)))+  IF(ISPICKVAL(CR_Assignment__c, ""), 0, VALUE(TEXT(CR_Assignment__c)))+  IF(ISPICKVAL(CR_Code_App_Ownership__c, ""), 0, VALUE(TEXT(CR_Code_App_Ownership__c)))+  IF(ISPICKVAL(CR_Data_Ownership_if_SVU__c, ""), 0, VALUE(TEXT(CR_Data_Ownership_if_SVU__c)))+  IF(ISPICKVAL(CR_Change_of_Control__c, ""), 0, VALUE(TEXT(CR_Change_of_Control__c)))+  IF(ISPICKVAL(CR_Choice_of_Law_Venue__c, ""), 0, VALUE(TEXT(CR_Choice_of_Law_Venue__c)))+  IF(ISPICKVAL(CR_Insurance_Obligations__c, ""), 0, VALUE(TEXT(CR_Insurance_Obligations__c)))
122215
I have created the above formula to accomplish a sum of 20 number value picklists and it came out to 6,233 characters. As you all know, the compile limit is 5000. What can I do to circumvent this?  IF(ISPICKVAL(Contract_Rating_Form__c, ""), 0, VALUE(TEXT(Contract_Rating_Form__c)))+  IF(ISPICKVAL(Contract_Rating_Contract_Language__c, ""), 0, VALUE(TEXT(Contract_Rating_Contract_Language__c)))+  IF(ISPICKVAL(Contract_Rating_License_Grant__c, ""), 0, VALUE(TEXT(Contract_Rating_License_Grant__c)))+  IF(ISPICKVAL(Contract_Rating_Content_Options__c, ""), 0, VALUE(TEXT(Contract_Rating_Content_Options__c)))+  IF(ISPICKVAL(Contract_Rating_Exclusivity__c, ""), 0, VALUE(TEXT(Contract_Rating_Exclusivity__c)))+  IF(ISPICKVAL(Contract_Rating_Term__c, ""), 0, VALUE(TEXT(Contract_Rating_Term__c)))+  IF(ISPICKVAL(Contract_Rating_Termination__c, ""), 0, VALUE(TEXT(Contract_Rating_Termination__c)))+  IF(ISPICKVAL(Contract_Rating_Pricing_for_Multiyear__c, ""), 0, VALUE(TEXT(Contract_Rating_Pricing_for_Multiyear__c)))+  IF(ISPICKVAL(Contract_Rating_Payment_Terms__c, ""), 0, VALUE(TEXT(Contract_Rating_Payment_Terms__c)))+  IF(ISPICKVAL(Contract_Rating_Invoicing__c, ""), 0, VALUE(TEXT(Contract_Rating_Invoicing__c)))+  IF(ISPICKVAL(Contract_Rating_Service_Level_Agreement__c, ""), 0, VALUE(TEXT(Contract_Rating_Service_Level_Agreement__c)))+  IF(ISPICKVAL(Contract_Rating_Rep_Warranty__c, ""), 0, VALUE(TEXT(Contract_Rating_Rep_Warranty__c)))+  IF(ISPICKVAL(Contract_Rating_Limitation_of_Liability__c, ""), 0, VALUE(TEXT(Contract_Rating_Limitation_of_Liability__c)))+  IF(ISPICKVAL(Contract_Rating_Indemnity_Hold_Harmless__c, ""), 0, VALUE(TEXT(Contract_Rating_Indemnity_Hold_Harmless__c)))+  IF(ISPICKVAL(Contract_Rating_Assignment__c, ""), 0, VALUE(TEXT(Contract_Rating_Assignment__c)))+  IF(ISPICKVAL(Contract_Rating_Code_App_Ownership__c, ""), 0, VALUE(TEXT(Contract_Rating_Code_App_Ownership__c)))+  IF(ISPICKVAL(Contract_Rating_Data_Ownership_if_SVU__c, ""), 0, VALUE(TEXT(Contract_Rating_Data_Ownership_if_SVU__c)))+  IF(ISPICKVAL(Contract_Rating_Change_of_Control__c, ""), 0, VALUE(TEXT(Contract_Rating_Change_of_Control__c)))+  IF(ISPICKVAL(Contract_Rating_Choice_of_Law_Venue__c, ""), 0, VALUE(TEXT(Contract_Rating_Choice_of_Law_Venue__c)))+  IF(ISPICKVAL(Contract_Rating_Insurance_Obligations__c, ""), 0, VALUE(TEXT(Contract_Rating_Insurance_Obligations__c)))    Thank you.
45046
I've started a new job and it involves looking at a bunch of big numbers. Is there an easy way to add commas to an int or decimal field to make it readable?  For example, SQL Server outputs the column on the left, but for my own sanity, I need it to look like the one on the right:  2036150 -&gt; 2,036,150     ...or would I have to write some heinous   left(right(vandalized_data),6),3) + ',' + right(left(vandalized_data),6),3)   function?  The perfect thing would be commas in the display grid, then plain integers in the output.
9202
The below is a part of a formula that i wrote, everything is working fine, except for the below.  My need is, if the " Renewal Month" field ( which is a month picklist field with values as January, february etc). If the month choosen is, less than the current month , it will satisfy certain crtiteria which is working perfect. But if the choosen month is greater than the current month ( i.e i choose : December" but the current month is " November"), where I am getting issue. Then the task date created would be 1/11/2016 i.e current year and minus one month from choosen month ( i.e December).  I wrote it as:  DATE(YEAR(TODAY()), MONTH(TODAY())-1, 1))   But as month is today i have taken, so its giving value as 1/10/2016 , so rather than december taking as november ) today month. So, i changed it as per below , but its showing me syntax error. can anyone plz rectify my below formula. thnx     MONTH(TODAY())-1 To:-   CASE( [Lead].Renewal_Month__c, "January",1, "February",2, "March",3,   "April",4, "May",5, "June", 6, "July", 7, "August", 8, "September",9,    "October", 10, "November", 11, "December", 12,NULL) - 1
35230
\documentclass{cta-author}  \newtheorem{theorem}{Theorem}{} \newtheorem{corollary}{Corollary}{} \newtheorem{remark}{Remark}{} \usepackage{blindtext} \usepackage{enumitem} \usepackage{array} \usepackage{mathrsfs} \usepackage{amsfonts} \usepackage{bm} \usepackage{tabularx} \usepackage{multirow} \usepackage{amsmath} \usepackage{graphicx} \usepackage{float} \usepackage{makecell} \usepackage{adjustbox} \usepackage{textcmds} \usepackage{lineno} \usepackage{rotating}  \begin{document}   \begin{table*}[t] \renewcommand{\arraystretch}{1} \caption{C at PCC} \label{Table1} \centering \begin{tabular}{c|c|c|c|c|c|c|c|c}  \hline \hline  Standards &amp;\multicolumn{2}{c}{IEEE 2014}&amp; \multicolumn{2}{|c}{IEEE 2018}&amp; \multicolumn{2}{|c}{IEC 27} &amp;\multicolumn{2}{|c}{EN61-2}\\ \cline{2-4}  \end{tabular} \end{table*}    \end{document}   I use this code to generate table but is showing an error as given below. While I give \hline instead of \cline{-} it is working properly. But I need to use that \cline.
76384
I have a trigger where i am assigning ID to a cusotm field like below -   D.customfield__c = acc.Id;   The ID is coming as 00P28000000EwpjEA0  But i need only 00P28000000Ewpj 15 char. Is there is a way to use substring in apex trigger. I can't use formula field.
101952
I'm trying to generate a table inside which numbers are to be inserted as shown in the figure.
84387
Trying to figure out how to best implement this. Background:  Have a current formula field that captures if a picklist value is X for any of the picklists show X in the formula.  There is a coded backend calculator that houses the proper tier order.  For example, if someone selects "Happy" on the picklists, it's the top tier value so the field would "Happy" versus "Silly".  Consider this formula field's structure as the order (tier).  I need to add in two checkboxes to this formula field.  Checkbox1 indicates that if someone selects "Happy" and the checkbox is checked, the formula field shows "Unhappy".  If checkbox2 is checked, it overrides the checkbox1 behavior to show "Happy" include (nullifying the "Unhappy" result).  I need to have an override function.  But I cannot manage to figure this one out.  Any thoughts???      IF( OR( AND( Checkbox1__c = TRUE, Checkbox2__c = TRUE, RecordType.DeveloperName = 'XXX' ), ISPICKVAL(Picklist1__c, "Happy"),  ISPICKVAL(Picklist2__c, "Happy"),  ISPICKVAL(Picklist3__c, "Happy"),  ISPICKVAL(Picklist4__c, "Happy"),  ISPICKVAL(Picklist5__c, "Happy") ) 'Happy', 'Not Happy' ),  IF( OR( AND( Checkbox1__c = TRUE, Checkbox2__c = TRUE, RecordType.DeveloperName = 'XXX' ), ISPICKVAL(Picklist1__c, "Silly"),  ISPICKVAL(Picklist2__c, "Silly"),  ISPICKVAL(Picklist3__c, "Silly"),  ISPICKVAL(Picklist4__c, "Silly"),  ISPICKVAL(Picklist5__c, "Silly") ) 'Silly', 'Not Silly' ),  IF( OR( AND( Checkbox1__c = TRUE, Checkbox2__c = TRUE, RecordType.DeveloperName = 'XXX' ), ISPICKVAL(Picklist1__c, "Sad"),  ISPICKVAL(Picklist2__c, "Sad"),  ISPICKVAL(Picklist3__c, "Sad"),  ISPICKVAL(Picklist4__c, "Sad"),  ISPICKVAL(Picklist5__c, "Sad") ) 'Sad', 'Not Sad' ),  IF( OR( AND( Checkbox1__c = TRUE, Checkbox2__c = TRUE, RecordType.DeveloperName = 'XXX' ), ISPICKVAL(Picklist1__c, "Angry"),  ISPICKVAL(Picklist2__c, "Angry"),  ISPICKVAL(Picklist3__c, "Angry"),  ISPICKVAL(Picklist4__c, "Angry"),  ISPICKVAL(Picklist5__c, "Angry") ) 'Angry', 'Not Angry' )
49083
I'm trying to add only "odd" numbers from a range(named "data") which contains numbers, blank cells and text. No matter what I try I always seem to end up with a #value error. My latest attempt is as follows:  =SUMPRODUCT(N(MOD(Data,2)=1),Data) Any suggestions?
79624
Each  has a compiled cost that contributes towards the  compiled character formula limit.  What are the current compiled costs associated with each formula function?
19215
\documentclass[12pt,a4paper]{exam} \renewcommand{\baselinestretch}{1.2} \oddsidemargin 0in \evensidemargin 0in \topmargin 0in \textheight 9.2in \textwidth 6.5in %\hoffset -1in %\voffset -1in %\evensidemargin 14pt \usepackage{amsmath,amsthm,amsfonts,amssymb,dsfont} \pagestyle{headandfoot} \extraheadheight{.5in} \lhead[]{} \chead[ \vskip .1in  MATHEMATICS\\ STANDARD X(CBSE)\\       %\hrule     \textbf{PAIR OF LINEAR EQUATIONS IN TWO VARIABLES} \linebreak        \textbf{Time: 1 Hour}   \hskip 1.3in  \textsf{ }        \hfill{\textbf{Max. Marks:30}}\vskip.05in \vskip -.5in]{} \rhead[]{} \lfoot{David 7502878908} \cfoot{HOME TUITIONS} \rfoot{\iflastpage{$\maltese\maltese\maltese \maltese \maltese$}{Continued...\ldots}} \pointsinrightmargin \newcommand{\ntt}{\normalfont\ttfamily} %    command name \newcommand{\cn}[1]{{\protect\ntt\bslash#1}} \hfuzz1pc % Don't bother to report overfull boxes if overage is &lt; 1pc  \newcommand{\thmref}[1]{Theorem~\ref{#1}} \newcommand{\secref}[1]{\S\ref{#1}} \newcommand{\lemref}[1]{Lemma~\ref{#1}} %\newcommand{\bysame}{\mbox{\rule{3em}{.4pt}}\,} \newcommand{\sqt}[1]{\sqrt{\smash[b] {#1}}}  %    \interval is used to provide better spacing after a [ that %    is used as a closing delimiter. \newcommand{\interval}[1]{\mathinner{#1}}  %    Notation for an expression evaluated at a particular condition. The %    optional argument can be used to override automatic sizing of the %    right vert bar, e.g. \eval[\biggr]{...}_{...} \newcommand{\eval}[2][\right]{\relax   \ifx#1\right\relax \left.\fi#2#1\rvert}  %    Enclose the argument in vert-bar delimiters: \newcommand{\envert}[1]{\left\lvert#1\right\rvert} \let\abs=\envert  %    Enclose the argument in double-vert-bar delimiters: \newcommand{\enVert}[1]{\left\lVert#1\right\rVert} \let\norm=\enVert \newcommand{\pad}[2]{\frac{\der #1}{\der #2}} \newcommand{\IC}{{\mathbb C}} \newcommand{\IN}{{\mathbb N}} \newcommand{\IR}{{\mathbb R}} \newcommand{\gol}{\mbox{$\,${\rm Log}$\,$}} \newcommand{\Log}{\ln} \newcommand{\ov}[1]{\overline{\smash[b] {#1}}} \newcommand{\Ndash}{\nobreakdash--} \newcommand{\IE}{{\mathds{R}^n}} \newcommand{\IF}{{\mathds{R}^m}} \begin{document}  \hrule   \vskip .1cm {\hskip 2.5in \textbf{Part A} \hfill{}}   \underline{Answer all the questions:}   \begin{questions}  \question Which subject you like very much?  \choice mathematics \choice physics \cchoice chemisty %cchoice means that correct choice \choic biology   \end{questions} \cfoot{$\maltese\maltese\maltese \maltese \maltese$} \rfoot{} \end{document}   I need these commands in my questions with the following alignments..that is the output should be like this.  1.Which subject you like very much?  (a) mathematics                      (b) physics (c) chemistry                        (d) biology   What should i do for this.. and if the choices are lengthy it has to be aligned automatically...kindly help me...
35095
Is there a way to convert a number to a string (Apex code, formula field ..)  For example: 5200 > cinq milles deux cents
52724
In my table, in order to have texts centered in each cell, I am using  \newcolumntype{P}[1]{&gt;{\centering\arraybackslash}p{#1}}    and instead of a simple p{1.5cm}, I am using   &gt;{\centering\arraybackslash}p{1.5cm}    I am also using \toprule, \midrule, and \bottomrule along with \usepackage{booktabs}.  My code is the following:  \documentclass[12pt]{article}    \newcolumntype{P}[1]{&gt;{\centering\arraybackslash}p{#1}} \usepackage{multicol} \usepackage{multirow} \usepackage{booktabs}   \begin{document}   \begin{table}[h] \centering \begin{tabular}{| &gt;{\centering\arraybackslash}p{1.5cm} | &gt;{\centering\arraybackslash}p{1.2cm} | &gt;{\centering\arraybackslash}p{1.2cm} |  &gt;{\centering\arraybackslash}p{1.2cm} | &gt;{\centering\arraybackslash}p{1.2cm} |&gt;{\centering\arraybackslash}p{1.2cm} | &gt;{\centering\arraybackslash}p{1.2cm} | &gt;{\centering\arraybackslash}p{1.2cm} | &gt;{\centering\arraybackslash}p{1.2cm}|} \toprule \multirow{2}{*}{} &amp; \multicolumn{4}{c|}{Payoffs} &amp;  \multicolumn{4}{c}{ROR} \\ \cline{2-9}  &amp; $\theta =1$ &amp; $\theta =2$ &amp; $E(P)$ &amp; $\sigma(P)$ &amp; $\theta =1$ &amp; $\theta =2$ &amp; $E(r)$ &amp; $\sigma(r)$ \\ \midrule Asset 1 &amp; 110 &amp; 95 &amp;   &amp;   &amp;   &amp;   &amp;   &amp;   \\ Asset 2 &amp; 105 &amp; 90 &amp;   &amp;   &amp;   &amp;   &amp;   &amp;   \\ Asset 3 &amp; 120 &amp; 90 &amp;   &amp;   &amp;   &amp;   &amp;   &amp;   \\ \bottomrule \end{tabular} \end{table}    \end{document}    And my result looks very strange like this:    First, the far right vertical line is short; the first row is not closed on the right.  Second, all the vertical lines are cut.  Any thoughts?
104137
H|~^20200425|~^abcd|~^sum R|~^abc|~^2019-03-06T12:33:52.27|~^1000123.34567|~^2018-04-12T12:33:52.27| R|~^abc|~^2019-03-05T12:33:52.27|~^111930.02876|~^2018-10-23T12:33:52.27| R|~^abc|~^2019-03-05T12:33:52.27|~^2112320.028|~^2018-10-24T12:33:52.27| R|~^abc|~^2019-03-06T12:33:52.27|~^12230.0809|~^2018-09-11T12:33:52.27| R|~^abc|~^2019-03-05T12:33:52.27|~^3076543789.00878|~^2018-08-05T12:33:52.27| R|~^abc|~^2019-03-06T12:33:52.27|~^156655.0389|~^2018-10-23T12:33:52.27| R|~^abc|~^2019-03-06T12:33:52.27|~^10453.0489|~^2018-04-08T12:33:52.27| R|~^abc|~^2019-03-05T12:33:52.27|~^20654.0907|~^2018-07-23T12:33:52.27|   I need to get the sum of the total amounts in the 4th field for the record starts from 'R'. I wanted sum of amounts of all the rows to be stored in a variable. how to achieve it
106174
Some material I'm creating requires output that looks like this:  (note the position of the arrows).    I'm using the following code (with the AMS macros) to generate this, and I'm looking for comments - it works fine, but I'm curious if there's a better/cleaner way to deal with the arrows:  \[   \begin{bmatrix}[rrr|r] 1 &amp; 2 &amp; 0 &amp; -1 \\ 2 &amp; 1 &amp; 1 &amp; 1 \\ -1 &amp; 1 &amp; -1 &amp; -1   \end{bmatrix}   \begin{matrix}[c] ~ \\ \xrightarrow{R_2-2R_1} \\ \xrightarrow{R_3+R_1} \end{matrix}   \begin{bmatrix}[rrr|r] 1 &amp; 2 &amp; 0 &amp; -1 \\ 0 &amp; -3 &amp; 1 &amp; 3 \\ 0 &amp; 3 &amp; -1 &amp; -2 \end{bmatrix}   \begin{matrix}[c] ~ \\ ~ \\ \xrightarrow{R_2+R_3} \end{matrix}   \begin{bmatrix}[rrr|r] 1 &amp; 2 &amp; 0 &amp; -1 \\ 0 &amp; -3 &amp; 1 &amp; 3 \\ 0 &amp; 0 &amp; 0 &amp; 1 \end{bmatrix} \]   I'm using only the standard AMS macros, together with a cute addition to the matrix macros that I found on the Web that allows column specifications within the AMS matrices:  \makeatletter \renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%   \hskip -\arraycolsep   \let\@ifnextchar\new@ifnextchar   \array{#1}} \makeatother
11350
Is there any function in Apex which could emulate functionality of the  formula function? I'm trying to get 18-char Id variant from the standard one.
41498
I am writing my CV using the moderncv package. I already have adjusted the CV to meet my needs. Therefore I amplified the maximum number of parameters possible in the \cventry command. However, now I have some ugly spacing in case I do NOT use all parameters (see second \cventry in the MWE for illustration):  Any suggestions to make the spacing collapse in case not all parameters are occupied? As you can see from the MWE I already have adjusted for \ifthenelse command. I use texlive 2014.  \documentclass[11pt,a4paper,sans]{moderncv} \moderncvstyle{banking} \moderncvcolor{blue} \usepackage[scale=0.7]{geometry} \name{John}{Doe} \title{Resume title} \address{street and number}{postcode city}{country} \phone[mobile]{+1~(234)~567~890}  \renewcommand*{\cventry}[9][.4em]{%  \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}%  \ifthenelse{\equal{\bfseries #4}{}}{}{{\bfseries #4}} &amp; \ifthenelse{\equal{\bfseries #5}{}}{}{{\bfseries #5}} \\%   \ifthenelse{\equal{\itshape #3}{}}{}{{\itshape #3\ifthenelse{\equal{#6}{}}{}{, #6}}} &amp; \ifthenelse{\equal{\itshape #2}{}}{}{{\itshape #2}}\\%  \ifthenelse{\equal{#7}{}}{}{{#7}} &amp; \ifthenelse{\equal{#8}{}}{}{\\ {#8} &amp; \\}% \end{tabular*}%  }  \begin{document} \makecvtitle \section{Education} \cventry{Grade}{Degree}{Institution}{year--year}{M.Sc.}{Majors}{Majors}{} \cventry{}{Degree}{Institution}{City}{}{}{}{} \cventry{year--year}{Degree}{Institution}{City}{Grade}{Majors}{Majors}{} \end{document}
96449
I am trying to create a formula that will put a 1 in a hidden field if the value of a picklist is equal to a specific value.  I keep getting stuck here and I can't figure out what I am missing?  IF(ISPICKVAL( Examiner_Type__c ="Pending Examiner Status","1","",))