Skip to main content
Nintex Community Menu Bar

This xtension will add additional useful functions/functionality and connectors to NWC.

I will continue to update this xtension over time, so feel free to bookmark this blog to keep an eye out for new actions and connectors.

 

Included in this version of the toolkit is:

 

  • Decode a Base64 File
  • Encode a Base64 File
  • Working Days Calculation
  • Encode a Base64 String
  • Decode a Base64 String
  • Format DateTime
  • Generate GUID
  • Postgresql Insert
  • Postgresql List Table
  • Add Padding to String
  • Convert String to Lowercase
  • Convert String to Proper
  • Convert String to Uppercase

 

This function is hosted on Nintex’s Marketing Azure host and is free for anyone to use. If you want to host the function in your own azure function or have any suggestions for additional actions, please email andy.hayes@nintex.com

 

 

NWC Tools

 

This xtension is available for download from the Nintex Solution Gallery.

Connectors - Toolkit for NWC. (nintex.com)

 

Working Days Simple Calculation

 

Calculate the working dates between two days. Calculation will remove weekends and US holidays.

 

Input

StartDate: The first date to compare

EndDate: The last date to compare.

 

Return

Result: Number of working days between the first date and last date.

 

Encode a Base64 File

 

21167iC5047C3FEDA33CE2.png

 

 

Input

Result: File

 

Return

Error: If an error is caught, the output will be the error message.

Result: Encoded Base64 String of File.

 

 

Decode a Base64 File

 

21165i6F30110A73E0C23B.png

 

 

Input

Request Content: Base64 Encoded string of File

 

Return

File

 

Encode Base64 String

 

21164iD579BE4B4DEBD5EF.png

 

 

 

 

Input

Request Content: String to encode.

 

Return

Error: If an error is caught, the output will be the display message.

Result: Encoded Base64 String

 

Decode Base64 String

 

21168i3A8CDF32B8E24219.png

 

 

Input

Request Content: Base64 String to Decode

 

Return

Error: If an error is caught, the output will be the display message.

Result: Decoded Base64 String

 

Format DateTime

 

21169i66A77A98B8D81DFF.png

 

 

Input

Date Format: Desired Date Format

Date: Date to format.

 

Return

Error: If an error is caught, the output will be the display message.

Result: Formatted Date

 

Generate Guid

 

21170i0FC5623F566F8F15.png

 

 

 

Return

Result: New GUID

 

Add padding to String

 

21171iC9559BF5CB47B5AF.png

 

 

Input

Request Content: String

Direction: L(or Left) for Left, R(or Right) for Right

Padchar: Desired Character to pad to string

Total Width: Width of padding

 

Return

Error: If an error is caught, the output will be the display message.

Result: Padded String

 

Convert String to Lowercase

 

21172iCDFCFB312D7025B2.png

 

 

Input:

Request Content: String

 

Return

Error: If an error is caught, the output will be the display message.

Result: Converted String

 

Convert String to Proper

 

21173i2CC5C9E15622FB78.png

 

 

Input:

Request Content: String

 

Return

Error: If an error is caught, the output will be the display message.

Result: Converted String

 

Convert String to Uppercase

 

21174iD8E19FDC88864F02.png

 

 

Input:

Request Content: String

 

Return

Error: If an error is caught, the output will be the display message.

Result: Converted String

 

Postgresql Insert New Row

Insert new row into a Postgres Table

 

21176iB386215E3653F90B.png

 

 

Input

 

Password: DB Password

Query: Postgres Query i.e. SELECT * FROM TABLE

ServerHost: Postgresql Host

User: DB Username

DBName: Database Name

Port: Port Number

 

Return

 

Result: Insert Confirmation or Error Message.

 

Postgresql List Table

List 1 column from table

 

21175i6F7676C3C9EFCD5A.png

 

 

Input

 

Password: DB Password

Query: Postgres Query i.e. SELECT * FROM TABLE

ServerHost: Postgresql Host

User: Database Username

DBName: Database Name

Port: Port Number

Targetcolumn: which column to list. (I.e 1 for ID, 2 for column 2)

 

