But how does the filter form control use JavaScript before and after execution?
What I'm trying to do is before the filter happens to the table there is a JavaScript code that hides the table, which is executed by the filter control before and after the filtering, it will show the table using the after. Can the filter control do that?
Hi
At the moment you can set up the filter macro to execute custom JS when it loads (page render) and right after the filter is applied -> meaning when the filter result is received from the backend and is updated on the page view
Alex
This is the simple script I want to run I want to hide before and after the filter runs to show the table. Am I going about it the wrong way? Or is it not possible?
<script>
function showtable1(){
AJS.$('table1').show();
}
function hidetable1(){
AJS.$('table1').hide();
}
</script>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am a bit sceptical about your "scripts", but may I ask you - why do you want to hide the "table"?
To hide it initially there is a better way - just set the "filter to apply on dataset" to be something like
created:<0
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, this works and I know that my small piece of 'code' is not a 'script' lol my bad. I understand why created:<0 works but how?
I was trying to hide data based on the user so that everyone does not see each other input. Thank you again and I'm still new to using JavaScript.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To make form’s data secure disable edit permissions on the page where the form definition (macro) is and set the form’s parameter to allow seeing only own data for forms non admin users (on form definition macro)
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh, I understand but the organization i work for switching supervisor frequently so it would be annoying to update that information every time. The table I was trying to hide was the one supervisor see so that they don't see each other departments employee's input and the solution you gave work and so now I can send them the person name they input into the filter and only see that person input and thank you again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Probably you need to use security groups instead.
But glad things worked out for you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.