JSON Multiple values

Hi All,

I want to update multiple values in single JSON field.

I have created json templace which i am replacing with dynamic values. Please let me know if the replace jsonQuoteBody.Replace(“##QUOTENUMBER##,##DISCREPENCY##”,jsonQuoteResponseData(“Quote_Order_form_Discrepancies__c”).ToString).ToString is correct?


image

2 Likes

@marina.dutta,

As you have fixed template for this, string manipulation will be the best option.

Thanks,
Ashok :slight_smile:

1 Like

@ashokkarale

Is the replace activity correct which I have used ?

1 Like

@marina.dutta ,

Replace like this.

jsonQuoteBody.Replace("##QUOTENUMBER##",strQuoteNoVariable).Replace("##DISCRIPENCY##",strdescripencyVariable)

image

Thanks,
Ashok :slight_smile:

1 Like

@ashokkarale

let me try.

2 Likes

Hi,

Whatever you are passing should work…

Thanks

1 Like

@ashokkarale

My output should be


however I am getting as below

1 Like

@marina.dutta,

What’s the vAlues of the variables you are replacing the default values with?

1 Like

@ashokkarale

Actually my use case is

I have two columns Quote Number and Mismatched Data. The bot should pick both the column values and updated in Salesforce Column “Quote_Order_form_Discrepancies__c”

1 Like

You were looking for replacing the two placeholders with actual values right?
jsonQuoteBody.Replace("##QUOTENUMBER##",strQuoteNoVariable).Replace("##DISCRIPENCY##",strdescripencyVariable)

Is this working?

@ashokkarale

Discrepency is nothing but values from mismatched Data Column. Here Mismatched data column value i am replacing. Problem is mismatched Data contains sometimes single value and sometimes values separated by comma. How to map that