Skip to content

ChristopherCarver/Flow-Utilities

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Flow-Utilities

Misc. ServiceNow Workflow Studio flows, subflows, and actions utilities. These are agnostic solutions and meant as enhancements to ServiceNow delevelopment.

Excel Action Utilities

Excel Get Sheets

About Retrieves the list of worksheets within an Excel file.

Inputs

  • Excel file is a reference to the sys_attachment table. The file needs to an an .xlsx file.
  • Log is a toggle to add a log entry of the resulting outputs.

Outputs

  • Sheets an array of sheet namess found in the Excel file.
  • _Sheet a comma separated string of Sheets.
  • Found is the number of sheets found.
  • Error is true if an error was encoutered; else false.
  • Error message contains the error message if an error was encountered.

Excel Get Sheet

About Retrieves information pertaining to the Excel sheet.

Inputs

  • Excel file is a reference to the sys_attachment table. The file needs to an an .xlsx file.
  • Sheet is the Excel sheet to get information about.
  • Log is a toggle to add a log entry of the resulting outputs.

Outputs

  • Columns an array of column names in the Sheet.
  • _Columns a comma separated string of Columns.
  • Column count is the number of columns in the Sheet.
  • Rows an array of row names in the Sheet.
  • _Rows a comma separated string of Rows.
  • Row count is the number of rows in the Sheet.
  • Error is true if an error was encoutered; else false.
  • Error message contains the error message if an error was encountered.

Excel Get Rows

About Retrieves all of the column and row data from an Excel sheet.

Inputs

  • Excel file is a reference to the sys_attachment table. The file needs to an an .xlsx file.
  • Sheet is the Excel sheet to get information about.
  • Log is a toggle to add a log entry of the resulting outputs.

Outputs

  • Sheet a JSON object containing all of the sheet data.
  • Error is true if an error was encoutered; else false.
  • Error message contains the error message if an error was encountered.

Excel Get Row

About Retrieves all of the column data from an Excel sheet row.

Inputs

  • Excel file is a reference to the sys_attachment table. The file needs to an an .xlsx file.
  • Sheet is the Excel sheet to get information about.
  • Row is the row number to retrieve. Note that rows starts with number of 1.
  • Log is a toggle to add a log entry of the resulting outputs.

Outputs

  • Row a JSON object containing all of the row data.
  • _Row a string represenation of the row data.
  • Found 1 found the row; else 0.
  • Error is true if an error was encoutered; else false.
  • Error message contains the error message if an error was encountered.

Excel Get Cell

About Retrieves specific column and row value from an Excel sheet.

Inputs

  • Excel file is a reference to the sys_attachment table. The file needs to an an .xlsx file.
  • Sheet is the Excel sheet to get information about.
  • Row is the row number to retrieve. Note that rows starts with number of 1.
  • Column is the column name to retrieve.
  • Log is a toggle to add a log entry of the resulting outputs.

Outputs

  • Cell a string of the data at the row and coilumn.
  • Found 1 found the row; else 0.
  • Error is true if an error was encoutered; else false.
  • Error message contains the error message if an error was encountered.

JSON Action Utilities

JSON Set Value

About Inserts or updates a key value in a JSON structure.

Inputs

  • JSON the JSON object.
  • Path a a period delimited string that provides the path where to add the key and value.
  • Key is the string key to insert or update.
  • Value is the string value of the key.
  • Value type re-casts the value to the proper JSON datatype.
  • Log is a toggle to add a log entry of the resulting outputs.

Outputs

  • JSON the new JSON object with the added key and value.
  • Error is true if an error was encoutered; else false.
  • Error message contains the error message if an error was encountered.

JSON Get Values

About Retrieves all of the JSON structure values that match the key.

Inputs

Outputs

  • Values as an array of strings holding all of the values found.
  • Error is true if an error was encoutered; else false.
  • Error message contains the error message if an error was encountered.

JSON Get Value

About Retrieve specific JSON value that match the key.

Inputs

  • JSON the JSON object.
  • Key path is a period delimited string to the key within the JSON object to retrieve the value.
  • Log is a toggle to add a log entry of the resulting outputs.

Outputs

  • Value the string represenation of the value.
  • Value type the typeof the value; note that object is changed to either array or json to distinguish both.
  • Found is true if the value was found; else, false.
  • Error is true if an error was encoutered; else false.
  • Error message contains the error message if an error was encountered.

JSON Get Keys

About Retrieves all of the JSON structure keys.

Inputs

  • JSON the JSON object.
  • Depth is JSON structure depth to traverse. Default is 0 meaning traverse the entire structure.
  • Log is a toggle to add a log entry of the resulting outputs.

Outputs

  • Keys as an array of strings holding all of the keys found.
  • Key paths as an array of strings holding all of period delimited key strings found.
  • Error is true if an error was encoutered; else false.
  • Error message contains the error message if an error was encountered.

JSON to XML

About Converts JSON to XML.

Inputs

  • JSON the JSON object.
  • Log is a toggle to add a log entry of the resulting outputs.

Outputs

  • XML a XML as a XMLDocument2 string.
  • _XML a XML string.
  • Error is true if an error was encoutered; else false.
  • Error message contains the error message if an error was encountered.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published