App variable before starting app

I would like to take some details and set it as app variable like blog_url: https://example.com/ before the app starts. I tried setting it up when in the global page, when I go to homepage, I set the title as app variable blog_url, but it doesn’t show anything.

I tried to update it after pagemounted as a flow but it didn’t work. Please help!

If it’s always the same value, the easiest way is to initialize a variable with a default value:

If it’s an object or array, you need to click the Cog icon and select “Initialize with a value”

After this, you can input an initial value:

Hi, I would like this initial value to come from a rest api. How do I manage it then?

use set appvariable logic node immediately after you get it from the api.

So you’d have logic on the global canvas for:

[App launched] - - - [Get data record] - - - [Set app variable]

However, there’s no way to wait until that data is fetched before continuing to load the app ATM, so you need to account for the fact that it will be undefined for as long as it takes for the REST API to return the data to set to the app variable.

I tried it earlier but the issue is that the app variable is still showing as null after recording the data into it.

Are you sure you get the correct data from the backend and you’re not calling Set app variable elsewhere? Have you used the debugger to see what values the Set app variable node gets executed with?

Let me check. Thanks for quick reply! Lovely platform it is and I’m glad that I found it. Just wouldn’t want it anytime to be paid soon :rofl: Which is the parent company?

Composer Pro is going to be free forever for indie devs and companies under $10M funding/annual revenue. We might introduce some advanced paid features like test automation or analytics or organization support, but we’ll get our revenue from enterprises and keep the base product always free.

The whole thing is developed by us (AppGyver), with strong backing from VCs like Karma (founders of Skype).

Currently, I have set it up on homepage as assigned value. Later on I will attach it to api. Now when I go to homepage, and put there tile layout and inside it app base_url under which I typed my url, it gives me Lorem ipsum…

How could I go about setting App variables with data from the Users table if I am using POST method for login (for which a data variable for the login page is set to Create New Record) ? Could this still be done from the Global Canvas page?

Is the Global Canvas page called before or after login?

I think the global canvas is just after launching the app. so after request post in the login page, you can call Users’ details and set them as app variables. Rest is on @Harri_Sarsa as I’m still trying out the platform!

1 Like

Hey, it started working now from the global page. I don’t know what was the issue.

1 Like

I will give that a try and thank you for taking the time to help out!

1 Like