Log in
Log into community
Join the Webstudio community
View all posts
Related posts
Was this helpful?
π
π
π
Powered by
Hall
Active
Updated 4 weeks ago
0
Follow
Add Expression Editor to Variables
Add Expression Editor to Variables
Active
0
Follow
J
John Siciliano
10 months ago
Β·
I'd like to create a variable using the values of other variables.
I think the only place this can be done is in the resource URL, but I'd like to do it with strings.
Thoughts?
Attachment
1
B
J
j
14 comments
Share
Open in Discord
B
Bogdan
10 months ago
What is your use case? We thought about it at first but decided to not implement because of huge complexity.
J
John Siciliano
10 months ago
Assembling a query with a variable.
It's just a lot easier to send the full query, with values (e.g. the slug) then to send the query with a variable.
J
John Siciliano
10 months ago
If it's a huge complexity, then not worth it right now
J
John Siciliano
10 months ago
actually template literals may solve this
J
John Siciliano
10 months ago
Especially if this is implemented then I can add the query to the URL field with template literals and not have to worry about encoding
https://discord.com/channels/955905230107738152/1218751594489970849
B
Bogdan
10 months ago
If you mean graphql requests better use json in body { variables: {}, query: "" }
B
Bogdan
10 months ago
it can be parametarized just like url
B
Bogdan
10 months ago
btw requires Content-Type: application/json header
B
Bogdan
10 months ago
and post method
J
John Siciliano
10 months ago
Ah cool I'll play with this and report back. And I'm not using graphql rather Groq which is a Sanity custom language.
J
John Siciliano
10 months ago
Okay disregard. using post solves both this and the encoding. Thanks Bogdan!
B
Bogdan
10 months ago
π
j
jakobsturm
4 months ago
I would love to see this now that we have the CMS. My use case would be to save the blog title in a variable that I can use multiple times.
At the moment I have to use
Baserow.data.results[0].Name
everywhere I need it. Feel like there should be a way to just create a variable for this
A
Andreas
3 months ago
+1 for this. Being able to save a value from a GraphQL request or other resource to a variable would be a huge time saver
Add a reply
Sign up and join the conversation on Discord
Join on Discord