sugar logic function: strReplace()

Hello there,

anybody please help with the strReplace?

I want to replace two characters inside a word: " " and "-" via Studio-->module--->fields---->edit formula(using logic function).

But when I write:  strReplace([" ","-"],"",$field)  it doesn't work....

How can I do that, please?

One more thing, if I will repeatably use one calculated result, can I create a variable there? Like this: 

$t = strReplace(" ","",$field)

strlen($t)

it looks like, I will get error...

Thanks in advance for any help!

Parents Reply
  • Sophie,

    DevClub is a forum for developers that develop Sugar's new functionality or customize the current one with code developments - with JS and PHP.

    AFAIK Sugar Logic is not a developer's language however as for me it looks like a programming language.
    From my non-developers perspective, it is a special format for setting up formulas for Calculated fields (which are read-only fields in SUgar)

    But the main challenge is that, if I understood Andre correctly, is that out-of-the-box Sugar Logic cannot be used to solve your task, and Andre suggests extending SUgar with a new Sugar Logic function so that you could employ it then

    Cloud instance is not an obstacle for SUgar development, therefore, if you are not a developer, you may hire a developer to extend Sugar first - if you decide to follow this way.

    But if you prefer not to develop SUgar, you may clear out data in Excel yourself then activate validation to keep phones data clear in the future.
    Once the data is cleared in your CRM, you might be in a position to perform filtering via API endpoints without additional  on-the-fly data transformations that may affect performance

    Best Regards,
    Dmytro Chupylka

    integroscrm.com
    We make work in Sugar CRM system faster, more convenient and efficient

Children
No Data