Return

 

Result: List as collection or Error Message.

Hi,



I have added this Xtension and trying out the date formatter.



I have entered the following format: yyyyMMddHHmmss



For input, I am using the context's current date time.



The intent is to get the get it in the following format: 20220131202401



 



The output is not being formatted. Below is the output from the log action.



Date:1/31/2022 8:24:01 PM
Error:



 



Is there something else I need to be doing? 



 





 


That is interesting, I tried the same method in postman and it comes back in the correct format 





{


"result": "20211021210718",


"error": null


}


 


Let me try it from NWC, I'll get back to you shortly.


 


Thanks 



Thanks for that I'll be interested to test out base64 encoding a file and saving into on-premise SQL


Hi Andy,



Any update on the Date Formatter? I ran it again to see if it had been fixed but still getting the same output.



 



Lou


Same here: the date formatter just doesn't work. It's really needed. Can this please be fixed @AndyHayes1 @AndyHayes ?





Comes back with :





 


"Decode a Base64 File" does not allow a file variable to be entered in Result as pictured in the screenshot.  Did something change? 


As we don't have a string length function in NWC, I thought that the 'Total width' of the 'Add Padding to String' function would include the length of the string that the padding is being added to. Unfortunately it is only the total width of the padding. 



 



So it would be great if we either had a string length function or the Add Padding to String - Total width could include the string and the padding. 


Quick question, how can we download the same toolkit but remove the two actions below:

  • Postgresql Insert
  • Postgresql List Table

Quick question, how can we download the same toolkit but remove the two actions below:

  • Postgresql Insert
  • Postgresql List Table

Sorry for the really late reply on this.. To do this, you will need to grab the OpenAPI file, before uploading, or re upload as a new connector, and remove these lines from it

 

"/api/v1.0/PostgresqlInsert": {
"post": {
"tags": "Web"],
"description": "Postgresql Insert new Row",
"operationId": "postgresqlInsert",
"consumes":
"application/json",
"multipart/form-data",
"application/x-www-form-urlencoded"
],
"produces": "application/json"],
"parameters":
{
"name": "Password",
"in": "header",
"description": "Password",
"required": true,
"type": "string",
"x-example": ""
},
{
"name": "Query",
"in": "header",
"description": "Query",
"required": true,
"type": "string",
"x-example": ""
},
{
"name": "ServerHost",
"in": "header",
"description": "ServerHost",
"required": true,
"type": "string",
"x-example": ""
},
{
"name": "User",
"in": "header",
"description": "User",
"required": true,
"type": "string",
"x-example": ""
},
{
"name": "DBName",
"in": "header",
"description": "DBName",
"required": true,
"type": "string",
"x-example": ""
},
{
"name": "Port",
"in": "header",
"description": "Port",
"required": true,
"type": "string",
"x-example": ""
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
}
},
"security": ]
}
},
"/api/v1.0/PostgresqlList": {
"get": {
"tags": "Web"],
"description": "Postgresql List Table",
"operationId": "postgresqlList",
"produces": "application/json"],
"parameters":
{
"name": "Password",
"in": "header",
"description": "Password",
"required": true,
"type": "string",
"x-example": ""
},
{
"name": "Query",
"in": "header",
"description": "Query",
"required": true,
"type": "string",
"x-example": ""
},
{
"name": "ServerHost",
"in": "header",
"description": "ServerHost",
"required": true,
"type": "string",
"x-example": ""
},
{
"name": "User",
"in": "header",
"description": "User",
"required": true,
"type": "string",
"x-example": ""
},
{
"name": "DBName",
"in": "header",
"description": "DBName",
"required": true,
"type": "string",
"x-example": ""
},
{
"name": "Port",
"in": "header",
"description": "Port",
"required": true,
"type": "string",
"x-example": ""
},
{
"name": "Targetcolumn",
"in": "query",
"description": "Targetcolumn",
"required": true,
"type": "string",
"x-example": "1"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"security": ]
}
},

 


I am trying the added “Read Excel” action, but get this error. 

Is there something I am missing?


Reply