sugar logic function--text clean

Hello there,

anybody please help with the text clean?

I want to replace several characters inside a number: " ", "-",".", etc. via Studio-->module--->fields---->edit formula(using logic function).

But it seems that I can only replace one character by one time...

The I come across with a question:

what if there're many other characters I want to remove, I just want to keep numbers, then how I can do that?

Any list of sugar logic function formula that I can refer to? I couldn't find one...

Thanks in advance for any help!

Parents Reply Children
  • Hello


    What will you do with two fields in CRM - the original text and calculated value?
    To clear out 30K contacts phones (eliminate all the symbols but numbers) you may do the following:

    1. Goto Reports and create new Raws&Columns report for module Contacts
    2. Select fields ID and all the phones fields you like to clear out from unnecessary symbols
    like this:


    3. Save and Run the Report

    You should get the list of all 30K contacts with phones

    4.Select Export in the menu

    You should get a Report.csv file downloaded.

    5. Open the Report.csv file in Excel and use Text to Columns to split the text into ID and phones columns

    6. Remove unnecessary symbols with Replace

    7. When done with formatting phones in Excel, save file as csv



    8. Navigate Sugar, and perform Contacts import


    9. When Import is performed, you should have phones cleared from unnecessary symbols in Sugar

    After the data is cleared out, I'd suggest deploying a validation configuration, that my teammate Anastasia has configured for you with Logic Builder:
    https://sugarclub.sugarcrm.com/dev-club/f/questions-answers/4795/api-filter-by-phone-number/23634#23634 

    That might help to prevent cleanings in future

    I hope this helps
    If you have any questions or need help, please feel free to drop me a message

    Best Regards,
    Dmytro Chupylka

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