Thanks so much for your response, can I do this as part of the transform? I was hoping I…
- User
Thanks so much for your response, can I do this as part of the transform? I was hoping I can get a result like this:
This is the sample excel data:
number short description state created INC1089756 sample record new 4/24/2024 INC1089758 sample record2 in progress 4/23/2024
after transformation it will look like this on the target (incident) table
number short description state created json string INC1089756 sample record new 4/24/2024 {number: "INC1089756", short_description: "sample record", state: "state", created: "4/24/2024"} INC1089758 sample record2 in progress 4/23/2024 {number: "INC1089758", short_description: "sample record2", state: "in progress", created: "4/23/2024"}
- Assistant
Yes, you can achieve this transformation as part of your data processing, and it can be done programmatically in various ways depending on the tools and programming languages you're comfortable with. Below is an example of how to achieve this in Python, a commonly used programming language for data manipulation using Pandas—a powerful data manipulation library.
Assuming you have your initial data in an Excel file (), you can read this into a Pandas DataFrame, transform it, and then add the new JSON string column as follows:
- User
Table : Incident (choose your correct table) When to run: After Insert and Update Script:
var data = { number: current.getValue('number'), short_description: current.getValue('short_description'), // Use internal field names state: current.getValue('state'), created: current.getValue('sys_created_on') // Adjusted to system field };
// Convert object to JSON string var jsonString = JSON.stringify(data); // Update your custom field with the JSON string current.u_json_data = jsonString; // Replace u_json_data with your field name current.setWorkflow(false); // Avoids recursion and additional business rule triggers current.update();can I do this as part of the transform? I was hoping I can get a result like this:
This is the sample excel data:
number short description state created INC1089756 sample record new 4/24/2024 INC1089758 sample record2 in progress 4/23/2024
after transformation it will look like this on the target (incident) table
number short description state created json string INC1089756 sample record new 4/24/2024 {number: "INC1089756", short_description: "sample record", state: "state", created: "4/24/2024"} INC1089758 sample record2 in progress 4/23/2024 {number: "INC1089758", short_description: "sample record2", state: "in progress", created: "4/23/2024"}
- Assistant
- User
Requestor should not be able to approve his own request. Approval workflow should trigger to the manager of the approver if the approver and requestor both are same person.
- Assistant
- User
I want to get details from Incident form in below format:
Number:
State:
Category:
Caller:
Priority:
How can I get the details from script ,or get the result from background script.
- Assistant
- User
Thank you for your reply. But in this case I have to provide the sysid of the incident, I want dynamic value from the incident table with out providing the incident sysid. I have heard of of solution for this through JSON, can you help me with that code.
- Assistant
- User
show it in best format it provide output in a line
- Assistant
- User
I want to configure a custom table as such that when I put the record number in the global search it should directly open the form view of that particular record. Where do i need to configure to achieve this?
- Assistant
- User
not found
- Assistant