Through Apex Item Checkbox checks want to store values in Item field

萝らか妹 提交于 2021-01-29 07:37:30

问题


I used Interactive report APEX_ITEM.CHECKBOX2(p_idx => 1, p_value => ST.ID, p_attributes => DECODE(ST.IS_HEADER_ROW ,'Y', 'DISABLED',NULL)). And I want to use highlighted IDs depending upon checks in Row ID field in Comma delimited format DYNAMICALLY.

Further I will use that Row IDs value in another region report and will update values in DB after few validations.


回答1:


On button press, you could run this JavaScript which concatenates all nominated checkboxes into a delimited string.

$s('P1_ROWIDS',
  $("[name='f01']").map(function(){
     return this.value;
  }).get().join(",")
);

Then use the following query to find all the records matching values in that string using this, or your version's equivalent.

select * from your_table
where id in (select column_value from apex_string.split(:P1_ROWIDS))

This can all happen without submitting the page.




回答2:


Below code will fetch only those IDs which are checked in checkbox in comma delimited format (Note: this can be included in DA on any button which should be clicked after selection of multiple rows via checkbox)

$s('P11_ROW_PK', $("[name='f01']:checked").map(function(){ return this.value; }).get().join(","));



来源:https://stackoverflow.com/questions/63618493/through-apex-item-checkbox-checks-want-to-store-values-in-item-field

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!