From dee4ed267360e1a323d68cf4b5c2a405b4d59924 Mon Sep 17 00:00:00 2001 From: Tim Dingle Date: Thu, 31 Oct 2024 11:58:59 -0500 Subject: [PATCH 1/8] Adding Default Value script --- Default Value.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 Default Value.js diff --git a/Default Value.js b/Default Value.js new file mode 100644 index 0000000000..3ca029bd5c --- /dev/null +++ b/Default Value.js @@ -0,0 +1 @@ +javascript: var luser = new GlideRecord("sys_user"); luser.get("sys_id", gs.getUserID()); luser.location.u_installation_id.sys_id.toString(); \ No newline at end of file From 04638b5c2d55ebca1e9d912fb9a51bd101c7b9dd Mon Sep 17 00:00:00 2001 From: Tim Dingle Date: Thu, 31 Oct 2024 12:18:44 -0500 Subject: [PATCH 2/8] Add files via upload --- Readme.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Readme.md diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000000..4b8653104e --- /dev/null +++ b/Readme.md @@ -0,0 +1,3 @@ +Scenario: Clerks want to create a special handling note. As an admin, I want to limit those that can see the special handling notes to only view notes with the same Location on their user record. To do this, I added a field on the special handling note "u_location" so the form has a reference field for the signed-in user. When a new special handling note record is loaded, the field is filled in with the Location on their user record without having to use GlideAjax. Now we have a field for an ACL to reference. + +Application: Add the field, then go to the dictionary and place the @Default Value snippet in the Default Value field. Replace "u_location" with your field name. \ No newline at end of file From ed40ac389d2a9db13ec6def2ceb87d55cac088c6 Mon Sep 17 00:00:00 2001 From: Tim Dingle Date: Thu, 31 Oct 2024 12:20:55 -0500 Subject: [PATCH 3/8] Add files via upload From a0fdc45f9169e2a5ecf6249ca5c5004d44b0d2ef Mon Sep 17 00:00:00 2001 From: Tim Dingle Date: Thu, 31 Oct 2024 12:22:38 -0500 Subject: [PATCH 4/8] Delete Readme.md --- Readme.md | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 Readme.md diff --git a/Readme.md b/Readme.md deleted file mode 100644 index 4b8653104e..0000000000 --- a/Readme.md +++ /dev/null @@ -1,3 +0,0 @@ -Scenario: Clerks want to create a special handling note. As an admin, I want to limit those that can see the special handling notes to only view notes with the same Location on their user record. To do this, I added a field on the special handling note "u_location" so the form has a reference field for the signed-in user. When a new special handling note record is loaded, the field is filled in with the Location on their user record without having to use GlideAjax. Now we have a field for an ACL to reference. - -Application: Add the field, then go to the dictionary and place the @Default Value snippet in the Default Value field. Replace "u_location" with your field name. \ No newline at end of file From 34d9b4c4332e61e1011b48c790240017b7f26723 Mon Sep 17 00:00:00 2001 From: Tim Dingle Date: Thu, 31 Oct 2024 12:22:55 -0500 Subject: [PATCH 5/8] Delete Default Value.js --- Default Value.js | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Default Value.js diff --git a/Default Value.js b/Default Value.js deleted file mode 100644 index 3ca029bd5c..0000000000 --- a/Default Value.js +++ /dev/null @@ -1 +0,0 @@ -javascript: var luser = new GlideRecord("sys_user"); luser.get("sys_id", gs.getUserID()); luser.location.u_installation_id.sys_id.toString(); \ No newline at end of file From 39718df7240b087ce5cadf92ed806f4d07abe6ed Mon Sep 17 00:00:00 2001 From: Tim Dingle Date: Thu, 31 Oct 2024 12:23:44 -0500 Subject: [PATCH 6/8] Create Contents --- Default Value/Contents | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Default Value/Contents diff --git a/Default Value/Contents b/Default Value/Contents new file mode 100644 index 0000000000..dc69abb322 --- /dev/null +++ b/Default Value/Contents @@ -0,0 +1,2 @@ +-Default Value snippet +-Readme From 5959c98e9d5ba57b51413eb1ddbd5befac704694 Mon Sep 17 00:00:00 2001 From: Tim Dingle Date: Thu, 31 Oct 2024 12:23:59 -0500 Subject: [PATCH 7/8] Add files via upload --- Default Value/Default Value.js | 1 + Default Value/Readme.md | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 Default Value/Default Value.js create mode 100644 Default Value/Readme.md diff --git a/Default Value/Default Value.js b/Default Value/Default Value.js new file mode 100644 index 0000000000..3ca029bd5c --- /dev/null +++ b/Default Value/Default Value.js @@ -0,0 +1 @@ +javascript: var luser = new GlideRecord("sys_user"); luser.get("sys_id", gs.getUserID()); luser.location.u_installation_id.sys_id.toString(); \ No newline at end of file diff --git a/Default Value/Readme.md b/Default Value/Readme.md new file mode 100644 index 0000000000..4b8653104e --- /dev/null +++ b/Default Value/Readme.md @@ -0,0 +1,3 @@ +Scenario: Clerks want to create a special handling note. As an admin, I want to limit those that can see the special handling notes to only view notes with the same Location on their user record. To do this, I added a field on the special handling note "u_location" so the form has a reference field for the signed-in user. When a new special handling note record is loaded, the field is filled in with the Location on their user record without having to use GlideAjax. Now we have a field for an ACL to reference. + +Application: Add the field, then go to the dictionary and place the @Default Value snippet in the Default Value field. Replace "u_location" with your field name. \ No newline at end of file From 5db760d18d8b7d0902781094f57f0829f4db1908 Mon Sep 17 00:00:00 2001 From: Tim Dingle Date: Thu, 31 Oct 2024 12:24:29 -0500 Subject: [PATCH 8/8] Delete Default Value/Contents --- Default Value/Contents | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 Default Value/Contents diff --git a/Default Value/Contents b/Default Value/Contents deleted file mode 100644 index dc69abb322..0000000000 --- a/Default Value/Contents +++ /dev/null @@ -1,2 +0,0 @@ --Default Value snippet --Readme