Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
Expand all | Collapse all

How to use Substring Function in the condition field of Maximo JSON Mapping Application

  • 1.  How to use Substring Function in the condition field of Maximo JSON Mapping Application

    Posted Mon February 05, 2024 01:34 PM

    How to use Substring Function in the condition field of Maximo JSON Mapping Application.

    Suppose if the ABC field is having more than 7 characters it needs to be truncated in 4 characters during the json data processing.



    ------------------------------
    souvik dutta
    ------------------------------


  • 2.  RE: How to use Substring Function in the condition field of Maximo JSON Mapping Application

    Posted Tue February 06, 2024 04:48 AM
    Edited by Sankar Ganesh V S Tue February 06, 2024 04:53 AM

    JSON Mapping is javascript supported and can use text formatting functions.

    $.jsonField.stringFunction()

    Example:

    $.assetNumber.substring(0,5)

    For your requirement, Add Mapping condition like below

    Condition: $.abcField.length>7

    Value: $.abcField.substring(0,4)

    Thanks!

    ------------------------------
    Sankar Ganesh
    ------------------------------