V7 Variables List

rp-7

#21

Hi karan_shukla,

Thanks for the feedback! That’s a great suggestion, and we’ll look at getting some more examples up on the forum soon.

As for your question, you can accomplish this by using the OnPageLoad and OnWindowResize events to set the panel states’ heights to [[Window.height / 2]].

Check out the attached .rp file to see this in action!
2PinnedPanels.rp (75.5 KB)


#22

Julie! Thanks a lot. This is exactly what I wanted. In the interim, I did try something else as well and that was to just use dynamic panel ordering. So I made the Messages panel Go on top of the Activity Panel. That seemed to work too.
But your quick prototype was really helpful.


#23

how to use fromCharCode?

I tried this [[String.fromCharCode(65)]] and it doesn’t work. It should show the letter “A”.


#24

Hi rubiroid,

Sorry, while fromCharCode is supported in JavaScript, it isn’t yet supported in Axure. Not sure how that got in there, I have edited the list to more closely match the functions allowed in Axure. Thanks for pointing it out!

We will definitely look at supporting fromCharCode and more in the future.


#25

Thanks a lot !:slight_smile:


#26

I have no idea how to use these functions, but I really want to start using them. Axure has a built in tool to help you build custom conditions, it would be nice to have that for functions.
Is there anything like a quick tool to get what I need done. For now I just want to use a function that causes a wigdet to dynamically fill a given pixel space such as 640 x 2000 but not fill a particular area within that space at the top such as the header area. So you would click the button which would expand to fill the specific space except for the top area.

can anyone help. Thanks


#27

Hey Chad,

You’re working in the 8.0 beta, right? Would using the “Set Size” action with an anchor point set to “top left” do the trick for you? That idea could work if the widget that you want to resize is sitting directly below the header that you don’t want to have overlapped.

If you have a specific size that you want to set the widget to then you can specify in the “width” and “height” fields in the case editor. If you want it to do something else like fill up the entire width or height of the browser, then you can click the “fx” button next to the width and height fields to add functions that will let you do that. If you want it to fill up the entire width of the browser, you can set it to [[Window.width]]. Similarly for filling up the window height, you could set the height to [[Window.height]]. Those functions are available in the “Window” section of the “Insert Variable or Function” list.

If you want to do something like make the height of a widget match the height of a browser but now cover up a header, then you can set the height to something like [[Window.height-(your header’s height)]]. For example, if your header is 100 pixels tall, you would put [[Window.height-100]].

If the height of your header is going to be changing sizes too, then you can set up a local variable in the function editor that corresponds to your header. For example, LVAR 1 == your header widget. You could then write something like this:

[[Window.height-(LVAR1.height)]]

That should allow your widget to adjust to the height of the browser minus whatever the height of your header becomes.

Variables can get a little crazy. Hopefully that made sense!


#28

Well I feel a little bad I guess because I chose to go a different route. However if I use this feature in the future this will be helpful. The reason I had to use fx is because I had 4 square horizontal buttons. The outer buttons expanded fine, however the two inner buttons could not be set to fill the space based on the allowed parameters of fill to space animations. If this makes sense great. If not not worries.

Thanks!


#29

Sorry, figured it out. Unlike setting text on the widget from the data set, the variable values from these random functions don’t display until you preview or publish.

Regards,


How do I get the value of one of these variables to appear on a widget?

I’m a relative newbie to Axure. I’ve read the thread above and another tutorial on this, but nothing is working. My mock has a grid. I’d like for one of the widgets to display a random number, to represent a field ID.

The grid is generated from a repeater. I currently have text being derived from the repeater dataset (on item load set text on blah to blah). I assume some of them could be derived from these variables, as opposed to typing it into the repeater data set.

I’ve tried the following, but neither works:

  • under repeater item interactions, on item load set text on blah = to value of math.random
  • under repeater item interactions, on item load set value of variable (one I made) to math.random, and on item load set text on blah to (the variable I made)
    ** same thing on load (as opposed to on item load)

Regards,
Swish


#30

I just tried your first method and it works fine. It’s not evaluated until you run the prototype, so it won’t show up in Axure. If you preview it, you’ll see it worked fine. That said, Math.random() produces a random number between (excluding) 0 and 1, so you might want to pretty it up as it will look something like 0.009889078. If you wanted a 6 digit number, try [[(Math.random() * 1000000).toFixed(0)]]

EDIT: Just saw your edit that you figured it out on your own, I left my browser open :slight_smile:


#31

This may be a dumb question but isn’t this list a set of functions that call in or manipulate values that are either stored in variables or inherent in page elements and DOM? It’s just a little confusing to see these listed as variables,when they’re described elsewhere as named containers waiting for a value assignment. Aren’t these functions used to call or assign values TO variables?


#32

It’s a mix of both. Some are variables/properties (Window.scrollY, String.length) and some are functions that return a value, Math.random(), String.substring()

Not all variables can be assigned. Some have their assignment determined by Axure (Window.height) while some can be assigned a value by you, such as any global variable you create.


#33

How do I use Log10. e.g. Log10 (1000) = 3
My code is ’ Set text on BodyFat equal to “[[(Math.log10(1000))]]”
I get back ‘undefined’ in the BodyFat field.


#34

I haven’t been able to find a “V8 Variables List,” does any such thing exist? Or a list of changes from V7 to V8 that could supplement this list?
Thank you


#35

Hi wjh!

The list of variables between Axure RP 8 and 7 should be more or less the same as the one from this original post.


closed #36

archived #37

unarchived #38