Skip to content

Set Field #1582

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Flow Actions/Set Location/Readme.ms
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This will populate a <u_location> field string based on the <location> field on the user's record without having to use GlideAjax. Go to the <u_location> dictionary and place this snippet in the Default Value field.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid file type, u_installation_id from the script is not documented, and this readme does not describe much at all

Copy link
Contributor Author

@TechnologistTim TechnologistTim Oct 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I looked at another readme from someone else and thought I followed what they did. I'll add more detail.

As for the filetype, I followed the contribution file but for a newb like me, it doesn't provide the level of detail I need. I simply added a file as it states and typed away.

As for the field. I'm going to add in the Readme this applies to a reference field that is added. "u_installation" being the name of my particular field. The <> was an attempt to an example.

1 change: 1 addition & 0 deletions Flow Actions/Set Location/Set Field
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
javascript: var luser = new GlideRecord("sys_user"); luser.get("sys_id", gs.getUserID()); luser.location.u_installation_id.sys_id.toString();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This call type would not be suitable in a flow action. Additionally, you should use getUniqueValue() to get the sys_id string

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works flawlessly on our production instance as is. I did mean to add this to Dynamic Filter though, not Flow Action.

Loading