Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

User participant attribute as number

More
4 years 5 months ago #212844 by s_cavalcanti
Hi,

At the municipal social services ​​department where I work we are using limesurvey to collect case numbers each NGO is dealing with every month.
We're giving each participant (a non-profit organization) an attribute_1 equal to the maximum number of cases they can insert monthly (at most, twice their capacity)

We're using the following formula to limit the number of cases inserted into Q1 as:

Q1.NAOK <= ((TOKEN:attribute_1 *2))

However It doesn't work because the attribute_1 is read as text instead of an integer/number.

Is there a way to set a certain attribute as numeric so we can use it the way I described?

Thanks in advance and apologies for the broken English
 
The topic has been locked.
More
4 years 5 months ago - 4 years 5 months ago #212848 by DenisChenu
intval(trim(TOKEN:ATTRIBUTE_1)) ?

In general : only trim (excel have issue with hidden characters)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
Last edit: 4 years 5 months ago by DenisChenu.
The following user(s) said Thank You: s_cavalcanti
The topic has been locked.
More
4 years 5 months ago #212849 by tpartner

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu, s_cavalcanti
The topic has been locked.
More
4 years 5 months ago #212865 by s_cavalcanti
It worked just fine. :)
Many thanks Denis and tpartner.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose