# Conditionally update one field based on the value of another

**URL:** <https://community.postman.com/t/conditionally-update-one-field-based-on-the-value-of-another/57155>\
**Category:** Help Hub\
**Tags:** variables\
**Created:** [February 1, 2024, 12:13am UTC](https://community.postman.com/t/conditionally-update-one-field-based-on-the-value-of-another/57155 "2024-02-01T00:13:22Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![keith1990](https://avatars.discourse-cdn.com/v4/letter/k/ad7895/32.png) [@keith1990](https://community.postman.com/u/keith1990)\
**Post date:** [February 2, 2024, 1:57am UTC](https://community.postman.com/t/conditionally-update-one-field-based-on-the-value-of-another/57155/3 "2024-02-02T01:57:45Z")

</div>

Thank you so much @gbadebo-bello - You got me off to a great start. Still lots to learn but I got this conditional update working using collection variables.

This following thread was very helpful too, if anyone else is in my situation:

> [@How to store a JSON in a variable and use it in the request body?](https://community.postman.com/t/how-to-store-a-json-in-a-variable-and-use-it-in-the-request-body/1881):
>
> Hi, I want to run a collection with specific test data, but restore the data from before my collection run afterwards. My idea to achieve this is so far: Execute a GET request to retrieve the currently available data. Format: JSON Store that data in an environmentvariable Run collection that includes overriding the original data with PUT request containing my test data. Restore the original data from the environmentvariable However this doesn’t seem to work. Approach #1: I used the code f…

---

_[View the full topic](https://community.postman.com/t/conditionally-update-one-field-based-on-the-value-of-another/57155)._
