Paas variable in text file

Hi ,

I have a text file attached.
Request.JSON (150 Bytes)

I have two variables as below:
dealID
quoteNumber

In the text file Instead of “70165774” i want to replace variable dealID
and Instead of “4744448627” i want to replace variable quoteNumber

Please help me

Hi @shruthi_arali

Please check the below flow:
Sequence5.xaml (9.4 KB)

Output: Considered some values in the variables.

Regards

Hi @shruthi_arali

Use Read text file activity to read the data and store it in a variable : json_Text

jsonText = jsonText.Replace("""dealId"": 70165774", """dealId"": " & dealID.ToString())
jsonText = jsonText.Replace("""quoteId"": 4744448627", """quoteId"": " & quoteNumber.ToString())

Use write text file activity to write the data into the text file

Hi @shruthi_arali

I have attached the xaml please check that and I the variables can be seen in the variable panel and I have given the value in the variable panel.

Regards

As it is JSON we would recommend to work on this task by using JSON oriented approaches

grafik
out: myJObject

In:
grafik

Updates (we can do within assign activities)
grafik

Result:
grafik