Discussions

Template for Field Names to Jinja

  • 1.  Template for Field Names to Jinja

    Posted 08-17-2021 12:28
    Does anyone know of a template for converting the field names in a table to the correct jinja format?

    e.g. Field ID 7: Order Submitted By will convert to order_submitted_by

    I have tried to use a formula field and inputted some common conversions I have seen, but I doubt it is even half of it:

    var text idsCheck = SearchAndReplace([Label], "IDs","i_ds");
    var text low = Lower($idscheck);
    var text nospace = SearchAndReplace($low, " ","_");

    var text aa = SearchAndReplace($nospace,"-","_");
    var text ab = SearchAndReplace($aa,"/","_");
    var text ac = SearchAndReplace($ab,"_%","");
    var text ad = SearchAndReplace($ac,"_#","");
    var text ae = SearchAndReplace($ad,"?","");


    ------------------------------
    Sean Connaughton
    ------------------------------