{"name":"getValueOfBitPosition Function","description":"Page-level JavaScript function for accessing multi-select elements","assets_map":{"option_list":{"4357981":{"page_level":{"id":4357981,"name":"Zerion Platforms","global_id":"0OL4357981H63325","version":3,"created_date":"2016-10-15T03:08:04+00:00","created_by":"jhsu","modified_date":"2016-10-15T03:10:32+00:00","modified_by":"jhsu","reference_id":"","option_icons":""},"options":[{"id":658393561,"key_value":"iFormBuilder","global_id":"0O658393561H4B46B","label":"iFormBuilder","sort_order":0,"condition_value":"","score":0,"localizations":[]},{"id":658393564,"key_value":"Dataflow Automation","global_id":"0O658393564H7E7FD","label":"Dataflow Automation","sort_order":1,"condition_value":"","score":0,"localizations":[]},{"id":658393567,"key_value":"Reports","global_id":"0O658393567HBE42A","label":"Reports","sort_order":2,"condition_value":"","score":0,"localizations":[]},{"id":658393570,"key_value":"Sandbox","global_id":"0O658393570H06791","label":"Sandbox","sort_order":3,"condition_value":"","score":0,"localizations":[]},{"id":658393573,"key_value":"Identity Management","global_id":"0O658393573HCE8CA","label":"Identity Management","sort_order":4,"condition_value":"","score":0,"localizations":[]},{"id":658393576,"key_value":"Other","global_id":"0O658393576H0B3F2","label":"Other","sort_order":5,"condition_value":"","score":0,"localizations":[]}]}},"pages":{"3302632":{"page_level":{"id":3302632,"name":"getbitpositionvalue","permissions":{"modify":true,"view":true,"collect":true},"global_id":"0P3302632H02BE9","label":"getBitPositionValue","description":"Description","version":17,"created_date":"2016-10-14T22:54:29+00:00","created_by":"jhsu","modified_date":"2016-10-17T16:23:48+00:00","modified_by":"jhsu","is_disabled":false,"reference_id_1":"","reference_id_2":"","reference_id_3":"","reference_id_4":"","reference_id_5":"","icon":"","sort_order":0,"page_javascript":"\/**\n * A function to access a value in an option in a multi-select element.\n * by converting the value of the multi-select element into a bit and \n * @param {integer} i the integer representation from a multi-select element\n * @param {position} p the number of the option list value to look-up\n * the last option is #1 and increments up\n * @return {integer} value of the binary string at the given position\n *\/\nfunction getValueOfBitPosition(i,p) {\n var bit = (i >>> 0).toString(2);\n \n if(p > bit.length) {\n return 0;\n } else {\n bit = bit.split(\u0027\u0027).reverse().join(\u0027\u0027);\n return Number(bit[p-1]);\n }\n}","label_icons":"","localizations":[]},"elements":[{"id":274179223,"name":"lbl_instructions","global_id":"0E274179223H99746","version":1,"label":"Use the getValueOfBitPosition() function to access options within a multi-select.","data_type":16,"data_size":50,"created_date":"2016-10-17T16:23:48+00:00","created_by":"jhsu","modified_date":"2016-10-17T16:23:48+00:00","modified_by":"jhsu","sort_order":0,"optionlist_id":0,"low_value":1,"high_value":10,"keyboard_type":0,"weighted_score":0},{"id":274179226,"name":"lbl_instructions2","global_id":"0E274179226H6A4B3","version":1,"label":"The first argument should be the data column name (DCN) of the multi-select element. The second argument will be the position of the option within the option list. The bottom most option is the number 1, which increments upwards.","data_type":16,"data_size":50,"created_date":"2016-10-17T16:23:48+00:00","created_by":"jhsu","modified_date":"2016-10-17T16:23:48+00:00","modified_by":"jhsu","sort_order":1,"optionlist_id":0,"low_value":1,"high_value":10,"keyboard_type":0,"weighted_score":0},{"id":274179229,"name":"lbl_instructions3","global_id":"0E274179229H2FBCD","version":1,"label":"The function will return a 1 or a 0. A value of 1 means that option was selected.","data_type":16,"data_size":50,"created_date":"2016-10-17T16:23:48+00:00","created_by":"jhsu","modified_date":"2016-10-17T16:23:48+00:00","modified_by":"jhsu","sort_order":2,"optionlist_id":0,"low_value":1,"high_value":10,"keyboard_type":0,"weighted_score":0},{"id":274178605,"name":"zerion_platform","global_id":"0E274178605H6B470","version":4,"label":"What Zerion Platorms Do You Use?","data_type":9,"data_size":50,"created_date":"2016-10-14T23:08:51+00:00","created_by":"jhsu","modified_date":"2016-10-14T23:23:53+00:00","modified_by":"jhsu","sort_order":3,"optionlist_id":4357981,"low_value":1,"high_value":10,"is_required":true,"keyboard_type":0,"weighted_score":0},{"id":274178608,"name":"other","global_id":"0E274178608HAE9BD","version":1,"label":"Other","data_type":1,"data_size":50,"created_date":"2016-10-14T23:23:51+00:00","created_by":"jhsu","modified_date":"2016-10-14T23:23:51+00:00","modified_by":"jhsu","sort_order":4,"optionlist_id":0,"low_value":1,"high_value":10,"condition_value":"getValueOfBitPosition(zerion_platform,1) == 1","keyboard_type":0,"weighted_score":0},{"id":274178611,"name":"iformbuilder","global_id":"0E274178611HC544A","version":1,"label":"iFormBuilder","data_type":33,"data_size":50,"created_date":"2016-10-14T23:23:51+00:00","created_by":"jhsu","modified_date":"2016-10-14T23:23:51+00:00","modified_by":"jhsu","sort_order":5,"optionlist_id":0,"low_value":1,"high_value":10,"dynamic_value":"getValueOfBitPosition(zerion_platform,6)","keyboard_type":0,"weighted_score":0},{"id":274178614,"name":"dataflow_automation","global_id":"0E274178614HBDED8","version":1,"label":"Dataflow Automation","data_type":33,"data_size":50,"created_date":"2016-10-14T23:23:51+00:00","created_by":"jhsu","modified_date":"2016-10-14T23:23:51+00:00","modified_by":"jhsu","sort_order":6,"optionlist_id":0,"low_value":1,"high_value":10,"dynamic_value":"getValueOfBitPosition(zerion_platform,5)","keyboard_type":0,"weighted_score":0},{"id":274178617,"name":"reports","global_id":"0E274178617H0DFC4","version":1,"label":"Reports","data_type":33,"data_size":50,"created_date":"2016-10-14T23:23:51+00:00","created_by":"jhsu","modified_date":"2016-10-14T23:23:51+00:00","modified_by":"jhsu","sort_order":7,"optionlist_id":0,"low_value":1,"high_value":10,"dynamic_value":"getValueOfBitPosition(zerion_platform,4)","keyboard_type":0,"weighted_score":0},{"id":274178620,"name":"sandbox","global_id":"0E274178620H3C3C9","version":1,"label":"Sandbox","data_type":33,"data_size":50,"created_date":"2016-10-14T23:23:51+00:00","created_by":"jhsu","modified_date":"2016-10-14T23:23:51+00:00","modified_by":"jhsu","sort_order":8,"optionlist_id":0,"low_value":1,"high_value":10,"dynamic_value":"getValueOfBitPosition(zerion_platform,3)","keyboard_type":0,"weighted_score":0},{"id":274178623,"name":"identity_management","global_id":"0E274178623H1FE8A","version":1,"label":"Identity Management","data_type":33,"data_size":50,"created_date":"2016-10-14T23:23:51+00:00","created_by":"jhsu","modified_date":"2016-10-14T23:23:51+00:00","modified_by":"jhsu","sort_order":9,"optionlist_id":0,"low_value":1,"high_value":10,"dynamic_value":"getValueOfBitPosition(zerion_platform,2)","keyboard_type":0,"weighted_score":0}],"callbacks":[],"email":[]}}}}