Show details for Number Variables | IV_014

Number Variables | IV_014

In this tutorial, we will learn how to specify and utilise the Number variable type. These can be used where a numerical selector is required, such as when linking to a font size.

Tutorial Video Transcript

A transcript of our tutorial video, ensuring you can find exactly what you need, when you need it.

You can search this page to find the relevant time-stamp in the video. Also, this text can be used as part of the tutorial search feature.

00:00:12:20 - 00:00:13:19
In this tutorial, we

00:00:13:19 - 00:00:17:15
will learn how to specify
and utilize the number variable type

00:00:18:07 - 00:00:21:29
so these can be used
where a numerical selector is required,

00:00:21:29 - 00:00:26:13
such as when linking
to a font size, for example.

00:00:28:02 - 00:00:29:28
And that's the example
we'll do here as well.

00:00:29:28 - 00:00:35:09
So to begin,
if I go to my variables tab within Invent

00:00:35:29 - 00:00:37:24
and InDesign

00:00:38:19 - 00:00:43:18
and click on Add Variables.

00:00:43:18 - 00:00:46:28
Now what I'm choosing at
this time is a number variable.

00:00:47:10 - 00:00:49:28
There's a few simple options
that I can complete.

00:00:50:14 - 00:00:53:05
The first is to fill in a name

00:00:58:23 - 00:01:01:08
and then I can select a default value.

00:01:01:21 - 00:01:04:20
So this is the number
that will be utilized by default.

00:01:05:00 - 00:01:07:15
If it is something like a font size
that we're linking to,

00:01:07:22 - 00:01:10:11
this is the font size
that will eventually be used

00:01:10:22 - 00:01:17:26
when the product is first opened.

00:01:17:26 - 00:01:21:12
I've got some user interface information
over on the right hand side

00:01:21:23 - 00:01:24:03
so I can change
the label if I wish to do so

00:01:26:05 - 00:01:30:00
and I can put in some help information.

00:01:30:00 - 00:01:33:05
I've optionally got some validation
information as well,

00:01:33:15 - 00:01:36:09
so you can specify a minimum and a maximum

00:01:37:13 - 00:01:42:22
number that it is possible to enter
along with some validation messages.

00:01:42:22 - 00:01:46:27
Should you go outside of those ranges.

00:01:46:27 - 00:01:50:09
So this validation is optional,
but seeing as its font size,

00:01:50:09 - 00:01:55:24
it would be a good idea
to put something in.

00:01:55:24 - 00:02:00:08
And then I can put
in some associated messages.

00:02:00:08 - 00:02:03:17
I also have the ability
to specify the step increment.

00:02:03:19 - 00:02:09:22
So in what increment
can this number picker be changed?

00:02:09:22 - 00:02:11:22
And so you can't do

00:02:14:09 - 00:02:15:16
anything other than integers.

00:02:15:16 - 00:02:23:09
So for example, if I try and do a step of
0.5, it will default to an integer value.

00:02:23:09 - 00:02:24:10
So just be aware of that

00:02:26:20 - 00:02:30:27
and then I'm going to click on Save.

00:02:30:27 - 00:02:35:08
Now all we need to do
is link that to our relative field.

00:02:35:25 - 00:02:39:09
So a field on our actual template itself.

00:02:39:09 - 00:02:43:05
So we could actually make this
so that it's driving the text

00:02:43:12 - 00:02:44:17
in a particular field.

00:02:44:17 - 00:02:49:15
For example, however, we will link it
to the font size in this case.

00:02:49:15 - 00:02:53:07
So if I click on one of my text frames

00:02:55:08 - 00:02:58:08
and go over to the Properties tab,
the first thing you need to do

00:02:58:08 - 00:03:02:05
is make sure that the text frame you've
selected is enabled.

00:03:04:03 - 00:03:06:06
That makes it dynamic and can

00:03:06:06 - 00:03:10:13
then be driven from Invent.

00:03:10:13 - 00:03:14:28
Now one of the options we have
as part of a text frame, if I look down

00:03:14:28 - 00:03:19:21
this list a little bit,
is the selection of a font size.

00:03:19:21 - 00:03:22:22
Now by default you'll probably see
this is set to inherit,

00:03:23:05 - 00:03:25:20
so it's just going to inherit
what's already on the document.

00:03:26:09 - 00:03:28:17
However,
in this case we can link it to a variable

00:03:30:04 - 00:03:33:08
and then it
will show as a list of relevant variables.

00:03:33:08 - 00:03:36:28
So in this case it's just the ones
which allow a numerical input.

00:03:37:29 - 00:03:40:18
So I can say number variable example

00:03:41:25 - 00:03:43:05
and that's it, that's the link.

00:03:43:05 - 00:03:44:21
Then create created.

00:03:45:00 - 00:03:48:04
So now export this template
as a MEX file

00:03:48:05 - 00:03:51:26
and I'll import this
into our MegaEdit product.

00:03:51:26 - 00:03:57:09
So with our product loaded up, we can now
see that we have one variable option

00:03:57:09 - 00:04:01:03
available in our form on the right hand
side, which is a numbers selector.

00:04:01:18 - 00:04:06:03
And when we change this value either by
typing in the new value or choosing these

00:04:06:24 - 00:04:10:13
icons over on the right hand side,
you'll see that the linked field,

00:04:11:21 - 00:04:16:15
the font size being utilized, changes.

00:04:16:15 - 00:04:23:17
And we can't go outside of the ranges
that we've specified.

00:04:23:17 - 00:04:26:20
If I type in something that's outside
of those ranges, you'll see that

00:04:26:20 - 00:04:33:08
we get our associated
validation warning message.

 

Incomplete