Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desktop and Web Synchronization Issue: Variable Values Missing on Web #13293

Open
1 task done
Baristopcu08 opened this issue Nov 24, 2024 · 1 comment
Open
1 task done

Comments

@Baristopcu08
Copy link

Baristopcu08 commented Nov 24, 2024

Is there an existing issue for this?

  • I have searched the tracker for existing similar issues and I know that duplicates will be closed

When I save a collection variable in Postman, the variable and its value appear correctly in the desktop application. However, when I open the same collection in the web version of Postman, the value of the variable is missing, even though the variable itself exists.

Example code:

const testName = pm.info.requestName;
pm.collectionVariables.set(`${testName}_response`, pm.response.text());
console.log(`${testName} response saved.`);

This script saves an API response to a collection variable, which works fine on the desktop app. However, the variable appears in the web version without its value.

Steps To Reproduce

Steps to Reproduce:
Use the above script to save a collection variable.
Check the variable in the Postman desktop app.
Open the same collection in the Postman web version and check the variable.
Expected Behavior:
The collection variable saved in the desktop app should synchronize and appear with its value in the web version of Postman.

Actual Behavior:
The variable is visible in the web version, but its value is missing.

Screenshots or Videos

No response

Operating System

Windows

Postman Version

10.20.0

Postman Platform

Postman Web

User Account Type

Signed In User

Additional Context?

No response

@Baristopcu08 Baristopcu08 changed the title Postman Desktop and Web Synchronization Issue: Variable Values Missing on Web Desktop and Web Synchronization Issue: Variable Values Missing on Web Nov 24, 2024
@DannyDainton
Copy link
Contributor

Hey @Baristopcu08

This seems to be working as expected. The values in the current value wouldn't be stored anywhere other than the session you're in. What I can see happening is as you're creating the variable with a script, it's only going to populate the current value. That value is not synced anywhere.

Once that's saved and looking as expected on the platform you're running the script on (either desktop or web), in the other platform, it's only going to show the variable name and not the value. You can use the Persist option to either persist all the current values into the initial value or do this individually.

https://learning.postman.com/docs/sending-requests/variables/variables/#initial-and-current-values

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants