JSONPathReplace
4 min
uses a json path query to replace a value within a json document syntax jsonpathreplace(textvalue, path, replacewith) enabled for for a description of the business object categories, see notes on "enabled for" docid\ u26v9fecfs6ilwa0 pvjd business object category yes/no business rules before save rules yes business rules calculation rules (after save, with or without also recalculate on load) yes1 business rules calculation rules (before save or always, without also recalculate on load) yes business rules calculation rules (before save or always, with recalculate on load) yes1 business rules editing rules yes2 business rules initialization rules yes business rules read only rules no business rules required rules yes2 business rules validation rules yes client expressions no object permissions no services no ldap no mobile no quick actions (except ui quick actions) yes ui quick actions no reports yes search/dashboard without field references no search/dashboard with field references no 1 not fully supported in calculation rules that have a condition of after save or the also recalculate on load option selected it may fail if the rule's field is used in a grid, form, or saved search 2 except when this field appears on a form or is triggered by such a field parameters parameter description textvalue input json document path json path replacewith value to replace in json document return value returns a json document updated with replace with value example $(jsonpathreplace('{store" {"book" \[{"category" "reference","author" "nigel rees","title" "sayings of the century","price" 8 95},{"category" "fiction","author" "evelyn waugh","title" "sword of honour","price" 12 99},{"category" "fiction","author" "herman melville","title" "moby dick","isbn" "0 553 21311 3","price" 8 99},{"category" "fiction","author" "j r r tolkien","title" "the lord of the rings","isbn" "0 395 19395 8","price" 22 99}],"bicycle" {"color" "red","price" 19 95,"used" "true","returndate" "2012 04 23t18 25 43 5111z"}}}', "$ store bicycle price", 10 15)) returns this value {store" {"book" \[{"category" "reference","author" "nigel rees","title" "sayings of the century","price" 8 95},{"category" "fiction","author" "evelyn waugh","title" "sword of honour","price" 12 99},{"category" "fiction","author" "herman melville","title" "moby dick","isbn" "0 553 21311 3","price" 8 99},{"category" "fiction","author" "j r r tolkien","title" "the lord of the rings","isbn" "0 395 19395 8","price" 22 99}],"bicycle" {"color" "red","price" 19 95,"used" "true","returndate" "2012 04 23t18 25 43 5111z"}}}"
