function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AnonTestQuestAnonTestQuest 

How to dynamically append a '%' symbol to a user input number field

I have a percent field where a user can input any number they want. It's a 3.3 percent field. I create a word document for form generation and can reference the API of the field to pull the percent into the form, however, SF only renders out the field as 25.125 for instance, without the % symbol. This field is not always required. I am trying to find a way to append the % sign to the end of the number if that field is populated.

Any ideas? I've been truckin away on this for about 27 hours now.
Amit Chaudhary 8Amit Chaudhary 8
Please check below Post. I hope that will help you
http://amitsalesforce.blogspot.in/2015/04/pagination-using-standardsetcontroller.html

You can create the dynamic Query like below
public PageReference Search()
    {
        String query= '';
        String strFilter = '';
        if(acc.Name != null && (acc.Name ).trim() !='')
        {
           strFilter  = strFilter  +  ' where Name Like \''+acc.Name+'%\'' ;
        }
        if(acc.Phone != null && (acc.Phone).trim() !='' )
        {
           if(strFilter == '')
           { 
               strFilter  = strFilter  +  ' where Phone like \''+acc.Phone+'%\'' ;
           }
           else
           {
               strFilter  = strFilter  +  ' And Phone like \''+acc.Phone+'%\'' ;
           }
        }
        if(strFilter != '')
        {
            query = 'Select name ,id, phone from Account '+strFilter+ ' limit 1000';
            System.debug('Query ---->'+ query );
            con = new ApexPages.StandardSetController(Database.getQueryLocator(query)); 
            con.setPageSize(2);
        }
        else
        {
        }
       return null;
    }
Please let us k now if this will help you

Thanks
Amit Chaudhary

 
AnonTestQuestAnonTestQuest
This is in form generation. The syntax is waaayyy off for this and so the code there is irelavant to my question. An if statement in the correct syntax would look like this:

{{IF=”A"}} {{COND=”A” FIELD="LLC_BI__Loan__c.LLC_BI__InterestRate__c" IS=”*.***”}} {{FIELD="LLC_BI__Loan__c.LLC_BI__InterestRate__c"}} % {{ENDIF}}

It is the IS= section that is throwing errors since it's a picklist not a boolean. I figured maybe there was another way to append that % or use the existing code and replace the wildcard *'s with something SF would recognize as any entry. However, I still get a de-referencing a null value with this.