Expand my Community achievements bar.

formating text

Avatar

Level 4

Good morning everyone,

Quick question today about formating text within Designer.

Here is what im trying to do.

My client wants me to create an numeration system for the questions he's asking on is form. This numerization as to be dynamic based on previous choices.

So this work right now, the only problem i have is when the questions  (in numbers) go over 10.

1.1

.

.

1.5

.

.

1.9

2.0 (1.10)

2.1 (1.11)

etc..

.

.

I would like to keep the formating to 1.XX but i dont know what to change to make this happen.

Is this even a possibility??

Thank you again so much.

4 Replies

Avatar

Level 8

What does your script look like?

Kyle

Avatar

Level 4

Hi Kyle,

Something like this:

 

var tempchoice= sf_generalA_21.RadioButtonList20.rawValue;

if (tempchoice==2){

                  this.rawValue=sf_generalA_21_2.Q1_1_calc.rawValue +0.1;

}else{

this.rawValue =5.2;

}

  

Im also using right now a decimal field and its set on the "calculate" event.

Patrick

Avatar

Level 8

How about instead of one decimal field you have two right beside each other? The first one having a value of '1.' and the second one is what increments. The second one would have the code you showed me but instead of adding 0.1 you add 1.

Kyle

Avatar

Level 4

Darnit, ya that will work, sometimes things are just simple.

Thank you.

Patrick