Math functions for working with integer

Gone through most of the documentation but I can’t seems to find any math functions built in? Maybe I missed it. I am trying to assign an integer to a variable and add 1 to it. Sort of like a counter to a loop. Anyone can point me to where to look in the docs?

Hi,

This part is poorly documented at the moment, but here is a quick example,

*** Settings ***
Library  RPA.core.notebook

*** Task ***
Expressions Example
    ${VAR}=  Set Variable  ${1+1}
    Notebook Print  ${VAR}
    ${VAR}=  Set Variable  ${${VAR}+1}
    Notebook Print  ${VAR}
    ${VAR}=  Evaluate  math.sin(${VAR})
    Notebook Print  ${VAR}

There is some information in the builtin library docs: BuiltIn library

And also some information in the Robot Framework user guide chapter 2.6.6 Robot Framework User Guide

1 Like

Alternatively, if you need to get a bit more sophisticated, you can create a custom python function and call the from your robot framework scripts

2 Likes

Thanks @Teppo !
I can’t seem to find documentations on RPA.core.notebook

Will find some time to play with it on the robocorp lab to see what it does.

Hopefully the documentations will come up to speed with the development of the product.

@max Thanks! Will go look at that too.

Hi, @chiu.leonard!

RPA.core.notebook is used for printing stuff in the notebook mode in Robocorp Lab:

So, might be useful during development if using Robocorp Lab (some of the libraries use the print features automatically when run in notebook mode).

// Jani