Skip to main content
Answer

Unable to pass variable in rest web service post method.

  • November 4, 2024
  • 6 replies
  • 160 views

Forum|alt.badge.img+3

Results not getting updated while pass the values using variable in Api post method.

 

{ "values":

{ "Work Log Type":"Customer Communication",

"Detailed Description":"$detaildescrption$",

"Work Log Submitter":"MFDM",

"Incident Number":"$vIncidentId$"

}

}

Best answer by Tamil Arasu10

Hi @Ajith 9655,

Please check the Headers details 

Add any necessary headers (e.g., Content-Type: application/json)

Paste your JSON payload in the body section

{
  "values": {
    "Work Log Type": "Customer Communication",
    "Detailed Description": "$detaildescrption$",
    "Work Log Submitter": "MFDM",
    "Incident Number": "$vIncidentId$"
  }
}

I hope this will works for you.

This topic has been closed for replies.

6 replies

Tamil Arasu10
Most Valuable Pathfinder
Forum|alt.badge.img+18
  • Most Valuable Pathfinder
  • November 4, 2024

Hi @Ajith 9655,

Is there any error popup’s ? 

Add the message box before post the data and verify the data if is correct format or not


Forum|alt.badge.img+3
  • Author
  • Cadet | Tier 2
  • November 6, 2024

Hi @Tamil Arasu10 , We didn’t get any popups. If we hardcoded it works, but not working by passing as parameter.


Tamil Arasu10
Most Valuable Pathfinder
Forum|alt.badge.img+18
  • Most Valuable Pathfinder
  • Answer
  • November 6, 2024

Hi @Ajith 9655,

Please check the Headers details 

Add any necessary headers (e.g., Content-Type: application/json)

Paste your JSON payload in the body section

{
  "values": {
    "Work Log Type": "Customer Communication",
    "Detailed Description": "$detaildescrption$",
    "Work Log Submitter": "MFDM",
    "Incident Number": "$vIncidentId$"
  }
}

I hope this will works for you.


Shreya.Kumar
Pathfinder Community Team
Forum|alt.badge.img+14
  • Pathfinder Community Team
  • December 17, 2024

@Ajith 9655 did this solution work for you?

Hi @Ajith 9655,

Please check the Headers details 

Add any necessary headers (e.g., Content-Type: application/json)

Paste your JSON payload in the body section

{
  "values": {
    "Work Log Type": "Customer Communication",
    "Detailed Description": "$detaildescrption$",
    "Work Log Submitter": "MFDM",
    "Incident Number": "$vIncidentId$"
  }
}

I hope this will works for you.

 


Forum|alt.badge.img+3
  • Author
  • Cadet | Tier 2
  • December 27, 2024

@Shreya.Kumar , yes it worked

 


Shreya.Kumar
Pathfinder Community Team
Forum|alt.badge.img+14
  • Pathfinder Community Team
  • January 3, 2025

@Shreya.Kumar , yes it worked

 

Great! Closing this thread as it is resolved!