Skip to main content

HelloID

Use a code snippet in a delegated form task

To help you setup the delegated form task we supply our code snippet library. With this you can easily add snippets of codes that are pre-built to do an action on a system.

  1. Go to the delegated form task (see Add a task to a delegated form).

  2. Click on Code snippet library.

    DelegatedForm_code_snippet_library.png
  3. On the Code snippet library tab, you can search for PowerShell snippets. Click Copy to clipboard to copy the snippet, or click its title to view its code, readme, and release notes.

    DelegatedForm_Code_snippet_library_search.png
    Table 1. Search for code snippet

    #

    Name

    Description

    1

    Search term

    A word or phrase used to search within code snippet descriptions. For best results, search for a system or an action.

    2

    Topic filter

    Optional filter to search for code snippets in selected GitHub topics.

    3

    Description

    A description of the system and action of the snippet.

    4

    System

    The system on which the action is executed.

    5

    Release

    The release version (always the latest). To see more releases, visit the relevant GitHub repository in Tools4ever BV Github.

    6

    Release date

    The date on which the release was created, i.e. when the code was last changed.

    7

    Copy to clipboard

    A button to copy the code to the clipboard so you can paste it in the code editor and use it in your delegated form task or product action. In the code editor, the code can be changed as desired.



  4. Click on a snippet (in our example "Active Directory - Group get account memberships").

  5. You can now see:

    • The code snippet (the actual code that can be pasted in the code editor) so you can inspect the code before using it.

      DelegatedForm_Code_snippet_library_code.png
    • The readme: a short description of what to expect from this code snippet and what the requirements are.

      DelegatedForm_Code_snippet_library_readme.png
    • Release notes: the changes and bug fixes in the latest release, if available.

      DelegatedForm_Code_snippet_library_release_notes.png
  6. Click on Code snippet.

  7. Click on Copy to clipboard.

  8. Go back to your Powershell editor.

  9. Paste the code inside the editor.

  10. Change the script as desired.

A delegated form task is now configured based on the code snippet from the library.