I am working on a SAIL Form, using ''a!checkBoxField()' as one of th

I am working on a SAIL Form, using ''a!checkBoxField()' as one of the field. There are 2 issues that i am facing this this component.

1. Even though i select values on the checkbox, selection seems disappear when form refreshes with other field selection on the form. But able to submit the form and retrieve the values selected on check box. Isn't there any way to retain the selection upon refresh ?
2. Value that i use to "saveInto:" on the checkbox is throwing error when i use the same variable for "value:" Unable to retrieve the selection in next form with the help of the saveInto variable. Please let me know if there is any solution ?

OriginalPostID-148489

OriginalPostID-148489

  Discussion posts and replies are publicly visible

  • can you pl post your code here ... your value and saveInto should have the same variable (local! or ri!)
  • Hi, can you please share your SAIL code? Possible causes for these issues are,
    1. Is the variable used to store values for this check box is being refreshed else were in the form? You probably are using the same variable to store multiple components values in to.?
    2. What is the error you are seeing? You could use an ACP to store values in to and then store that ACP's value in a PV. Then use this PV to pass values to your next form.
  • What is the value of required : true() or false() ?
    Are there more than one variables that are updated with the choice values when the user changes the selections?
  • Two things which come into mind without seeing your code are :
    1.May be your choice values and value are not having the same values, i mean like lets say for eg your choic values has {"A","B","C"} and the value contain some other value other than these values.
    2.Try giving the placeholderLablel parameter in your code as when the first time the value of the rule input or the local variable where your are saving the selection may have a null value so it might throw an error.
    3.In order to show the value in the next screen please verify that you are saving it into rule input not the local variable(if you are not using the sail wizard).
  • First and foremost thankyou all for your responses. Sorry that i couldn't reply immediately.

    nikhil: please find the code and the issue descriptions attached
    goutham: variable is used no where in the form except for this checkbox
    amit: required is false, only one variable get updated with checkbox values
    harsha: You are right. choice value and value are not same. And i guess it is not possible for it to be same.
    initially the value will be null as none selected by default and later value will be subset of choice values as only few may be selected of all. Yes i am passing the process variable as activity parameters and saving back. it is working fine in that scenario. But actual problem is with choiceValues, value and saveInto

    code_issues_description.txt

  • @saratrk, AFAIK i would recommend to follow the steps in this way,
    Step 1: Instead of giving a condition in the Value if(ri!isEdit, ri!chkBoxvalues, local!nullValue), let it be ri!chkboxvalues.
    Step2 : Now when you are running for the first time when your passing the values from ACPs to this rule inputs dont pass anything,
    Step 3:When you are coming back to the same Form call the Process Variable in the ACP, with a condition like if(pv!isEdit,pv!chckBoxvalues,"") where the pv!isEdit contains a boolean value and pv!chckBoxValues contains the values Foyer Signs;Name tags.
    Hope This Helps!!!
  • @saratk ,I was in a imagination of Dropdown field for my First Comment Please ignore it
  • Hi All, thank you all for your responses. Problem was with ac! value which i have kept single text while saving in process model which was not matching with multiple text coming from the SAIL form.