Version number variable

Whenever we commit a new release, the version number is updated. I’m wondering if this version number is accessible to display in apps like {{ app.version }} or something like that. I’m changing it in a text component manually at the moment.

Hi @Steven_W :wave:

The version number is accessible via retoolContext. You can set the text component to {{ retoolContext.pageTag }} which will automatically update as you publish new releases. View in Preview mode to see the current version.


Thanks Abbey!
But what about mobile? I guess it will always show latest on mobile unless you are in preview mode. We thought it might be helpful to be able to return the version number for feedback or have it in screenshots whenever there's an issue.

1 Like

This will also work on mobile. As you pointed out, in edit mode you're always viewing latest therefore pageTag state alway evaluates to "latest".

So I did this on mobile: {{ retoolContext.pageTag }}

In edit mode it shows latest. But in the app where users are not in edit mode it's just ""

Edit 17.10.24:
I will as soon as I'm able to push a new release for the app so I can double check if it's behaving like this. But I'm stuck on something else and I can't push a new release yet. I'll post a screenshot when I can.

1 Like

Would you mind sharing screenshots?

Thanks!

It was a problem with a text component being hidden. It does work like you said.

Perhaps it’s better to have an isLatest property and pageTag separate.

It’s useful to be able to display the version number when someone has feedback or a bug report. “Latest” doesn’t help much when you’re weeks later.

Why is it called pageTag anyways? :face_with_open_eyes_and_hand_over_mouth:

1 Like

I feel likewise and wondered the same thing! Glad you figured out the cause.