castType of boolean and number

a!localVariables(
  local!chooseValue:1,
  local!buttonChoice,
  a!formLayout(
    label:choose(local!chooseValue,"KONE Maintenanence System","New User Registration System","Update User System","Delete User System"),
    contents:{
      a!radioButtonField(
        label: "Please Choose",
        labelPosition: "COLLAPSED",
        choiceLabels: {"Registration", "Update","Delete"},
        choiceValues: {"Registration", "Update","Delete"},
        value:local!buttonChoice,
        saveInto: {a!save(target:local!buttonChoice,value:save!value),
        if(local!buttonChoice="Registration",
        a!save(target:local!chooseValue,value:2),
        if(local!buttonChoice="Update",
        a!save(target:local!chooseValue,value:3),
        if(local!buttonChoice="Delete",
        a!save(target:local!chooseValue,value:4),
        {}
        )
        )
        ) 
        },
        choiceLayout: "STACKED",
        validations: {}
      ),
      a!imageField(
        label: "Image",
        labelPosition: "COLLAPSED",
        images: {
          a!documentImage(
            document: cons!KONE_IMAGE01
          )
        },
        showWhen:local!chooseValue=1,
        size: "LARGE",
        isThumbnail: false,
        style: "STANDARD"
      ),
      choose(local!chooseValue,{},
      rule!KONE_Development_Insert_Interface(
      backupuseraudit:rule!KONE_Development_backupuseraudit_castType(), 
      userrole:rule!KONE_Development_USER_ROLE_castType(),
      submit:toboolean(),
      ),
      rule!KONE_Development_UserUpdate_Interface(
        userrole:rule!KONE_Development_USER_ROLE_castType(),
        backupuseraudit:rule!KONE_Development_backupuseraudit_castType()),
      rule!KONE_Development_deletefromuserrole_Interface(
        userrole:rule!KONE_Development_USER_ROLE_castType(),
        csetender:rule!KONE_Development_CSE_TENDER_castType(),
        cseservicecatalogue:rule!KONE_Development_CSE_SERVICE_CATALOGUE_castType(),
        pricingaudit:rule!KONE_Development_PRICING_AUDIT_castType(),
        csepriceapprovalphase:rule!KONE_Development_CSE_PRICE_APPROVAL_PHASE_castType(),
        priceapproval:rule!KONE_Development_PRICE_APPROVAL_castType(),
        csetenderphases:rule!KONE_Development_CSE_TENDER_PHASES_castType(),
        cseservicecataloguesubtask:rule!KONE_Development_CSE_SERVICE_CATALOGUE_SUBTASK_castType(),
        cseservicecataloguephases:rule!KONE_Development_CSE_SERVICE_CATALOGUE_PHASE_castType(),
        cseservicecataloguesubtaskphase:rule!KONE_Development_CSE_SERVICE_CATALOGUE_SUBTASK_PHASE_castType(),
        backupuseraudit:rule!KONE_Development_backupuseraudit_castType(),
        backupuserrole:rule!KONE_Development_BACKUP_USER_ROLE_castType(),
        deleteid:tointeger(),
        delete:toboolean(),
        backupuserauditvalid: toboolean(),
        backupuserrolevalid:toboolean(),csetenderphaseslistvalid:toboolean(),
        csepriceapprovalphaselistvalid:toboolean(),pricingauditlistvalid:toboolean(),
        cseservicecataloguephaselistvalid:toboolean(),
        cseservicecataloguesubtasklistvalid:toboolean(),
        cseservicecataloguesubtaskphaselistvalid:toboolean()
      )
      )
    }
  )
)

As title, I am trying to castType for sub-interface rule input saveInto local!variable in order to publish on site, I am trying to cast number and boolean into correct type, but as my code here is incorect,such as submit:toboolean() is incorrect,then how to do it?

  Discussion posts and replies are publicly visible