Counting Numbers of Click.

Vivek Verma
Mega Sage
Mega Sage

Requirement - there should be a custom field in the form that displays numbers os click the particular UI action button have been clicked. 

1 ACCEPTED SOLUTION

Tushar Sharma2
Kilo Guru

Hello,

1.Create a field on the form.

2.Create an UI Action on the same form as below.

find_real_file.png

 

'IF' condition is for first time click over the form. If we did not provided the same it will return NAN field will be empty when we will click first time. If you do not want to write 'IF' condition then provide default value to the field from data dictionary and write only else part in the function.

 

Hit Helpful or Correct Answer on the impact of the response.

-Tushar

View solution in original post

11 REPLIES 11

Tushar Sharma2
Kilo Guru

Hello,

1.Create a field on the form.

2.Create an UI Action on the same form as below.

find_real_file.png

 

'IF' condition is for first time click over the form. If we did not provided the same it will return NAN field will be empty when we will click first time. If you do not want to write 'IF' condition then provide default value to the field from data dictionary and write only else part in the function.

 

Hit Helpful or Correct Answer on the impact of the response.

-Tushar

wouldn't you just need one line of code g_form.setValue('u_count', (parsInt(g_form.getValue('u_count'))+1)); if they set the default value of u_count to 0.

Tushar Sharma2
Kilo Guru

soulpancake,

 

Did you get chance to check the code for the same. 

Is it working fine? Do you need more clarification?

 

Hit Like or Correct on the impact of response.

-Tushar

 

 

Vivek Verma
Mega Sage
Mega Sage

find_real_file.png

Vivek Verma
Mega Sage
Mega Sage

Thank You!