AnsweredAssumed Answered

Extracting checkbox values from a parameter

Question asked by laguna92651 on Feb 10, 2017
Latest reply on Feb 11, 2017 by Philip_Jaffe

I am passing the following parameters to a script, the clients_joinclientContractor::Skill field is a checkbox with multiple text values in it. I can't get the values out of this field to increment in the loop. This is the step I'm using to extract the check box values for use in the loop, but I don't get anything,

Set Variable[$skill; Value:GetValue ( $skillparm ; $pos ) ]

 

Parameter

List( CLIENTS::ID_Client ; clients_joinclientContractor::Skill )

 

Script

Set Variable[$ClientID; Value:GetValue ( Get ( ScriptParameter ) ; 1 ) ]

Set Variable[$skillparm; Value:GetValue ( Get ( ScriptParameter ) ; 2 ) ]

 

Loop

Set Variable[$pos; Value:ValueCount ( clients_joinclientContractor::Skill ) ]

   Loop

    Exit Loop If[$pos = 0]

    #----- Gets value from Skill checkboxes squentially.

    Set Variable[$skill; Value:GetValue ( $skillparm ; $pos ) ]

    / /  Set Variable[$skill; Value:GetValue ( clients_joinclientContractor::Skill ; $pos ) ]

    Set Variable[$pos; Value:$pos - 1]

   

    Go to Layout[“L03_JOIN_CONTRACTOR_CLIENT” (JOIN_CONTRACTOR_CLIENT) ]

    New Record/Request

    #----- Set in L02 Contractor Detail

    Set Field[JOIN_CONTRACTOR_CLIENT::id_client ; $ClientID]

    #----- Set in Client parameter Pop Up

    Set Field[JOIN_CONTRACTOR_CLIENT::id_contractor ; $$ContractorID]

    #----- Cycle through selected Skills.

    Set Field[JOIN_CONTRACTOR_CLIENT::Skill ; $skill]

    End Loop

 

Close Window[ Name: "Popup addresses" ]

Commit Records/Requests[No dialog]

Exit Script[  ]

End Loop

Outcomes