Forum Discussion

Max's avatar
Max
New Contributor II
2 years ago

Required Query Parameters

Hello, im converting a Mulesoft API to SnapLogic. I have 2 query parameters that are required. In Mulesoft they are specified in the Raml. How do I make these query parameters required in SnapLogic?

 

2 Replies

  • KTsnap's avatar
    KTsnap
    New Contributor III
    Hi Viktor,
    I want to insert new record in the below given array .If suppose there are 4 records under the value array. I want to add the 5th record in the array of value if the another input is  { "src_code" : "Active"}
    
    “value”:
    [
    {
    “color”:null,“default”:false,“description”:null,“isActive”:null,“**label”:“None**”,“urls”:null,“valueName”:“None”
    },
    {
    “color”:null,“default”:false,“description”:null,“isActive”:null,“**label”:“Country**”,“urls”:null,“valueName”:“Country”
    },
    {
    “color”:null,“default”:false,“description”:null,“isActive”:null,“**label”:“Employee”**,“urls”:null,“valueName”:“Employee”
    },
    {
    “color”:null,“default”:false,“description”:null,“isActive”:null,**“label”:“Both”,**“urls”:null,“valueName”:“Both”
    }
    ]
    {
    "src_code":"Active",
    "tgt_code":null
    }
    
    expected Output 
    “value”:
    [
    {
    “color”:null,“default”:false,“description”:null,“isActive”:null,“**label”:“None**”,“urls”:null,“valueName”:“None”
    },
    {
    “color”:null,“default”:false,“description”:null,“isActive”:null,“**label”:“Country**”,“urls”:null,“valueName”:“Country”
    },
    {
    “color”:null,“default”:false,“description”:null,“isActive”:null,“**label”:“Employee”**,“urls”:null,“valueName”:“Employee”
    },
    {
    “color”:null,“default”:false,“description”:null,“isActive”:null,**“label”:“Both”,**“urls”:null,“valueName”:“Both”
    },
    {
    “color”:null,“default”:false,“description”:null,“isActive”:null,**“label”:“Active”,**“urls”:null,“valueName”:“Active”
    }
    ]
    
    
    Please let me know if it is unclear.
    

    type or paste code here

  • KTsnap's avatar
    KTsnap
    New Contributor III

    Yes Viktor. and that object needs to be removed in the output. and the number of input object would be dynamic.
    {
    “src_code”: “Active”,
    “tgt_code”: null
    }