Skip to content

Conversation

@sivamuruganandam-coder
Copy link
Contributor

This flow action compares two arrays—existing_array_elements and new_array_elements and separates the items in new_array_elements into two groups:

  • matching_elements: items that already exist in existing_array_elements
  • non_matching_elements: items that do not exist in existing_array_elements
    It loops through each item in new_array_elements, checks for presence using indexOf(), and assigns the results to the outputs object.
    This helps you efficiently classify data for further processing or validation.

Example:
Inputs:
existing_array_elements: ['apple', 'banana'],
new_array_elements: ['banana', 'cherry', 'apple', 'date']

Outputs:
matching_elements: ['banana', 'apple'],
non_matching_elements: ['cherry', 'date']

@github-actions
Copy link

Valid PR for ActionPack

Thank you for your contribution. This PR complies with the CONTRIBUTING.md.
A maintainer will review this shortly. In the meantime, Happy Hacking!

@Atul-LNG Atul-LNG self-assigned this Oct 10, 2025
Copy link

@Atul-LNG Atul-LNG left a comment

Choose a reason for hiding this comment

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

Please add the readme file as well.

@sivamuruganandam-coder
Copy link
Contributor Author

HI @Atul-LNG
In the contribution file, it's mentioned that we shouldn't add anything except sys_hub_action_type_definition_{sys_id}.xml and checksum.txt.

Shouldn't be an issue if i add README.md file?

@Atul-LNG
Copy link

sorry for confusion @sivamuruganandam-coder . I am reviewing it now.

@Atul-LNG Atul-LNG merged commit 82c46ee into ServiceNowDevProgram:main Oct 10, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants