Skip to main content
Question

Read Checkbox values from Form

  • January 18, 2022
  • 4 replies
  • 335 views

I am working on AARI forms. I am able to read text box values from the form in my task bot but unable to read checkbox values. Can any one please help/

4 replies

Forum|alt.badge.img+18
  • Most Valuable Pathfinder
  • 2691 replies
  • January 18, 2022

Hi @Anifa Mohammed​ ,

 

Can you share more details, Share the Code Snippet?


  • Author
  • Cadet | Tier 2
  • 1 reply
  • January 18, 2022

Below is my form-

image" data-fileid="0692t000009knsKAAQand this is my Process -

image" data-fileid="0692t000009knsZAAQthe variable vProject_Name is the input variable in my task bot and it is getting the textbox value from the form correctly. Where as the variable vDefault_Folders which should return the checkbox values is returning empty.


Forum|alt.badge.img+11

Hi @Anifa Mohammed​ 

 

A checkbox output is a dictionary variable represented like follow:

{

"CheckBoxGroup0_0": true,

"CheckBoxGroup0_1": false,

"CheckBoxGroup0_2": true

}

where CheckBoxGroup0 is the ID of the checkbox and 0,1,2 are the index of the choices/options.

 

In your example, the output dictionary will look like:

{

"CheckBoxGroup0_0": true,

"CheckBoxGroup0_1": false,

"CheckBoxGroup0_2": false,

"CheckBoxGroup0_3": false,

"CheckBoxGroup0_4": false,

}

with CheckBoxGroup0_0 representing the Folder1 choice.

 

Now if you want to use this dictionary inside a bot, then create a Dictionary type variable (set as input) in your bot and then feed the value from the checkbox into this variable (like a TextBox or TextArea) using the variable picker.

 

It should look like

$input[CheckBoxGroup0]$

 

Let me know if this helps you.

 

--Geoffrey


  • Cadet | Tier 2
  • 4 replies
  • August 22, 2022

Hi @Geoffrey Laissus​ ,

 

image 

This is my dynamic checkbox values that are from db.

How can I map these checkbox values other than true/false (i mean 00100,00400,76506) in bot variable.

In my example, the output dictionary will look like:

{

"CheckBoxGroup0_1": false,

"CheckBoxGroup0_2": true,

"CheckBoxGroup0_0": true,

"CheckBoxGroup0_3": false,

"CheckBoxGroup0_4": true,

}


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings