Replicate/Copy a form to a new table with all existing rules

riaz_mansuri
Kilo Guru

Hi,

Is it possible to create a copy of a Form in a new table? I have spent some time create a form with a new table with Client scripts and business rules.

I now want to create a new table and have an exact copy of this form with all of its rules. Is this possible?

Thanks,

1 ACCEPTED SOLUTION

Hi Riaz,



Permissions are not applied to the forms displayed directly... you setup the ACLs (permissions) on the underlying tables/records/fields, and when you select a record to be pulled up in a form, those ACL's are evaluated and take effect.   Here are two helpful graphics I have posted to my desk for reference (both are from the same document):




If these are for records in different tables (i.e., group 1 can only see table 1, and group 2 can only see table 2), then setting up your ACL's for each table should be enough to provide your separation, I think.



Another way you can setup restricted security by form (possibly for different forms being used on the same type of object/table) is to specify a View for the form, and then check for that view in your ACL to grant/reject the access.


  • View Management - ServiceNow Wiki
  • Then in your ACL script you can check for this as a condition:       gs.action.getGlideURI().get('sysparm_view') == "my_custom_view"



-Brian


View solution in original post

3 REPLIES 3

Brian Dailey1
Kilo Sage

Hi Riaz,



As far as I know, the answer is No... but there are some ways/features/tricks to make things easier with your next table/etc.



  1. Use the "Insert and Stay" action (Using Forms - ServiceNow Wiki )
    This will insert a new copy of whatever record you are currently viewing, whether it's a BR, client-script, etc.
    Use this to quickly save a new copy of the item, then you can easily adjust the values (e.g., what table it runs on, etc.) to fit your new object.
    (for scripts, don't forget to make sure all your field names match, or update them to match)
  2. When you create the new table, choose to have it extend your first table. (Creating a Custom Table - ServiceNow Wiki )
    In this way, it can inherit the BR's/UI Actions/etc. that you've already setup for the first (parent) table.
    To be able to do this, you need to first select the "Extensible" property on your original (parent) table.


See if any of that works for you.   The Insert and Stay can really save you a lot of work.





Thanks,


-Brian


Hi Brian,



Thanks very helpful, the extends table and Insert and stay tips are great.



The main reason for this is to ensure security as this is around Risk Forms, so a different form for each group but no other group should be able to view the form without the relevant permission. I assume the extends table will not allow this? Which is exactly what I need.



I will have a go at this over the next few days and update this thread.



Thanks


Riaz


Hi Riaz,



Permissions are not applied to the forms displayed directly... you setup the ACLs (permissions) on the underlying tables/records/fields, and when you select a record to be pulled up in a form, those ACL's are evaluated and take effect.   Here are two helpful graphics I have posted to my desk for reference (both are from the same document):




If these are for records in different tables (i.e., group 1 can only see table 1, and group 2 can only see table 2), then setting up your ACL's for each table should be enough to provide your separation, I think.



Another way you can setup restricted security by form (possibly for different forms being used on the same type of object/table) is to specify a View for the form, and then check for that view in your ACL to grant/reject the access.


  • View Management - ServiceNow Wiki
  • Then in your ACL script you can check for this as a condition:       gs.action.getGlideURI().get('sysparm_view') == "my_custom_view"



-Brian