Godfrey:
How would I alter your code to use the text value (i.e., "All Applications") instead of the listId (i.e., 6839800) in the audit trail?
Thanks,
John
Godfrey SoritaYou can use the following code to accomplish this requirement:
1234$(
function
() {
previousOnchange = $(
"select:eq(0)"
).
attr
(
"onchange"
);
$(
"select:eq(0)"
).
attr
(
"onchange"
,
"rbf_setField('USER', {!#CURR_USER.id}, 'View_ID', this.value, false);"
+previousOnchange);
});
First, you need to create a Text field with the integration name View_ID in USER object. Then, create a Create Audit Trail Record trigger with the following properties:
- Timing: After Update
- On Field Change: View ID
- Trail Template: View ID {!View_ID} has been accessed.
This should generate an audit trail containing the View ID everytime the view is changed.
- See more at: https://community.progress.com/community_groups/rollbase/f/25/t/19153.aspx#sthash.HYryUsw6.dpuf
Gian:
Excellent! Works perfectly. Thanks for the quick solution. I appreciate it.
John
Hello,
Can you try using JQuery to achieve this?
<script>
$(function(){
previousOnchange = $("select:eq(0)").attr("onchange");
$("select:eq(0)").change(function(){
//get text value of selected option
var t =$(this).find('option:selected').text();
//set field using rbf method
rbf_setField('USER', {!#CURR_USER.id}, 'View_ID', t, false);
});
});
</script>
Thank you,
Gian
Gian:
Excellent! Works perfectly. Thanks for the quick solution. I appreciate it.
John