Skip to content

Conversation

@vhudlikar
Copy link
Contributor

This is a Action that handles the tag creation part of the feature. #6

Inputs needed for this action.

Input Label Name (Internal) Type Description Required
Primary Table primary_table String The name of the main table (e.g., incident). Yes
Primary Table Query primary_query String The encoded query for the primary table (e.g., active=true^priority=1). Yes
Primary Fields primary_fields String Comma-separated list of fields to retrieve from the primary table (e.g., number,short_description). Yes
Primary Join Field primary_join_field String The field on the Primary Table that holds the relationship (e.g., caller_id). Yes
Joined Table joined_table String The name of the table to join (e.g., sys_user). Yes
Joined Join Field joined_join_field String The field on the Joined Table that matches the Primary Join Field (e.g., sys_id). Yes
Joined Table Fields joined_fields String Comma-separated list of fields to retrieve from the joined table (e.g., name,email). Yes
Joined Table Query joined_query String Optional encoded query to filter the joined table data (e.g., active=true). No

Logic

  1. Find Primary Records: The action first looks up all the main records you asked for (e.g., all high-priority Incidents).
  2. Create a Unique Key List: From those main records, it extracts the unique IDs of all related items (e.g., it makes a clean list of all the different Callers involved).
  3. Fetch Related Data: It then uses that unique key list to look up and gather all the necessary fields (e.g., Name and Email) for those related items in one efficient database search.
  4. Merge Data: The action matches the records from Step 1 and the data from Step 3, merging the fields together (e.g., Incident Number + Caller Name) into a single, clean list.
  5. Output as Text: To handle any combination of tables and fields, the final combined list is converted into a JSON text string that can be used by any subsequent step in the flow.

Output

  • Returns the combined, merged data from both tables. This is a JSON string that must be parsed by the consuming flow.

Testing Result:
Before running action below was filter data I took.
image

Below is input given to action:
image

And now final output in JSON string format
image

[ { "number": "INC0010003", "short_description": "Antivirus not working", "name": "Abraham Lincoln", "email": "abraham.lincoln@example.com" }, { "number": "INC0010010", "short_description": "P1 ticket", "name": "Abraham Lincoln", "email": "abraham.lincoln@example.com" }, { "number": "INC0000054", "short_description": "SAP Materials Management is slow or there is an outage", "name": "Christen Mitchell", "email": "christen.mitchell@example.com" }, { "number": "INC0010004", "short_description": "test ticket 2", "name": "Abraham Lincoln", "email": "abraham.lincoln@example.com" }, { "number": "INC0010005", "short_description": "test ticket 1", "name": "Abraham Lincoln", "email": "abraham.lincoln@example.com" }, { "number": "INC0007001", "short_description": "Employee payroll application server is down.", "name": "David Miller", "email": "david.miller@example.com" } ]

@github-actions
Copy link

github-actions bot commented Oct 5, 2025

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!

Copy link
Contributor

@ravichandra1998g ravichandra1998g left a comment

Choose a reason for hiding this comment

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

Hello @vhudlikar ,
Can you please add error evaluation step for this action to make the action more efficient.

Thank you!

@vhudlikar
Copy link
Contributor Author

@ravichandra1998g

Hello @vhudlikar , Can you please add error evaluation step for this action to make the action more efficient.

Thank you!

Ok will do it.
It would be great like what next steps should be followed on this PR and how to get new stuff again commit here or a new PR is fine?

@ravichandra1998g
Copy link
Contributor

I have not closed this PR.
If you can remove the existing file and add the updated one, that's fine.
If it's getting complicated and multiple files getting attached in the PR, you can close this and create a new branch and PR.

Thank you!

@ravichandra1998g
Copy link
Contributor

Closing this PR for now. Please reopen or create a new PR after making necessary changes.

@vhudlikar vhudlikar deleted the 05Oct2025Branch1 branch October 6, 2025 07:28
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