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
nbknbk 

How to use merge field in FIND method

Hello Everyone,

 

I am using following statement to retreive Logged in User role name from VFP.

 

{!Left($UserRole.Name,(FIND('CEO', $UserRole.Name) - 1))}  -->am able to get the expected value and it is working. but when I pass the merge field in FIND method the vfp shoiwng BLANK.

ex:

{!Left($UserRole.Name,(FIND('{!$Label.testLabel}', $UserRole.Name) - 1))} - How to use custom variable or class variable in Find method..

Do we have any workaround for this or FIND method does'nt accept Merge fields!

 

Thanks,

Balakrishna

 

Best Answer chosen by Admin (Salesforce Developers) 
Puja_mfsiPuja_mfsi

Hi,

You can use merge field in FIND method as:

{!Left($UserRole.Name,(FIND($Label.testLabel, $UserRole.Name) - 1))}   

 

Please let me know if u have any query on same and if this post helps u please throw KUDOS by click on star at left.

All Answers

Puja_mfsiPuja_mfsi

Hi,

You can use merge field in FIND method as:

{!Left($UserRole.Name,(FIND($Label.testLabel, $UserRole.Name) - 1))}   

 

Please let me know if u have any query on same and if this post helps u please throw KUDOS by click on star at left.

This was selected as the best answer
nbknbk

Puja,

 

Thank you very much it is working..