From 21e64d0f15b1043adbf3836f583edd021e7e5dfd Mon Sep 17 00:00:00 2001
From: cortex-lp <86599307+cortex-lp@users.noreply.github.com>
Date: Tue, 19 Sep 2023 11:51:58 +0100
Subject: [PATCH 1/3] Feature/2023.7 add innovation to 7.2 (#48)
Update documentation for Add Innovation to V7.2 (single server)
---
.../single-server-without-ha/prerequisites.md | 2 +-
.../single-server-without-ha/prerequisites.md | 2 +-
.../Reference/troubleshooting/installation.md | 84 ++++++++++
.../multiple-server-with-ha/architecture.md | 17 +-
.../install-web-application-server.md | 24 ++-
.../multiple-server-with-ha/prerequisites.md | 148 ++++++++----------
.../install-web-application-server.md | 6 +-
.../single-server-without-ha/prerequisites.md | 123 +++++++--------
.../single-server-without-ha/try-it-out.md | 8 +-
.../install-web-application-server.md | 6 +-
.../install-web-application-server.md | 6 +-
.../single-server-without-ha/try-it-out.md | 6 +-
data/urls.toml | 2 +
13 files changed, 256 insertions(+), 178 deletions(-)
diff --git a/content/en/docs/2023.3/getting-started/on-premise/add-innovation-to-72/single-server-without-ha/prerequisites.md b/content/en/docs/2023.3/getting-started/on-premise/add-innovation-to-72/single-server-without-ha/prerequisites.md
index 079c1ea1a..6360eae43 100644
--- a/content/en/docs/2023.3/getting-started/on-premise/add-innovation-to-72/single-server-without-ha/prerequisites.md
+++ b/content/en/docs/2023.3/getting-started/on-premise/add-innovation-to-72/single-server-without-ha/prerequisites.md
@@ -54,7 +54,7 @@ To get a licence file and feature identifier take the following steps:
Please also include a suitable {{% ctx %}} Innovation feature identifier.
```
-1. Extract `Cortex Innovation 2022.9 - Licence Fingerprint Generator.zip`.
+1. Extract `Cortex Innovation {{< version >}} - Licence Fingerprint Generator.zip`.
1. From that folder, copy `Cortex.Licensing.FingerprintGeneration.exe` to the server.
1. Double-click `Cortex.Licensing.FingerprintGeneration.exe` to run it. A command line window will appear, containing a machine identifier and fingerprint, e.g:
diff --git a/content/en/docs/2023.5/getting-started/on-premise/add-innovation-to-72/single-server-without-ha/prerequisites.md b/content/en/docs/2023.5/getting-started/on-premise/add-innovation-to-72/single-server-without-ha/prerequisites.md
index 079c1ea1a..6360eae43 100644
--- a/content/en/docs/2023.5/getting-started/on-premise/add-innovation-to-72/single-server-without-ha/prerequisites.md
+++ b/content/en/docs/2023.5/getting-started/on-premise/add-innovation-to-72/single-server-without-ha/prerequisites.md
@@ -54,7 +54,7 @@ To get a licence file and feature identifier take the following steps:
Please also include a suitable {{% ctx %}} Innovation feature identifier.
```
-1. Extract `Cortex Innovation 2022.9 - Licence Fingerprint Generator.zip`.
+1. Extract `Cortex Innovation {{< version >}} - Licence Fingerprint Generator.zip`.
1. From that folder, copy `Cortex.Licensing.FingerprintGeneration.exe` to the server.
1. Double-click `Cortex.Licensing.FingerprintGeneration.exe` to run it. A command line window will appear, containing a machine identifier and fingerprint, e.g:
diff --git a/content/en/docs/2023.7/Reference/troubleshooting/installation.md b/content/en/docs/2023.7/Reference/troubleshooting/installation.md
index 6f07e3ce7..f3946c1a6 100644
--- a/content/en/docs/2023.7/Reference/troubleshooting/installation.md
+++ b/content/en/docs/2023.7/Reference/troubleshooting/installation.md
@@ -159,6 +159,89 @@ To work around this error, either uninstall the platform and reinstall it using
Check that the `Feature Flags` Guid in the `CortexGateway.SetParameters.xml` file used for installing {{% ctx %}} Gateway is correct. If it is not, update it and reinstall {{% ctx %}} Gateway or update the value in the `web.config` file and restart the website. If the value is correct, please contact [{{% ctx %}} Service Portal][CORTEX Service Portal] for assistance.
+### {{% ctx %}} Innovation blocks not visible in {{% ctx %}} Studio {#ts-no-blocks}
+
+#### Application Pool user does not have Modify rights to the Roaming folder
+
+The `Roaming` folder requires `Modify` permission to allow creating the `NuGet` folders and its `NuGet.Config` file within.
+
+There are 2 locations where the `Roaming` folders needs `Modify` rights:
+
+* `C:\Windows\System32\config\systemprofile\AppData`
+* `C:\Windows\SysWOW64\config\systemprofile\AppData`
+
+For each `Roaming` location, perform the following steps:
+
+1. Navigate to the `AppData` folder.
+1. Right-click on the `Roaming` folder and click `Properties`.
+1. In the dialog, click the `Security` tab.
+1. Check the `Application Pool` user for Gateway is listed in the `Group or user names` and has `Modify` permissions.
+1. If the `Application Pool` user for Gateway is not listed:
+ 1. Click the `Edit...` button.
+ 1. Click the `Add...` button.
+ 1. Enter the username of the application pool user and click `OK`.
+ 1. In the `Permissions` section at the bottom, check `Modify`.
+ 1. Click `OK`.
+ 1. Click `Yes` to change the permission to the folder.
+1. If the `Application Pool` user for Gateway is listed but does not have permissions:
+ 1. Click the `Edit...` button.
+ 1. Select the `Application Pool` user.
+ 1. Check `Modify`.
+ 1. Click `OK`.
+ 1. Click `Yes` to change the permission to the folder.
+
+#### Application Pool user does not have rights to the Cortex Blocks Provider Host folder
+
+Perform the following steps:
+
+1. Navigate to `C:\ProgramData\Cortex`
+1. Right-click on the `Cortex Blocks Provider Host` folder and click `Properties`.
+1. In the dialog, click the `Security` tab.
+1. Check the `Application Pool` user for Gateway is listed in the `Group or user names` and has `Modify` permissions.
+1. If the `Application Pool` user for Gateway is not listed:
+ 1. Click the `Edit...` button.
+ 1. Click the `Add...` button.
+ 1. Enter the username of the application pool user and click `OK`.
+ 1. In the `Permissions` section at the bottom, check `Modify`.
+ 1. Click `OK`.
+1. If the `Application Pool` user for Gateway is listed but does not have permissions:
+ 1. Click the `Edit...` button.
+ 1. Select the `Application Pool` user.
+ 1. Check `Modify`.
+ 1. Click `OK`.
+
+#### Perform an IIS reset
+
+1. Open a Windows PowerShell (x64) window as administrator.
+1. Run the following command: `iisreset`.
+1. Wait for the action to complete.
+
+### Flow not starting in {{< ctx >}} Gateway {#ts-flow-not-starting}
+
+#### Application Pool user does not have rights to the Repo folder
+
+Check that the `Application Pool` user has rights to the `Repo` folder using the following steps:
+
+1. Check where the `Repo` folder is located
+ 1. Navigate to the `gateway` IIS folder (usually `%SystemDrive%\inetpub\wwwroot\Cortex\gateway`, e.g. `C:\inetpub\wwwroot\Cortex\gateway`)
+ 1. Open the `web.config` file.
+ 1. Find the value of the `connectionString` named `CortexRepositories`
+1. Navigate to the `Repo` folder, not opening it.
+1. Right-click on the `Repo` folder and click `Properties`.
+1. In the dialog, click the `Security` tab.
+1. Check the `Application Pool` user for Gateway is listed in the `Group or user names` and has `Modify` permissions.
+1. If the `Application Pool` user for Gateway is not listed:
+ 1. Click the `Edit...` button.
+ 1. Click the `Add...` button.
+ 1. Enter the username of the application pool user and click `OK`.
+ 1. In the `Permissions` section at the bottom, check `Modify`.
+ 1. Click `OK`.
+1. If the `Application Pool` user for Gateway is listed but does not have permissions:
+ 1. Click the `Edit...` button.
+ 1. Select the `Application Pool` user.
+ 1. Check `Modify`.
+ 1. Click `OK`.
+
### Cannot publish a package {#ts-no-publish}
Check that the `Service Fabric Api Gateway Endpoint`, `Service Fabric Using Self Signed Certificates`, `Service Fabric ApiGateway Basic Auth Username` and `Service Fabric ApiGateway Basic Auth Password` in the `CortexGateway.SetParameters.xml` file used for installing {{% ctx %}} Gateway are correct. If any of them are not, update them and reinstall {{% ctx %}} Gateway or update the value in the "web.config" file and restart the website. If the value is correct, please contact [{{% ctx %}} Service Portal][CORTEX Service Portal] for assistance.
@@ -254,3 +337,4 @@ If this occurs on your server it is important to update your certificates as soo
[CORTEX Service Portal]: {{< url path="Cortex.ServicePortal.MainDoc" >}}
[Rollover Certificates]: {{< url path="Cortex.GettingStarted.OnPremise.InstallInnovationOnly.Advanced.RolloverCertificates" >}}
+[add rights to nuget folder]: {{< ref "#ts-add-rights-to-nuget-folder" >}}
diff --git a/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/multiple-server-with-ha/architecture.md b/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/multiple-server-with-ha/architecture.md
index 698ebd2ba..3438fa8a0 100644
--- a/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/multiple-server-with-ha/architecture.md
+++ b/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/multiple-server-with-ha/architecture.md
@@ -25,10 +25,10 @@ The installation process is the same, regardless of which architecture is used;
The recommended architecture for adding Innovation to a v7.2 Dual Site, Dual Server system requires 8 servers in total; the 4 existing servers, plus 4 new servers:
-* 2x Existing Application Servers for v7.2, one of these will also act as the Web Application Server for Innovation. For Innovation, the existing Gateway will be upgraded.
-* 2x Existing Database Servers, used for v7.2 and Gateway databases.
-* 1x New Load Balancer Server for Innovation.
-* 3x New Application Servers for Innovation.
+* 2x Existing Application Servers for v7.2, one of these will also act as the Web Application Server for Innovation. For Innovation, the existing Gateway will be upgraded and a new Debug Node will be added
+* 2x Existing Database Servers, used for v7.2 and Gateway databases
+* 1x New Load Balancer Server for Innovation
+* 3x New Application Servers for Innovation
{{< figure src="/images/editable/Cortex Innovation and v7.2 Best Architecture.png" class="centre" title="8 Server, Recommended Architecture Diagram" >}}
@@ -36,11 +36,12 @@ The recommended architecture for adding Innovation to a v7.2 Dual Site, Dual Ser
### Minimum Architecture
-The minimum architecture requires only the 4 existing servers:
+The minimum architecture requires 5 servers:
-* 2x Application Servers for v7.2, each of these will also host one of the three Application Servers for Innovation.
-* 1x Database Server for v7.2, which will also host the remaining Application Server for Innovation.
-* 1x Database Server for v7.2, which will also host the Load Balancer for Innovation.
+* 1x Web Application Server, which contains Gateway. For Innovation, the existing Gateway will be upgraded a new Debug Node will be added
+* 2x Application Servers for v7.2, each of these will also host one of the three Application Servers for Innovation
+* 1x Database Server for v7.2, which will also host the remaining Application Server for Innovation
+* 1x Database Server for v7.2, which will also host the Load Balancer for Innovation
{{< figure src="/images/editable/Cortex Innovation and v7.2 Min Architecture.png" class="centre" title="4 Server, Minimum Architecture Diagram" >}}
diff --git a/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/multiple-server-with-ha/install-web-application-server.md b/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/multiple-server-with-ha/install-web-application-server.md
index e29eb1603..e9da93e16 100644
--- a/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/multiple-server-with-ha/install-web-application-server.md
+++ b/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/multiple-server-with-ha/install-web-application-server.md
@@ -11,10 +11,15 @@ This guide describes how to upgrade Gateway on v7.2 to include Innovation. Pleas
The steps to add Innovation functionality to 7.2 are:
+1. Install local instance of the Application Server components
1. Upgrade {{% ctx %}} Gateway
## Make Installation Artefacts Available
+{{% alert title="Note" %}}
+We recommend that the single-node Service Fabric instance, used by {{% ctx %}} Gateway as a Debugger instance, and {{% ctx %}} Gateway are installed on the same Web Application Server.
+{{% /alert %}}
+
1. Copy the following artefacts to a folder on the machine:
* Cortex Innovation {{< version >}} - Block Packages.zip
@@ -45,7 +50,17 @@ A Friendly Name should be assigned to the certificate being used for the Cortex
1. On the `General` tab in the `Friendly Name` text box, enter a name to be used for the certificate.
1. Click `OK`.
-## Perform Installation
+## Perform Debugger Installation
+
+{{% alert title="Important" color="warning" %}}
+{{< ctx >}} Gateway requires a local instance of the Application Server components to enable the debugging of flows.
+{{% /alert %}}
+
+### Install Debugger
+
+To install the components required for debugging, perform the steps detailed in [Install Application Server][] on the Web Application Server.
+
+## Perform Gateway Installation
### Configure {{% ctx %}} Gateway Installation Script
@@ -86,9 +101,9 @@ A Friendly Name should be assigned to the certificate being used for the Cortex
|`ServiceFabricApiGatewayBasicAuthUsername` | This must be changed if you used a non-default `ApiGatewayBasicAuthUsername` when [installing the Application Servers][Configure Installation Script]; if so, this value must be configured to the one used.
This will overwrite the `ServiceFabricApiGatewayBasicAuthUsername` value in the {{% ctx %}} Gateway web.config.|
|`ServiceFabricApiGatewayBasicAuthPassword` | This must be changed if you used a non-default `ApiGatewayBasicAuthPassword` when [installing the Application Servers][Configure Installation Script]; if so, this value must be configured to the one used. It can be [{{% ctx %}} Encrypted][CORTEX Encrypted].
This will overwrite the `ServiceFabricApiGatewayBasicAuthPassword` value in the {{% ctx %}} Gateway web.config.|
|`DotNetFlowDebuggerEndpoint` | Replace `server.domain.com` with the fully qualified domain name of the Web Application Server.
This will overwrite the `DotNetFlowDebuggerEndpoint` value in the {{% ctx %}} Gateway web.config.|
- |`DotNetFlowDebuggerBasicAuthUsername` | This must be changed if you used a non-default `FlowDebuggerBasicAuthUsername`; if so, this value must be configured to the one used.
This will overwrite the `DotNetFlowDebuggerBasicAuthUsername` value in the {{% ctx %}} Gateway web.config.|
- |`DotNetFlowDebuggerBasicAuthPassword` | This must be changed if you used a non-default `FlowDebuggerBasicAuthPassword`; if so, this value must be configured to the one used. It can be [{{% ctx %}} Encrypted][CORTEX Encrypted].
This will overwrite the `DotNetFlowDebuggerBasicAuthPassword` value in the {{% ctx %}} Gateway web.config.|
- |`DotNetFlowDebuggerUsingSelfSignedCertificates` | Configure the value as `$false` if you are using valid CA certificates to secure the site containing {{% ctx %}} Gateway, `$true` if using self-signed certificates.
This will overwrite the `DotNetFlowDebuggerUsingSelfSignedCertificates` value in the {{% ctx %}} Gateway web.config.|
+ |`DotNetFlowDebuggerBasicAuthUsername` | This must be changed if you used a non-default `ApiGatewayBasicAuthUsername` when [installing the Debugger on the Web Application Server][Install Application Server]; if so, this value must be configured to the one used.
This will overwrite the `DotNetFlowDebuggerBasicAuthUsername` value in the {{% ctx %}} Gateway web.config.|
+ |`DotNetFlowDebuggerBasicAuthPassword` | This must be changed if you used a non-default `ApiGatewayBasicAuthPassword` when [installing the Debugger on the Web Application Server][Install Application Server]; if so, this value must be configured to the one used. It can be [{{% ctx %}} Encrypted][CORTEX Encrypted].
This will overwrite the `DotNetFlowDebuggerBasicAuthPassword` value in the {{% ctx %}} Gateway web.config.|
+ |`DotNetFlowDebuggerUsingSelfSignedCertificates` | Configure the value as `$false` if you are using valid CA certificates to secure the communication between {{% ctx %}} Gateway and the Debugger, `$true` if using self-signed certificates.
This will overwrite the `DotNetFlowDebuggerUsingSelfSignedCertificates` value in the {{% ctx %}} Gateway web.config.|
|`GatewayApplicationPoolUsername` | Replace `Domain\Username` with the user that is used to run the {{% ctx %}} Gateway application pool currently.|
|`WebRootFolder` | Replace this with the correct path for the Web Root Folder on the server. Typically this will be `C:\inetpub\wwwroot`.|
|`WebsitePort` | Replace this with the port that you wish the website to use. Typically this will be `443`.|
@@ -153,3 +168,4 @@ Ensure that the installation files are backed up or kept on the server, especial
[Licensing Requirements]: {{< url path="Cortex.GettingStarted.OnPremise.AddInnovationTo72.MultipleServerWithHA.LicensingRequirements" >}}
[Security Best Practices]: {{< url path="Cortex.GettingStarted.OnPremise.InstallInnovationOnly.Advanced.SSLBestPractices" >}}
[Try it out]: {{< url path="Cortex.GettingStarted.OnPremise.AddInnovationTo72.MultipleServerWithHA.TryItOut" >}}
+[Install Application Server]: {{< url path="Cortex.GettingStarted.OnPremise.AddInnovationTo72.SingleServerWithoutHA.InstallApplicationServer" >}}
\ No newline at end of file
diff --git a/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/multiple-server-with-ha/prerequisites.md b/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/multiple-server-with-ha/prerequisites.md
index 0f0eb74f7..5f8bc87c8 100644
--- a/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/multiple-server-with-ha/prerequisites.md
+++ b/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/multiple-server-with-ha/prerequisites.md
@@ -25,7 +25,7 @@ Use these hardware requirements if using the [Recommended Architecture][].
|------------------|-----------------------|-----------------------------------|---------------|----------------------|
| New Innovation Load Balancer | 1[^1] | 4+ *Recommended*
2 *Minimum* | 8+ *Recommended*
4 *Minimum* | 50+ *Recommended*
30 *Minimum*
5+ free on installation drive |
| New Innovation Application Server | 3 *Bronze availability*[^2]
5 *Silver availability*
7 *Gold availability*
9 *Platinum availability* | 4+ *Recommended*
2 *Minimum* | 16+ *Recommended*
8 *Minimum* | 75+ *Recommended*
60 *Minimum*
40+ free on %ProgramData% drive |
-| Existing V7.2 Application Server with Gateway
+ Upgrade to Innovation Web Application Server | 1 | 4+ *Recommended*
2 *Minimum* | 8+ *Recommended*
4 *Minimum* | 75+ *Recommended*
50 *Minimum*
30+ free on installation drive |
+| Existing V7.2 Application Server with Gateway
+ Upgrade to Innovation Web Application Server | 1 | 8+ *Recommended*
4 *Minimum* | 24+ *Recommended*
16 *Minimum* | 225+ *Recommended*
150 *Minimum*
30+ free on installation drive
40+ free on %ProgramData% drive |
### Minimum Architecture
@@ -35,8 +35,8 @@ Use these hardware requirements if using the [Minimum Architecture][] and instal
|------------------|-----------------------|-----------------------------------|---------------|----------------------|
| Existing V7.2 Database Server
+ Innovation Load Balancer| 1[^1] | 4+ *Recommended*
4 *Minimum* | 8+ *Recommended*
4 *Minimum* | 300+ *Recommended*
70 *Minimum*
5+ free on installation drive |
| Existing V7.2 Database Server
+ Innovation Application Server | 1 | 4+ *Recommended*
4 *Minimum* | 16+ *Recommended*
12 *Minimum* | 300+ *Recommended*
100 *Minimum*
40+ free on %ProgramData% drive|
-| Existing V7.2 Application Server
+ Innovation Application Server | 1 | 4+ *Recommended*
4 *Minimum* | 16+ *Recommended*
12 *Minimum* | 120+ *Recommended*
100 *Minimum*
40+ free on %ProgramData% drive|
-| Existing V7.2 Application Server with Gateway
+ Innovation Application Server
+ Upgrade to Innovation Web Application Server | 1 | 4+ *Recommended*
4 *Minimum* | 16+ *Recommended*
12 *Minimum* | 120+ *Recommended*
100 *Minimum*
30+ free on installation drive
40+ free on %ProgramData% drive |
+| Existing V7.2 Application Server
+ Innovation Application Server | 2 | 4+ *Recommended*
4 *Minimum* | 16+ *Recommended*
12 *Minimum* | 120+ *Recommended*
100 *Minimum*
40+ free on %ProgramData% drive|
+| Existing or New Application Server with Gateway
+ Innovation Application Server
+ Upgrade to Innovation Web Application Server | 1 | 4+ *Recommended*
2 *Minimum* | 12+ *Recommended*
8 *Minimum* | 120+ *Recommended*
100 *Minimum*
30+ free on installation drive
40+ free on %ProgramData% drive |
[^1]: A software-based load balancer called [gobetween][] is provided with the platform. This must be installed on its own server as it doesn't support routing traffic to itself. It also doesn't currently support HA, but it may be possible to use multiple gobetween load balancers with Anycast network addressing and routing to provide high availability, as described in [https://en.wikipedia.org/wiki/Anycast][Anycast]; however, this has not been verified yet. It is possible to use an [alternative load balancer][] to the one provided.
[^2]: Application Servers support HA via clustering. A cluster must consist of a minimum of 3 nodes, and the number of nodes must be an odd number to ensure a quorum. Currently only the Bronze availability (3 nodes) is supported. Silver, Gold and Platinum support will be added in future.
@@ -70,6 +70,24 @@ This table displays the additional resources required when adding an Innovation
All servers must be on the same domain and cannot be domain controllers.
+## Active Directory Requirements
+
+For Gateway, only Windows domains with an Active Directory domain controller running Active Directory Domain Services are supported.
+
+Supported versions of Active Directory are listed below:
+
+| Version | Verified? | Supported From | Supported Until |
+|----------------------------|----------------|----------------|------------------|
+| Windows Server 2003 | ✓ | {{% ctx %}} v2022.9 | To be evaluated |
+| Windows Server 2003 R2 | | {{% ctx %}} v2022.9 | To be evaluated |
+| Windows Server 2008 | | {{% ctx %}} v2022.9 | To be evaluated |
+| Windows Server 2008 R2 | ✓ | {{% ctx %}} v2022.9 | To be evaluated |
+| Windows Server 2012 | | {{% ctx %}} v2022.9 | To be evaluated |
+| Windows Server 2012 R2 | ✓ | {{% ctx %}} v2022.9 | To be evaluated |
+| Windows Server 2016 | ✓ | {{% ctx %}} v2022.9 | To be evaluated |
+| Windows Server 2019 | | {{% ctx %}} v2022.9 | To be evaluated |
+| Windows Server 2022 | | {{% ctx %}} v2022.9 | To be evaluated |
+
## DNS Requirements
The installation requires IP to hostname resolution to be available. Please ensure that you have the appropriate pointer (PTR) records configured on the DNS server for all of your servers (Web, Application and Load Balancer).
@@ -133,35 +151,14 @@ Gateway supports the latest versions of the following browsers:
* Edge
* Firefox
-## Additional Load Balancer Server Requirements
-
-### Filesystem Requirements
-If using the included [gobetween][] load balancer, Network Discovery and File Sharing must be enabled on the Load Balancer Server:
-
-1. Open File Explorer.
-1. Click `Network` on the left.
-1. A banner similar to the following will appear if Network Discovery and File Sharing is turned off:
- {{< figure src="/images/Network Discovery 1.png" title="Network and File Discovery Disabled" >}}
-1. Click the banner.
-1. Click `Turn on network discovery and file sharing`:
- {{< figure src="/images/Network Discovery 2.png" title="Enable Network and File Discovery" >}}
+## Filesystem Requirements
-### Alternative Load Balancer Requirements
+The Web Application Server, each Application Server and [gobetween][] Load Balancer Server (if used) must:
-Innovation has a [gobetween][] load balancer included that isn't highly available; It is possible to use an alternative. The requirements for installing an alternative load balancer are as follows:
+* use an NTFS filesystem.
+* enable Network Discovery and File Sharing
-* Must support a round robin (or similar) method of load balancing to specified ports on 3 nodes.
-* Must be able to health check each node by running a predefined batch script (`ApiGatewayTypeHealthcheck.bat`, which resides in the `gobetween` folder of the `Cortex Innovation {{< version >}} - App Server Install Scripts`) that returns 1 for healthy and 0 for unhealthy.
-* Must be able to access each of the Application Servers via HTTPS.
-* Ideally it should be highly available to avoid a single point of failure in the system.
-
-## Additional Application Server Requirements
-
-### Filesystem Requirements
-
-All Application Servers must use an NTFS filesystem.
-
-Network Discovery and File Sharing should be enabled on each Application Server:
+To enable Network Discovery and File Sharing:
1. Open File Explorer.
1. Click `Network` on the left.
@@ -171,23 +168,23 @@ Network Discovery and File Sharing should be enabled on each Application Server:
1. Click `Turn on network discovery and file sharing`:
{{< figure src="/images/Network Discovery 2.png" title="Enable Network and File Discovery" >}}
-### Service Requirements
+## Service Requirements
-The following Windows Services must be running on all Application Servers:
+On the Web Application Server and each Application Server, the following Windows Services must be running:
* Remote Registry
* Windows Event Log
* Performance Logs & Alerts
-### Security Requirements
+## Security Requirements
-#### Installation User
+### Installation User
-A domain user which is a member of the Local Administrators group on all Application Servers and Load Balancer Server must be available to run the installation scripts. This is a prerequisite of Microsoft Service Fabric, which is the HA platform that {{% ctx %}} Innovation is built upon.
+On all Application Servers, Web Application Server and Load Balancer Server, a domain user, which is a member of the Local Administrators group, must be available to run the installation scripts. This is a prerequisite of Microsoft Service Fabric, which is the HA platform that {{% ctx %}} Innovation is built upon.
-#### Antivirus Exclusions
+### Antivirus Exclusions
-It is advised (by Microsoft Service Fabric) that the following antivirus exclusions are created on each Application Server to reduce antivirus processing on Service Fabric artefacts:
+It is advised (by Microsoft Service Fabric) that the following antivirus exclusions are created on the Web Application Server and each Application Server to reduce antivirus processing on Service Fabric artefacts:
Folder Exclusions:
@@ -214,15 +211,19 @@ A script is provided during installation to add these exclusions for Windows Def
If adding the exclusions manually, the Process Exclusions should be done before installation occurs, as the processes will be used during installation of the application and antivirus software can cause the installation to fail or timeout. Folder Exclusions may need to be added after installation has occurred as some antivirus software needs the folders to exist.
-#### Port Requirements
+### Port Requirements
{{% ctx %}} Innovation and Microsoft Service Fabric require a range of [firewall ports to be opened][Port Requirements] between the servers and specific services.
If you are using Windows Firewall, some ports are opened during installation and others are opened dynamically as needed. If any other firewall is used, it will be necessary to add the rules described in [Port Requirements][] to open the correct ports.
-The `Cortex.Innovation.Test.PortUsage.ps1` script is provided during installation to test the ports on each Application Server and make sure they do not overlap with any other programs; most ports may be altered if this is the case, the description will say if this is not possible.
+The `Cortex.Innovation.Test.PortUsage.ps1` script is provided during installation to test the ports on the Web Application Server and each Application Server and make sure they do not overlap with any other programs; most ports may be altered if this is the case, the description will say if this is not possible.
+
+### Certificate Requirements
-#### Certificate Requirements
+{{< alert title="Important" color="warning" >}}It is critical to set a reminder to {{< ahref path="Cortex.GettingStarted.OnPremise.InstallInnovationOnly.Advanced.RolloverCertificates" title="update certificates" >}} in good time before they expire. If they expire then the platform will cease to function and {{< ahref path="Cortex.ServicePortal.MainDoc" title="CORTEX Service Portal" >}} must be contacted for support.{{< /alert >}}
+
+#### Application Servers
{{% alert title="Note" %}}
For production systems it is recommended that X.509 SSL wildcard certificates are obtained from a Certificate Authority and used for installation. For non-production systems, certificates can be omitted from installation and it will create and use self-signed certificates. This may prevent 3rd parties that require valid certificate verification to access the API Gateway Service.
@@ -250,42 +251,7 @@ This file should be placed in a known location on the Application Server where t
If required, a separate X.509 SSL certificate can be obtained to be used by the load balancer to communicate with the Application Services. It must meet all of the other requirements laid out above, except the subject field can also be the FQDN of the load balancer (e.g. `CN=machine-name.domain.com`).
-#### TLS Requirements
-
-There is a set of non-compulsory security measures, recommended to be applied to the Application Servers, in order to prevent potential attacks that exploit known industry security vulnerabilities. This includes disabling all versions of SSL and TLS apart from TLS 1.2. And disabling all cipher suites apart from the following:
-
-* TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
-* TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
-
-See [SSL Best Practices][] for a full list of the security changes which will be applied. The `Cortex.Innovation.Install.Multiple.SSLBestPractices.ps1` script is provided during installation to apply these security changes to the Application Servers.
-
-## Additional Web Application Server Requirements
-
-### Security Requirements
-
-#### Installation User
-
-A domain user must be available to run the Application Pools for Gateway. This user must be given `Log on as a service` and `Log on as a batch job` permissions otherwise the Application Pools will not be able to run. Information about how to do this will be given during installation.
-
-#### Domain Requirements
-
-For Gateway, only Windows domains with an Active Directory domain controller running Active Directory Domain Services are supported.
-
-Supported versions of Active Directory are listed below:
-
-| Version | Verified? | Supported From | Supported Until |
-|----------------------------|----------------|----------------|------------------|
-| Windows Server 2003 | ✓ | {{% ctx %}} v2022.9 | To be evaluated |
-| Windows Server 2003 R2 | | {{% ctx %}} v2022.9 | To be evaluated |
-| Windows Server 2008 | | {{% ctx %}} v2022.9 | To be evaluated |
-| Windows Server 2008 R2 | ✓ | {{% ctx %}} v2022.9 | To be evaluated |
-| Windows Server 2012 | | {{% ctx %}} v2022.9 | To be evaluated |
-| Windows Server 2012 R2 | ✓ | {{% ctx %}} v2022.9 | To be evaluated |
-| Windows Server 2016 | ✓ | {{% ctx %}} v2022.9 | To be evaluated |
-| Windows Server 2019 | | {{% ctx %}} v2022.9 | To be evaluated |
-| Windows Server 2022 | | {{% ctx %}} v2022.9 | To be evaluated |
-
-#### Certificate Requirements
+#### Web Application Server
{{% ctx %}} Gateway requires an X.509 SSL certificate to be installed on the Web Application Server. The certificate must have the following properties:
@@ -294,24 +260,42 @@ Supported versions of Active Directory are listed below:
If the user tries to navigate to an address not in the SAN list, then they will receive a certificate error.
-Wildcard certificates and self-signed certificates can also be used. However, self-signed certificates are not recommended for production instances. Details on how to create a self-signed certificate can be found at [Create Self-Signed Certificates][].
-
-The certificate may be the same one used for the Application Server installation.
+{{% alert title="Important" color="warning" %}}
+Do not reuse any auto-generated self-signed certificates as they do not meet the requirements for Gateway.
+
+Certificates, wildcard certificates and manually created self-signed certificates can be used. However, the latter are not recommended for production instances.
+Details on how to create a self-signed certificate can be found at {{< ahref path="Cortex.GettingStarted.OnPremise.InstallInnovationOnly.Advanced.CreateSelfSignedCertificates" title="Create Self-Signed Certificates" >}}.
+{{% /alert %}}
More information about importing the certificate is given during installation.
-#### TLS Requirements
+### TLS Requirements
-There is a set of non-compulsory security measures, recommended to be applied to the Web Application Server, in order to prevent potential attacks that exploit known industry security vulnerabilities. This includes disabling all versions of SSL and TLS apart from TLS 1.2. And disabling all cipher suites apart from the following:
+There is a set of non-compulsory security measures, recommended to be applied to the Web Application Server and each Application Server, in order to prevent potential attacks that exploit known industry security vulnerabilities. This includes disabling all versions of SSL and TLS apart from TLS 1.2. And disabling all cipher suites apart from the following:
* TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
-See [SSL Best Practices][] for a full list of the security changes which will be applied. The `Cortex.Innovation.Install.SSLBestPractices.ps1` script is provided during installation to apply these security changes to the Web Application Server.
+See [SSL Best Practices][] for a full list of the security changes which will be applied.
+
+A script is provided during installation to apply these security changes:
+
+* For the Application servers: `Cortex.Innovation.Install.Multiple.SSLBestPractices.ps1`
+* For the Web Application Server: `Cortex.Innovation.Install.SSLBestPractices.ps1`
+
+## Alternative Load Balancer Requirements
+
+Innovation has a [gobetween][] load balancer included that isn't highly available; It is possible to use an alternative. The requirements for installing an alternative load balancer are as follows:
+
+* Must support a round robin (or similar) method of load balancing to specified ports on 3 nodes.
+* Must be able to health check each node by running a predefined batch script (`ApiGatewayTypeHealthcheck.bat`, which resides in the `gobetween` folder of the `Cortex Innovation {{< version >}} - App Server Install Scripts`) that returns 1 for healthy and 0 for unhealthy.
+* Must be able to access each of the Application Servers via HTTPS.
+* Ideally it should be highly available to avoid a single point of failure in the system.
## Next Steps?
Application Servers and Load Balancer server are installed in the same way regardless of whether new or existing hardware is being used:
+
1. [Install Application Servers and Load Balancer][]
[Port Requirements]: {{< url path="Cortex.GettingStarted.OnPremise.InstallInnovationOnly.Advanced.PortRequirements" >}}
@@ -321,7 +305,6 @@ Application Servers and Load Balancer server are installed in the same way regar
[Recommended Architecture]: {{< url path="Cortex.GettingStarted.OnPremise.AddInnovationTo72.MultipleServerWithHA.RecommendedArchitecture" >}}
[Minimum Architecture]: {{< url path="Cortex.GettingStarted.OnPremise.AddInnovationTo72.MultipleServerWithHA.MinimumArchitecture" >}}
[Alternative Architectures]: {{< url path="Cortex.GettingStarted.OnPremise.AddInnovationTo72.MultipleServerWithHA.AlternativeArchitectures" >}}
-[Create Self-Signed Certificates]: {{< url path="Cortex.GettingStarted.OnPremise.InstallInnovationOnly.Advanced.CreateSelfSignedCertificates" >}}
[SSL Best Practices]: {{< url path="Cortex.GettingStarted.OnPremise.InstallInnovationOnly.Advanced.SSLBestPractices" >}}
[gobetween]: {{< url path="GoBetween.MainDoc" >}}
[CORTEX Service Portal]: {{< url path="Cortex.ServicePortal.MainDoc" >}}
@@ -336,7 +319,6 @@ Application Servers and Load Balancer server are installed in the same way regar
[IIS Url Rewrite]: {{< url path="IIS.Downloads.UrlRewrite-2_1" >}}
[Web Deploy]: {{< url path="MSDownload.WebDeploy" >}}
[C++ Redistributable]: {{< url path="MSDownload.CPlusPlusRedistributable.2013" >}}
-[Requirements For Minimum Architecture]: {{< ref "#minimum-architecture" >}}
[Requirements For Recommended Architecture]: {{< ref "#recommended-architecture" >}}
[Requirements For Alternative Architectures]: {{< ref "#alternative-architectures" >}}
[Transparent Data Encryption]: {{< url path="MSDocs.SqlServer.TransparentDataEncryption" >}}
diff --git a/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/single-server-without-ha/install-web-application-server.md b/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/single-server-without-ha/install-web-application-server.md
index cdd6b50be..cb36dc6ab 100644
--- a/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/single-server-without-ha/install-web-application-server.md
+++ b/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/single-server-without-ha/install-web-application-server.md
@@ -87,9 +87,9 @@ A Friendly Name should be assigned to the certificate being used for the Cortex
|`ServiceFabricApiGatewayBasicAuthUsername` | This must be changed if you used a non-default `ApiGatewayBasicAuthUsername` when [installing the Application Server][Configure Installation Script]; if so, this value must be configured to the one used.
This will overwrite the `ServiceFabricApiGatewayBasicAuthUsername` value in the {{% ctx %}} Gateway web.config.|
|`ServiceFabricApiGatewayBasicAuthPassword` | This must be changed if you used a non-default `ApiGatewayBasicAuthPassword` when [installing the Application Server][Configure Installation Script]; if so, this value must be configured to the one used. It can be [{{% ctx %}} Encrypted][CORTEX Encrypted].
This will overwrite the `ServiceFabricApiGatewayBasicAuthPassword` value in the {{% ctx %}} Gateway web.config.|
|`DotNetFlowDebuggerEndpoint` | Replace `server.domain.com` with the fully qualified domain name of the server.
This will overwrite the `DotNetFlowDebuggerEndpoint` value in the {{% ctx %}} Gateway web.config.|
- |`DotNetFlowDebuggerBasicAuthUsername` | This must be changed if you used a non-default `FlowDebuggerBasicAuthUsername`; if so, this value must be configured to the one used.
This will overwrite the `DotNetFlowDebuggerBasicAuthUsername` value in the {{% ctx %}} Gateway web.config.|
- |`DotNetFlowDebuggerBasicAuthPassword` | This must be changed if you used a non-default `FlowDebuggerBasicAuthPassword`; if so, this value must be configured to the one used. It can be [{{% ctx %}} Encrypted][CORTEX Encrypted].
This will overwrite the `DotNetFlowDebuggerBasicAuthPassword` value in the {{% ctx %}} Gateway web.config.|
- |`DotNetFlowDebuggerUsingSelfSignedCertificates` | Configure the value as `$false` if you are using valid CA certificates to secure the site containing {{% ctx %}} Gateway, `$true` if using self-signed certificates.
This will overwrite the `DotNetFlowDebuggerUsingSelfSignedCertificates` value in the {{% ctx %}} Gateway web.config.|
+ |`DotNetFlowDebuggerBasicAuthUsername` | This must be changed if you used a non-default `ApiGatewayBasicAuthUsername` when [installing the Debugger on the Web Application Server][Install Application Server]; if so, this value must be configured to the one used.
This will overwrite the `DotNetFlowDebuggerBasicAuthUsername` value in the {{% ctx %}} Gateway web.config.|
+ |`DotNetFlowDebuggerBasicAuthPassword` | This must be changed if you used a non-default `ApiGatewayBasicAuthPassword` when [installing the Debugger on the Web Application Server][Install Application Server]; if so, this value must be configured to the one used. It can be [{{% ctx %}} Encrypted][CORTEX Encrypted].
This will overwrite the `DotNetFlowDebuggerBasicAuthPassword` value in the {{% ctx %}} Gateway web.config.|
+ |`DotNetFlowDebuggerUsingSelfSignedCertificates` | Configure the value as `$false` if you are using valid CA certificates to secure the communication between {{% ctx %}} Gateway and the Debugger, `$true` if using self-signed certificates.
This will overwrite the `DotNetFlowDebuggerUsingSelfSignedCertificates` value in the {{% ctx %}} Gateway web.config.|
|`GatewayApplicationPoolUsername` | Replace `Domain\Username` with the user that is used to run the {{% ctx %}} Gateway application pool currently.|
|`WebRootFolder` | Replace this with the correct path for the Web Root Folder on the server. Typically this will be `C:\inetpub\wwwroot`.|
|`WebsitePort` | Replace this with the port that you wish the website to use. Typically this will be `443`.|
diff --git a/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/single-server-without-ha/prerequisites.md b/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/single-server-without-ha/prerequisites.md
index 6371ef0fa..c743c4d43 100644
--- a/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/single-server-without-ha/prerequisites.md
+++ b/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/single-server-without-ha/prerequisites.md
@@ -34,6 +34,24 @@ The prerequisites required for a single server (as described in [Architecture][]
The server must be on a domain and cannot be a domain controller.
+## Active Directory Requirements
+
+For Gateway, only Windows domains with an Active Directory domain controller running Active Directory Domain Services are supported.
+
+Supported versions of Active Directory are listed below:
+
+| Version | Verified? | Supported From | Supported Until |
+|----------------------------|----------------|----------------|------------------|
+| Windows Server 2003 | ✓ | {{% ctx %}} v2022.9 | To be evaluated |
+| Windows Server 2003 R2 | | {{% ctx %}} v2022.9 | To be evaluated |
+| Windows Server 2008 | | {{% ctx %}} v2022.9 | To be evaluated |
+| Windows Server 2008 R2 | ✓ | {{% ctx %}} v2022.9 | To be evaluated |
+| Windows Server 2012 | | {{% ctx %}} v2022.9 | To be evaluated |
+| Windows Server 2012 R2 | ✓ | {{% ctx %}} v2022.9 | To be evaluated |
+| Windows Server 2016 | ✓ | {{% ctx %}} v2022.9 | To be evaluated |
+| Windows Server 2019 | | {{% ctx %}} v2022.9 | To be evaluated |
+| Windows Server 2022 | | {{% ctx %}} v2022.9 | To be evaluated |
+
## DNS Requirements
The installation requires IP to hostname resolution to be available. Please ensure that you have the appropriate pointer (PTR) records configured on the DNS server for the server.
@@ -54,7 +72,7 @@ To get a licence file and feature identifier take the following steps:
Please also include a suitable {{% ctx %}} Innovation feature identifier.
```
-1. Extract `Cortex Innovation 2022.9 - Licence Fingerprint Generator.zip`.
+1. Extract `Cortex Innovation {{< version >}} - Licence Fingerprint Generator.zip`.
1. From that folder, copy `Cortex.Licensing.FingerprintGeneration.exe` to the server.
1. Double-click `Cortex.Licensing.FingerprintGeneration.exe` to run it. A command line window will appear, containing a machine identifier and fingerprint, e.g:
@@ -75,52 +93,11 @@ Gateway supports the latest versions of the following browsers:
* Edge
* Firefox
-## Certificate Requirements
-
-{{% alert title="Note" %}}
-For production systems it is recommended that an X.509 SSL certificate is obtained from a Certificate Authority and used for installation. For non-production systems, certificates can be omitted from installation and it will create and use self-signed certificates. This may prevent 3rd parties that require valid certificate verification to access the API Gateway Service.
-{{% / alert %}}
-
-An X.509 SSL certificate (standard or wildcard) should be used to:
-
-* Allow Application Services to identify themselves to clients such as Gateway.
-* Prevent unauthorised nodes from joining the single node cluster.
-* Connect to Service Fabric Explorer from the Application Server.
-* Connect to Gateway.
-
-The certificate can be obtained from a Certificate Authority, such as [Let’s Encrypt](Flow(Innovation)
to open a dialog. If the menu item is not present, it means that the `FeatureFlags` in the `CortexGateway.SetParameters.xml` file was not set properly when installing Gateway. See [Troubleshooting][Troubleshooting No Innovation] for more information.
+1. Inside the group, click the `+` button again and click on Flow(Innovation)
to open a dialog. If the menu item is not present, it means that the `FeatureFlags` in the `CortexGateway.SetParameters.xml` file was not set properly when updating Gateway. See [Troubleshooting][Troubleshooting No Innovation] for more information.
1. Enter a name for the flow, configure the `Permission Groups` and click `OK` to create the flow.
-1. The flow should be displayed with a start flow block and end flow block. A list of block palettes should be displayed down the left hand side:
+1. The flow should be displayed with a start flow block and end flow block, if those blocks are not displayed see [Troubleshooting][Troubleshooting Flow No Blocks]. A list of block palettes should be displayed down the left hand side:
{{< figure src="/images/New Innovation Flow View.PNG" title="New Flow - Number of palettes may differ" >}}
1. Add a `Set Variable` block and connect it between the start and end blocks.
1. Click the `Set Variable` block to open the Property Editor.
1. Set the `Value` property to the expression `DateTimeOffset.Now`.
1. Type `Result` into the `Variable` property and click `Create Result`.
1. In the Variable Editor, set `Is Output Variable?` to `true` for the new `Result` variable.
-1. Set a breakpoint on the end block and start the flow. An execution token should appear, the `Result` variable should show the current time. If the token does not appear, try refreshing the page.
+1. Set a breakpoint on the end block and start the flow. An execution token should appear, the `Result` variable should show the current time. If the token does not appear, try refreshing the page. Failing that, see [Troubleshooting][Troubleshooting Flow Not Starting].
1. Continue or stop the execution.
1. Commit the flow.
@@ -55,6 +55,8 @@ Test the platform by creating a new flow and executing it using the following st
1. {{% ctx %}} Innovation has now been verified and is ready to use.
[Troubleshooting During Installation]: {{< url path="Cortex.Reference.Troubleshooting.Installation.TroubleshootingDuringInstallation" >}}
+[Troubleshooting Flow Not Starting]: {{< url path="Cortex.Reference.Troubleshooting.Installation.TroubleshootingFlowNotStarting" >}}
+[Troubleshooting Flow No Blocks]: {{< url path="Cortex.Reference.Troubleshooting.Installation.TroubleshootingFlowNoBlocks" >}}
[Troubleshooting No Innovation]: {{< url path="Cortex.Reference.Troubleshooting.Installation.TroubleshootingNoInnovation" >}}
[Troubleshooting No Publish]: {{< url path="Cortex.Reference.Troubleshooting.Installation.TroubleshootingNoPublish" >}}
[Troubleshooting Root Certificate Error]: {{< url path="Cortex.Reference.Troubleshooting.Installation.TroubleshootingNoRootCertificate" >}}
diff --git a/content/en/docs/2023.7/getting-started/on-premise/install-innovation-only/multiple-server-with-ha/install-web-application-server.md b/content/en/docs/2023.7/getting-started/on-premise/install-innovation-only/multiple-server-with-ha/install-web-application-server.md
index c65c60c6c..496903b93 100644
--- a/content/en/docs/2023.7/getting-started/on-premise/install-innovation-only/multiple-server-with-ha/install-web-application-server.md
+++ b/content/en/docs/2023.7/getting-started/on-premise/install-innovation-only/multiple-server-with-ha/install-web-application-server.md
@@ -182,9 +182,9 @@ To install the components required for debugging, perform the steps detailed in
|`ServiceFabricApiGatewayBasicAuthUsername` | This must be changed if you used a non-default `ApiGatewayBasicAuthUsername` when [installing the Application Servers][Configure Installation Script]; if so, this value must be configured to the one used.
This will set the `ServiceFabricApiGatewayBasicAuthUsername` value in the {{% ctx %}} Gateway web.config.|
|`ServiceFabricApiGatewayBasicAuthPassword` | This must be changed if you used a non-default `ApiGatewayBasicAuthPassword` when [installing the Application Servers][Configure Installation Script]; if so, this value must be configured to the one used. It can be [{{% ctx %}} Encrypted][CORTEX Encrypted].
This will set the `ServiceFabricApiGatewayBasicAuthPassword` value in the {{% ctx %}} Gateway web.config.|
|`DotNetFlowDebuggerEndpoint` | Replace `server.domain.com` with the fully qualified domain name of the Web Application Server.
This will set the `DotNetFlowDebuggerEndpoint` value in the {{% ctx %}} Gateway web.config.|
- |`DotNetFlowDebuggerBasicAuthUsername` | This must be changed if you used a non-default `FlowDebuggerBasicAuthUsername`; if so, this value must be configured to the one used.
This will set the `DotNetFlowDebuggerBasicAuthUsername` value in the {{% ctx %}} Gateway web.config.|
- |`DotNetFlowDebuggerBasicAuthPassword` | This must be changed if you used a non-default `FlowDebuggerBasicAuthPassword`; if so, this value must be configured to the one used. It can be [{{% ctx %}} Encrypted][CORTEX Encrypted].
This will set the `DotNetFlowDebuggerBasicAuthPassword` value in the {{% ctx %}} Gateway web.config.|
- |`DotNetFlowDebuggerUsingSelfSignedCertificates` | Configure the value as `$false` if you are using valid CA certificates to secure the site containing {{% ctx %}} Gateway, `$true` if using self-signed certificates.
This will set the `DotNetFlowDebuggerUsingSelfSignedCertificates` value in the {{% ctx %}} Gateway web.config.|
+ |`DotNetFlowDebuggerBasicAuthUsername` | This must be changed if you used a non-default `ApiGatewayBasicAuthUsername` when [installing the Debugger on the Web Application Server][Install Application Server]; if so, this value must be configured to the one used.
This will set the `DotNetFlowDebuggerBasicAuthUsername` value in the {{% ctx %}} Gateway web.config.|
+ |`DotNetFlowDebuggerBasicAuthPassword` | This must be changed if you used a non-default `ApiGatewayBasicAuthPassword` when [installing the Debugger on the Web Application Server][Install Application Server]; if so, this value must be configured to the one used. It can be [{{% ctx %}} Encrypted][CORTEX Encrypted].
This will set the `DotNetFlowDebuggerBasicAuthPassword` value in the {{% ctx %}} Gateway web.config.|
+ |`DotNetFlowDebuggerUsingSelfSignedCertificates` | Configure the value as `$false` if you are using valid CA certificates to secure the communication between {{% ctx %}} Gateway and the Debugger, `$true` if using self-signed certificates.
This will set the `DotNetFlowDebuggerUsingSelfSignedCertificates` value in the {{% ctx %}} Gateway web.config.|
|`GatewayApplicationPoolUsername` | Replace `Domain\Username` with the user that should be used to run the {{% ctx %}} Gateway application pool as configured in [Get {{% ctx %}} Gateway Application Pool User][Get CORTEX Gateway Application Pool User].|
|`WebRootFolder` | Replace this with the correct path for the Web Root Folder on the server. Typically this will be `C:\inetpub\wwwroot`.|
|`WebsitePort` | Replace this with the port that you wish the website to use. Typically this will be `443`.|
diff --git a/content/en/docs/2023.7/getting-started/on-premise/install-innovation-only/single-server-without-ha/install-web-application-server.md b/content/en/docs/2023.7/getting-started/on-premise/install-innovation-only/single-server-without-ha/install-web-application-server.md
index 89877e15d..0f8eae029 100644
--- a/content/en/docs/2023.7/getting-started/on-premise/install-innovation-only/single-server-without-ha/install-web-application-server.md
+++ b/content/en/docs/2023.7/getting-started/on-premise/install-innovation-only/single-server-without-ha/install-web-application-server.md
@@ -170,9 +170,9 @@ Once the certificate has been imported, a `Friendly Name` should be assigned whi
|`ServiceFabricApiGatewayBasicAuthUsername` | This must be changed if you used a non-default `ApiGatewayBasicAuthUsername` when [installing the Application Server][Configure Installation Script]; if so, this value must be configured to the one used.
This will set the `ServiceFabricApiGatewayBasicAuthUsername` value in the {{% ctx %}} Gateway web.config.|
|`ServiceFabricApiGatewayBasicAuthPassword` | This must be changed if you used a non-default `ApiGatewayBasicAuthPassword` when [installing the Application Server][Configure Installation Script]; if so, this value must be configured to the one used. It can be [{{% ctx %}} Encrypted][CORTEX Encrypted].
This will set the `ServiceFabricApiGatewayBasicAuthPassword` value in the {{% ctx %}} Gateway web.config.|
|`DotNetFlowDebuggerEndpoint` | Replace `server.domain.com` with the fully qualified domain name of the Web Application Server.
This will set the `DotNetFlowDebuggerEndpoint` value in the {{% ctx %}} Gateway web.config.|
- |`DotNetFlowDebuggerBasicAuthUsername` | This must be changed if you used a non-default `FlowDebuggerBasicAuthUsername`; if so, this value must be configured to the one used.
This will set the `DotNetFlowDebuggerBasicAuthUsername` value in the {{% ctx %}} Gateway web.config.|
- |`DotNetFlowDebuggerBasicAuthPassword` | This must be changed if you used a non-default `FlowDebuggerBasicAuthPassword`; if so, this value must be configured to the one used. It can be [{{% ctx %}} Encrypted][CORTEX Encrypted].
This will set the `DotNetFlowDebuggerBasicAuthPassword` value in the {{% ctx %}} Gateway web.config.|
- |`DotNetFlowDebuggerUsingSelfSignedCertificates` | Configure the value as `$false` if you are using valid CA certificates to secure the site containing {{% ctx %}} Gateway, `$true` if using self-signed certificates.
This will set the `DotNetFlowDebuggerUsingSelfSignedCertificates` value in the {{% ctx %}} Gateway web.config.|
+ |`DotNetFlowDebuggerBasicAuthUsername` | This must be changed if you used a non-default `ApiGatewayBasicAuthUsername` when [installing the Debugger on the Web Application Server][Install Application Server]; if so, this value must be configured to the one used.
This will set the `DotNetFlowDebuggerBasicAuthUsername` value in the {{% ctx %}} Gateway web.config.|
+ |`DotNetFlowDebuggerBasicAuthPassword` | This must be changed if you used a non-default `ApiGatewayBasicAuthPassword` when [installing the Debugger on the Web Application Server][Install Application Server]; if so, this value must be configured to the one used. It can be [{{% ctx %}} Encrypted][CORTEX Encrypted].
This will set the `DotNetFlowDebuggerBasicAuthPassword` value in the {{% ctx %}} Gateway web.config.|
+ |`DotNetFlowDebuggerUsingSelfSignedCertificates` | Configure the value as `$false` if you are using valid CA certificates to secure the communication between {{% ctx %}} Gateway and the Debugger, `$true` if using self-signed certificates.
This will set the `DotNetFlowDebuggerUsingSelfSignedCertificates` value in the {{% ctx %}} Gateway web.config.|
|`GatewayApplicationPoolUsername` | Replace `Domain\Username` with the user that should be used to run the {{% ctx %}} Gateway application pool as configured in [Get {{% ctx %}} Gateway Application Pool User][Get CORTEX Gateway Application Pool User].|
|`WebRootFolder` | Replace this with the correct path for the Web Root Folder on the server. Typically this will be `C:\inetpub\wwwroot`.|
|`WebsitePort` | Replace this with the port that you wish the website to use. Typically this will be `443`.|
diff --git a/content/en/docs/2023.7/getting-started/on-premise/install-innovation-only/single-server-without-ha/try-it-out.md b/content/en/docs/2023.7/getting-started/on-premise/install-innovation-only/single-server-without-ha/try-it-out.md
index e2ce3a111..5bec699f1 100644
--- a/content/en/docs/2023.7/getting-started/on-premise/install-innovation-only/single-server-without-ha/try-it-out.md
+++ b/content/en/docs/2023.7/getting-started/on-premise/install-innovation-only/single-server-without-ha/try-it-out.md
@@ -18,14 +18,14 @@ Test the platform by creating a new flow and executing it using the following st
1. Click on the group to open it (refresh the page if it does not appear).
1. Inside the group, click the `+` button again and click on `Flow` to open a dialog. If the menu item is not present, it means that the `FeatureFlags` in the `CortexGateway.SetParameters.xml` file was not set properly when installing Gateway. See [Troubleshooting][Troubleshooting No Innovation] for more information.
1. Enter a name for the flow, configure the `Permission Groups` and click `OK` to create the flow.
-1. The flow should be displayed with a start flow block and end flow block. A list of block palettes should be displayed down the left hand side:
+1. The flow should be displayed with a start flow block and end flow block, if those blocks are not displayed see [Troubleshooting][Troubleshooting Flow No Blocks]. A list of block palettes should be displayed down the left hand side:
{{< figure src="/images/New Innovation Flow View.PNG" title="New Flow - Number of palettes may differ" >}}
1. Add a `Set Variable` block and connect it between the start and end blocks.
1. Click the `Set Variable` block to open the Property Editor.
1. Set the `Value` property to the expression `DateTimeOffset.Now`.
1. Type `Result` into the `Variable` property and click `Create Result`.
1. In the Variable Editor, set `Is Output Variable?` to `true` for the new `Result` variable.
-1. Set a breakpoint on the end block and start the flow. An execution token should appear, the `Result` variable should show the current time. If the token does not appear, try refreshing the page.
+1. Set a breakpoint on the end block and start the flow. An execution token should appear, the `Result` variable should show the current time. If the token does not appear, try refreshing the page. Failing that, see [Troubleshooting][Troubleshooting Flow Not Starting].
1. Continue or stop the execution.
1. Commit the flow.
@@ -55,6 +55,8 @@ Test the platform by creating a new flow and executing it using the following st
1. {{% ctx %}} Innovation has now been verified and is ready to use.
[Troubleshooting During Installation]: {{< url path="Cortex.Reference.Troubleshooting.Installation.TroubleshootingDuringInstallation" >}}
+[Troubleshooting Flow Not Starting]: {{< url path="Cortex.Reference.Troubleshooting.Installation.TroubleshootingFlowNotStarting" >}}
+[Troubleshooting Flow No Blocks]: {{< url path="Cortex.Reference.Troubleshooting.Installation.TroubleshootingFlowNoBlocks" >}}
[Troubleshooting No Innovation]: {{< url path="Cortex.Reference.Troubleshooting.Installation.TroubleshootingNoInnovation" >}}
[Troubleshooting No Publish]: {{< url path="Cortex.Reference.Troubleshooting.Installation.TroubleshootingNoPublish" >}}
[Troubleshooting Root Certificate Error]: {{< url path="Cortex.Reference.Troubleshooting.Installation.TroubleshootingNoRootCertificate" >}}
diff --git a/data/urls.toml b/data/urls.toml
index d1838d1f1..99c4db2a4 100644
--- a/data/urls.toml
+++ b/data/urls.toml
@@ -1897,6 +1897,8 @@
[Cortex.Reference.Troubleshooting.Installation]
TroubleshootingDuringInstallation= "/docs/reference/troubleshooting/installation#ts-during-installation"
TroubleshootingNoInnovation = "/docs/reference/troubleshooting/installation#ts-no-innovation"
+ TroubleshootingFlowNotStarting = "/docs/reference/troubleshooting/installation#ts-flow-not-starting"
+ TroubleshootingFlowNoBlocks = "/docs/reference/troubleshooting/installation#ts-no-blocks"
TroubleshootingAfterInstallation= "/docs/reference/troubleshooting/installation#ts-after-installation"
TroubleshootingNoBlocks = "/docs/reference/troubleshooting/installation#ts-no-blocks"
TroubleshootingNoPublish = "/docs/reference/troubleshooting/installation#ts-no-publish"
From 8949cdc8c391cf344639767498a386b8f68224b8 Mon Sep 17 00:00:00 2001
From: cortex-lp <86599307+cortex-lp@users.noreply.github.com>
Date: Tue, 19 Sep 2023 12:07:47 +0100
Subject: [PATCH 2/3] Feature/2023.7 add innovation to 7.2 (#54)
Update documentation with PO changes on Add Innovation to v7.2 (single server)
---
.../2023.7/Reference/troubleshooting/installation.md | 10 ++++------
.../multiple-server-with-ha/architecture.md | 2 +-
.../multiple-server-with-ha/prerequisites.md | 4 ++--
3 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/content/en/docs/2023.7/Reference/troubleshooting/installation.md b/content/en/docs/2023.7/Reference/troubleshooting/installation.md
index f3946c1a6..52dcf393b 100644
--- a/content/en/docs/2023.7/Reference/troubleshooting/installation.md
+++ b/content/en/docs/2023.7/Reference/troubleshooting/installation.md
@@ -163,14 +163,12 @@ Check that the `Feature Flags` Guid in the `CortexGateway.SetParameters.xml` fil
#### Application Pool user does not have Modify rights to the Roaming folder
-The `Roaming` folder requires `Modify` permission to allow creating the `NuGet` folders and its `NuGet.Config` file within.
+The following folders require `Modify` permission to allow creating the `NuGet` folders and its `NuGet.Config` file within:
-There are 2 locations where the `Roaming` folders needs `Modify` rights:
+* `C:\Windows\System32\config\systemprofile\AppData\Roaming`
+* `C:\Windows\SysWOW64\config\systemprofile\AppData\Roaming`
-* `C:\Windows\System32\config\systemprofile\AppData`
-* `C:\Windows\SysWOW64\config\systemprofile\AppData`
-
-For each `Roaming` location, perform the following steps:
+For each folder, perform the following steps:
1. Navigate to the `AppData` folder.
1. Right-click on the `Roaming` folder and click `Properties`.
diff --git a/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/multiple-server-with-ha/architecture.md b/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/multiple-server-with-ha/architecture.md
index 3438fa8a0..d78d3397b 100644
--- a/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/multiple-server-with-ha/architecture.md
+++ b/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/multiple-server-with-ha/architecture.md
@@ -38,7 +38,7 @@ The recommended architecture for adding Innovation to a v7.2 Dual Site, Dual Ser
The minimum architecture requires 5 servers:
-* 1x Web Application Server, which contains Gateway. For Innovation, the existing Gateway will be upgraded a new Debug Node will be added
+* 1x Web Application Server, which contains Gateway. For Innovation, the existing Gateway will be upgraded and a new Debug Node will be added
* 2x Application Servers for v7.2, each of these will also host one of the three Application Servers for Innovation
* 1x Database Server for v7.2, which will also host the remaining Application Server for Innovation
* 1x Database Server for v7.2, which will also host the Load Balancer for Innovation
diff --git a/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/multiple-server-with-ha/prerequisites.md b/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/multiple-server-with-ha/prerequisites.md
index 5f8bc87c8..9052fc9b2 100644
--- a/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/multiple-server-with-ha/prerequisites.md
+++ b/content/en/docs/2023.7/getting-started/on-premise/add-innovation-to-72/multiple-server-with-ha/prerequisites.md
@@ -25,7 +25,7 @@ Use these hardware requirements if using the [Recommended Architecture][].
|------------------|-----------------------|-----------------------------------|---------------|----------------------|
| New Innovation Load Balancer | 1[^1] | 4+ *Recommended*
2 *Minimum* | 8+ *Recommended*
4 *Minimum* | 50+ *Recommended*
30 *Minimum*
5+ free on installation drive |
| New Innovation Application Server | 3 *Bronze availability*[^2]
5 *Silver availability*
7 *Gold availability*
9 *Platinum availability* | 4+ *Recommended*
2 *Minimum* | 16+ *Recommended*
8 *Minimum* | 75+ *Recommended*
60 *Minimum*
40+ free on %ProgramData% drive |
-| Existing V7.2 Application Server with Gateway
+ Upgrade to Innovation Web Application Server | 1 | 8+ *Recommended*
4 *Minimum* | 24+ *Recommended*
16 *Minimum* | 225+ *Recommended*
150 *Minimum*
30+ free on installation drive
40+ free on %ProgramData% drive |
+| Existing V7.2 Application Server with Gateway
+ Upgrade to Innovation Web Application Server | 1 | 4+ *Recommended*
4 *Minimum* | 16+ *Recommended*
12 *Minimum* | 160+ *Recommended*
135 *Minimum*
30+ free on installation drive
40+ free on %ProgramData% drive |
### Minimum Architecture
@@ -36,7 +36,7 @@ Use these hardware requirements if using the [Minimum Architecture][] and instal
| Existing V7.2 Database Server
+ Innovation Load Balancer| 1[^1] | 4+ *Recommended*
4 *Minimum* | 8+ *Recommended*
4 *Minimum* | 300+ *Recommended*
70 *Minimum*
5+ free on installation drive |
| Existing V7.2 Database Server
+ Innovation Application Server | 1 | 4+ *Recommended*
4 *Minimum* | 16+ *Recommended*
12 *Minimum* | 300+ *Recommended*
100 *Minimum*
40+ free on %ProgramData% drive|
| Existing V7.2 Application Server
+ Innovation Application Server | 2 | 4+ *Recommended*
4 *Minimum* | 16+ *Recommended*
12 *Minimum* | 120+ *Recommended*
100 *Minimum*
40+ free on %ProgramData% drive|
-| Existing or New Application Server with Gateway
+ Innovation Application Server
+ Upgrade to Innovation Web Application Server | 1 | 4+ *Recommended*
2 *Minimum* | 12+ *Recommended*
8 *Minimum* | 120+ *Recommended*
100 *Minimum*
30+ free on installation drive
40+ free on %ProgramData% drive |
+| Existing V7.2 Web Application Server
+ Innovation Application Server
+ Upgrade to Innovation Web Application Server | 1 | 4+ *Recommended*
2 *Minimum* | 16+ *Recommended*
12 *Minimum* | 150+ *Recommended*
100 *Minimum*
30+ free on installation drive
40+ free on %ProgramData% drive |
[^1]: A software-based load balancer called [gobetween][] is provided with the platform. This must be installed on its own server as it doesn't support routing traffic to itself. It also doesn't currently support HA, but it may be possible to use multiple gobetween load balancers with Anycast network addressing and routing to provide high availability, as described in [https://en.wikipedia.org/wiki/Anycast][Anycast]; however, this has not been verified yet. It is possible to use an [alternative load balancer][] to the one provided.
[^2]: Application Servers support HA via clustering. A cluster must consist of a minimum of 3 nodes, and the number of nodes must be an odd number to ensure a quorum. Currently only the Bronze availability (3 nodes) is supported. Silver, Gold and Platinum support will be added in future.
From f40dc795d74c141cbff2d1c52eb2d92c291ac0a4 Mon Sep 17 00:00:00 2001
From: cortex-td <97287718+cortex-td@users.noreply.github.com>
Date: Mon, 16 Oct 2023 11:21:31 +0100
Subject: [PATCH 3/3] Merge 2023.9 Documentation (#64)
Merge 2023.9 Documentation
---
config/_default/config.toml | 9 +-
content/en/blog/releases/2023.X/2023.7.md | 4 +-
content/en/blog/releases/2023.X/2023.9.md | 331 ++++++++
.../execute-powershell-script-block-1.md | 3 +-
.../execute-http-request-block-1.md | 51 +-
.../property-value-out-of-range-exception.md | 4 +
.../advanced/self-signed-certificates.md | 12 +-
.../advanced/self-signed-certificates.md | 12 +-
.../execute-powershell-script-block-1.md | 3 +-
.../execute-http-request-block-1.md | 51 +-
.../property-value-out-of-range-exception.md | 4 +
.../advanced/self-signed-certificates.md | 12 +-
.../advanced/self-signed-certificates.md | 12 +-
.../execute-powershell-script-block-1.md | 3 +-
.../execute-http-request-block-1.md | 53 +-
.../property-value-out-of-range-exception.md | 4 +
.../advanced/self-signed-certificates.md | 12 +-
.../advanced/self-signed-certificates.md | 12 +-
.../execute-powershell-script-block-1.md | 3 +-
.../execute-http-request-block-1.md | 52 +-
.../Property/property-empty-exception.md | 4 +-
.../Property/property-null-exception.md | 4 +-
.../property-value-out-of-range-exception.md | 4 +
...-storage-collection-not-found-exception.md | 2 +-
.../service-does-not-exist-exception.md | 4 +-
.../services/service-unavailable-exception.md | 4 +-
.../Reference/data-types/scopes/scope.md | 2 +-
.../advanced/self-signed-certificates.md | 12 +-
.../advanced/self-signed-certificates.md | 12 +-
content/en/docs/2023.9/FAQs/_index.md | 8 +
content/en/docs/2023.9/Guides/_index.md | 6 +
.../2023.9/Guides/cortex-gateway/_index.md | 8 +
.../Guides/cortex-gateway/help/_index.md | 7 +
.../help/cortex-release-notes.md | 7 +
.../Guides/cortex-gateway/settings/_index.md | 7 +
.../settings/ldap-authorisation.md | 7 +
.../settings/ldap-connection.md | 7 +
.../settings/license-consumption.md | 7 +
.../cortex-gateway/settings/packages.md | 7 +
.../settings/studio-authorisation.md | 7 +
.../cortex-gateway/settings/studio-export.md | 7 +
.../settings/studio-hierarchy.md | 7 +
.../cortex-gateway/settings/studio-import.md | 7 +
.../settings/version-control.md | 7 +
.../cortex-gateway/welcome-page/_index.md | 13 +
.../2023.9/Guides/cortex-innovation/_index.md | 6 +
.../core-application/_index.md | 6 +
.../core-application/services/_index.md | 6 +
.../services/api-gateway-service/_index.md | 7 +
.../services/authorisation-service/_index.md | 7 +
.../concurrency-management-service/_index.md | 7 +
.../_index.md | 7 +
.../services/data-storage-service/_index.md | 7 +
.../execution-management-service/_index.md | 7 +
.../licence-management-service/_index.md | 7 +
.../package-management-service/_index.md | 7 +
.../services/provisioning-service/_index.md | 7 +
.../services/scheduling-service/_index.md | 7 +
.../services/triggers-service/_index.md | 7 +
.../execution-application/_index.md | 6 +
.../execution-application/services/_index.md | 6 +
.../services/execution-service/_index.md | 7 +
.../cortex-interaction-portal/_index.md | 10 +
.../2023.9/Guides/cortex-studio/_index.md | 8 +
.../2023.9/Guides/cortex-studio/debugging.md | 20 +
.../2023.9/Guides/cortex-studio/east-panel.md | 40 +
.../Guides/cortex-studio/expression-editor.md | 34 +
.../Guides/cortex-studio/literal-editor.md | 26 +
.../Guides/cortex-studio/main-display-area.md | 72 ++
.../2023.9/Guides/cortex-studio/navigation.md | 24 +
.../cortex-studio/package-management.md | 20 +
.../2023.9/Guides/cortex-studio/palettes.md | 8 +
.../Guides/cortex-studio/south-panel.md | 68 ++
.../Guides/cortex-studio/variable-editor.md | 31 +
content/en/docs/2023.9/Overview/_index.md | 89 ++
.../en/docs/2023.9/Reference/APIs/_index.md | 6 +
.../Reference/APIs/cortex-gateway/_index.md | 8 +
.../APIs/cortex-innovation/_index.md | 6 +
.../core-application/_index.md | 6 +
.../core-application/services/_index.md | 6 +
.../services/api-gateway-service/_index.md | 8 +
.../licence-management-service/_index.md | 8 +
.../package-management-service/_index.md | 8 +
.../services/provisioning-service/_index.md | 8 +
.../execution-application/_index.md | 6 +
.../execution-application/services/_index.md | 6 +
.../services/execution-service/_index.md | 8 +
.../Reference/APIs/cortex-studio/_index.md | 9 +
.../Reference/Blocks/Dictionaries/_index.md | 5 +
.../Blocks/Dictionaries/add-item/_index.md | 5 +
.../add-item/add-item-with-key-block-3.md | 172 ++++
.../Dictionaries/contains-item/_index.md | 5 +
...ontains-item-with-key-and-value-block-3.md | 192 +++++
.../contains-item-with-key-block-3.md | 167 ++++
.../contains-item-with-value-block-3.md | 169 ++++
.../contains-items-with-keys-block-3.md | 174 ++++
.../contains-items-with-values-block-3.md | 170 ++++
.../Blocks/Dictionaries/get-count/_index.md | 5 +
.../get-count-of-all-items-block-3.md | 116 +++
.../get-count-of-items-with-value-block-3.md | 146 ++++
...get-counts-of-items-with-values-block-3.md | 151 ++++
.../Blocks/Dictionaries/get-item/_index.md | 5 +
.../get-item/get-all-items-block-3.md | 116 +++
.../get-item/get-item-with-key-block-3.md | 202 +++++
.../get-item/get-items-with-key-block-3.md | 145 ++++
.../Blocks/Dictionaries/get-key/_index.md | 5 +
.../get-key/get-all-keys-block-3.md | 116 +++
.../Blocks/Dictionaries/remove-item/_index.md | 5 +
.../remove-item/remove-all-items-block-3.md | 121 +++
.../remove-item-with-key-block-3.md | 216 +++++
.../remove-item-with-value-block-3.md | 213 +++++
.../remove-items-with-key-block-3.md | 162 ++++
.../remove-items-with-keys-block-3.md | 167 ++++
.../remove-items-with-value-block-3.md | 161 ++++
.../remove-items-with-values-block-3.md | 164 ++++
.../Blocks/Dictionaries/set-item/_index.md | 5 +
.../set-item/set-all-items-block-3.md | 123 +++
.../set-item/set-item-with-key-block-3.md | 211 +++++
.../set-item/set-item-with-value-block-3.md | 206 +++++
.../set-item/set-items-with-key-block-3.md | 155 ++++
.../set-item/set-items-with-keys-block-3.md | 150 ++++
.../set-item/set-items-with-value-block-3.md | 152 ++++
.../set-item/set-items-with-values-block-3.md | 160 ++++
.../Reference/Blocks/Exceptions/_index.md | 5 +
.../handle-block-exception/_index.md | 5 +
.../handle-block-exception-block.md | 132 +++
...-block-exception-matching-message-block.md | 229 +++++
...block-exception-matching-messages-block.md | 233 ++++++
...lock-exception-matching-type-name-block.md | 228 +++++
...ock-exception-matching-type-names-block.md | 232 ++++++
.../handle-flow-exception/_index.md | 5 +
.../handle-flow-exception-workspace-block.md | 143 ++++
.../handle-workspace-exception/_index.md | 5 +
.../handle-workspace-exception-block.md | 144 ++++
.../Exceptions/rethrow-exception/_index.md | 5 +
.../rethrow-exception-block.md | 89 ++
.../Exceptions/throw-exception/_index.md | 5 +
.../throw-new-flow-exception-block.md | 185 +++++
.../Blocks/Files-And-Folders/_index.md | 5 +
.../Files-And-Folders/check-file/_index.md | 5 +
.../check-file/check-file-exists-block.md | 159 ++++
.../Files-And-Folders/check-folder/_index.md | 5 +
.../check-folder/check-folder-exists-block.md | 159 ++++
.../Files-And-Folders/copy-file/_index.md | 5 +
.../copy-file/copy-file-block.md | 224 +++++
.../copy-file/copy-files-block.md | 217 +++++
.../Files-And-Folders/copy-folder/_index.md | 5 +
.../copy-folder/copy-folder-block.md | 386 +++++++++
.../copy-folder/copy-folders-block.md | 498 +++++++++++
.../copy-folder/duplicate-folder-block.md | 181 ++++
.../Files-And-Folders/create-folder/_index.md | 5 +
.../create-folder/create-folder-block.md | 108 +++
.../create-folder/create-folders-block.md | 117 +++
.../Files-And-Folders/delete-file/_index.md | 5 +
.../delete-file/delete-file-block.md | 110 +++
.../delete-file/delete-files-block.md | 121 +++
.../Files-And-Folders/delete-folder/_index.md | 5 +
.../delete-folder/delete-folder-block.md | 163 ++++
.../delete-folder/delete-folders-block.md | 178 ++++
.../get-file-information/_index.md | 5 +
.../get-file-information-block.md | 154 ++++
.../get-folder-content/_index.md | 5 +
.../get-folder-content-block.md | 389 +++++++++
.../get-folder-information/_index.md | 5 +
.../get-folder-information-block.md | 158 ++++
.../Files-And-Folders/move-file/_index.md | 5 +
.../move-file/move-file-block.md | 223 +++++
.../move-file/move-files-block.md | 216 +++++
.../Files-And-Folders/move-folder/_index.md | 5 +
.../move-folder/move-folder-block.md | 384 +++++++++
.../move-folder/move-folders-block.md | 496 +++++++++++
.../Files-And-Folders/read-file/_index.md | 5 +
.../read-file/read-all-lines-block.md | 178 ++++
.../read-file/read-all-text-block.md | 173 ++++
.../Files-And-Folders/rename-folder/_index.md | 5 +
.../rename-folder/rename-folder-block.md | 158 ++++
.../Files-And-Folders/search-file/_index.md | 5 +
.../search-file/search-file-block.md | 406 +++++++++
.../search-file/search-files-block.md | 529 ++++++++++++
.../Files-And-Folders/write-file/_index.md | 5 +
.../write-file/write-all-lines-block.md | 226 +++++
.../write-file/write-all-text-block.md | 223 +++++
.../Blocks/Lists/Get-Count/_index.md | 5 +
.../get-count-of-all-items-block-2.md | 115 +++
.../get-count-of-items-with-value-block-2.md | 145 ++++
.../get-count-of-items-with-values-block-2.md | 149 ++++
.../Blocks/Lists/Get-Index/_index.md | 5 +
.../get-index-of-item-with-value-block-2.md | 207 +++++
...get-indexes-of-items-with-value-block-2.md | 153 ++++
.../2023.9/Reference/Blocks/Lists/_index.md | 5 +
.../Reference/Blocks/Lists/add-item/_index.md | 5 +
.../add-item/add-item-at-beginning-block-2.md | 137 +++
.../Lists/add-item/add-item-at-end-block-2.md | 138 +++
.../add-item/add-item-at-index-block-2.md | 186 +++++
.../add-items-at-beginning-block-2.md | 139 ++++
.../add-item/add-items-at-end-block-2.md | 139 ++++
.../add-item/add-items-at-index-block-2.md | 185 +++++
.../Blocks/Lists/contains-item/_index.md | 5 +
.../contains-item-with-value-block-2.md | 167 ++++
.../contains-items-with-values-block-2.md | 168 ++++
.../Reference/Blocks/Lists/get-item/_index.md | 5 +
.../get-item/get-item-at-beginning-block-2.md | 113 +++
.../Lists/get-item/get-item-at-end-block-2.md | 113 +++
.../get-item/get-item-at-index-block-2.md | 157 ++++
.../get-items-at-beginning-block-2.md | 137 +++
.../get-item/get-items-at-end-block-2.md | 137 +++
.../get-item/get-items-at-index-block-2.md | 162 ++++
.../get-item/get-items-at-indexes-block-2.md | 139 ++++
.../Blocks/Lists/remove-item/_index.md | 5 +
.../remove-item/remove-all-items-block-2.md | 121 +++
.../remove-duplicate-items-block-2.md | 153 ++++
.../remove-item-at-beginning-block-2.md | 121 +++
.../remove-item/remove-item-at-end-block-2.md | 121 +++
.../remove-item-at-index-block-2.md | 163 ++++
.../remove-item-with-value-block-2.md | 207 +++++
.../remove-items-at-beginning-block-2.md | 123 +++
.../remove-items-at-end-block-2.md | 123 +++
.../remove-items-at-index-block-2.md | 148 ++++
.../remove-items-at-indexes-block-2.md | 125 +++
.../remove-items-with-value-block-2.md | 156 ++++
.../remove-items-with-values-block-2.md | 161 ++++
.../Reference/Blocks/Lists/set-item/_index.md | 5 +
.../Lists/set-item/set-all-items-block-2.md | 122 +++
.../set-item/set-item-at-beginning-block-2.md | 120 +++
.../Lists/set-item/set-item-at-end-block-2.md | 120 +++
.../set-item/set-item-at-index-block-2.md | 163 ++++
.../set-item/set-item-with-value-block-2.md | 200 +++++
.../set-items-at-beginning-block-2.md | 123 +++
.../set-item/set-items-at-end-block-2.md | 123 +++
.../set-item/set-items-at-index-block-2.md | 146 ++++
.../set-item/set-items-at-indexes-block-2.md | 146 ++++
.../set-item/set-items-with-value-block-2.md | 149 ++++
.../set-item/set-items-with-values-block-2.md | 157 ++++
.../Reference/Blocks/PowerShell/_index.md | 5 +
.../execute-powershell-script/_index.md | 5 +
.../execute-powershell-script-block-1.md | 392 +++++++++
.../Blocks/Text/Convert-To/_index.md | 5 +
.../Convert-To/convert-to-camel-case-block.md | 120 +++
.../Convert-To/convert-to-lower-case-block.md | 120 +++
.../convert-to-pascal-case-block.md | 120 +++
.../Convert-To/convert-to-title-case-block.md | 120 +++
.../Convert-To/convert-to-upper-case-block.md | 120 +++
.../Reference/Blocks/Text/Get-Index/_index.md | 5 +
.../Text/Get-Index/get-index-of-text-block.md | 335 ++++++++
.../Get-Index/get-indexes-of-text-block.md | 303 +++++++
.../Blocks/Text/Get-Length/_index.md | 5 +
.../Text/Get-Length/get-length-block.md | 89 ++
.../2023.9/Reference/Blocks/Text/_index.md | 5 +
.../Reference/Blocks/Text/add-text/_index.md | 5 +
.../add-text/add-text-after-index-block.md | 142 ++++
.../add-text/add-text-at-beginning-block.md | 143 ++++
.../Text/add-text/add-text-at-end-block.md | 143 ++++
.../add-text/add-text-before-index-block.md | 144 ++++
.../Blocks/Text/contains-text/_index.md | 5 +
.../contains-text/contains-all-text-block.md | 261 ++++++
.../contains-text/contains-any-text-block.md | 261 ++++++
.../Text/contains-text/contains-text-block.md | 258 ++++++
.../Blocks/Text/decode-text/_index.md | 5 +
.../Text/decode-text/decode-text-block.md | 227 +++++
.../Blocks/Text/encode-text/_index.md | 5 +
.../Text/encode-text/encode-text-block.md | 177 ++++
.../Text/find-and-remove-text/_index.md | 5 +
.../find-and-remove-all-text-block.md | 249 ++++++
.../find-and-remove-text-block.md | 282 +++++++
.../Text/find-and-replace-text/_index.md | 5 +
.../find-and-replace-all-text-block.md | 270 ++++++
.../find-and-replace-text-block.md | 303 +++++++
.../Blocks/Text/format-text/_index.md | 5 +
.../format-text-with-value-block-1.md | 186 +++++
.../format-text-with-values-block-1.md | 209 +++++
.../Reference/Blocks/Text/get-text/_index.md | 5 +
.../get-text/get-text-at-beginning-block.md | 114 +++
.../Text/get-text/get-text-at-end-block.md | 114 +++
.../Text/get-text/get-text-at-index-block.md | 136 +++
.../get-text/get-text-before-index-block.md | 136 +++
.../get-text-between-indexes-block.md | 164 ++++
.../Reference/Blocks/Text/is-text/_index.md | 5 +
.../Text/is-text/is-text-empty-block.md | 165 ++++
.../is-text-empty-or-whitespace-block.md | 160 ++++
.../Text/is-text/is-text-equal-block.md | 189 +++++
.../Blocks/Text/is-text/is-text-null-block.md | 165 ++++
.../is-text-null-empty-or-whitespace-block.md | 160 ++++
.../is-text/is-text-null-or-empty-block.md | 164 ++++
.../Reference/Blocks/Text/join-text/_index.md | 5 +
.../Text/join-text/join-text-block-1.md | 154 ++++
.../Blocks/Text/remove-text/_index.md | 5 +
.../remove-text-at-beginning-block.md | 106 +++
.../remove-text/remove-text-at-end-block.md | 106 +++
.../remove-text/remove-text-at-index-block.md | 128 +++
.../remove-text-before-index-block.md | 129 +++
.../remove-text-between-indexes-block.md | 155 ++++
.../Blocks/Text/split-text/_index.md | 5 +
.../Text/split-text/split-text-block.md | 244 ++++++
.../en/docs/2023.9/Reference/Blocks/_index.md | 6 +
.../Reference/Blocks/data-storage/_index.md | 5 +
.../data-storage/create-collection/_index.md | 5 +
.../create-collection-block.md | 133 +++
.../data-storage/delete-collection/_index.md | 5 +
.../delete-collection-block.md | 141 ++++
.../Blocks/data-storage/delete-data/_index.md | 5 +
.../delete-data/delete-data-with-key-block.md | 183 ++++
.../Blocks/data-storage/read-data/_index.md | 5 +
.../read-data/read-data-with-key-block.md | 169 ++++
.../wait-for-collection/_index.md | 5 +
.../wait-for-collection-to-exist-block.md | 143 ++++
.../wait-for-collection-to-not-exist-block.md | 148 ++++
.../wait-for-key-in-collection/_index.md | 5 +
...t-for-key-in-collection-to-be-set-block.md | 221 +++++
...ey-in-collection-to-contain-value-block.md | 192 +++++
...it-for-key-in-collection-to-exist-block.md | 176 ++++
...or-key-in-collection-to-not-exist-block.md | 171 ++++
.../Blocks/data-storage/write-data/_index.md | 5 +
.../write-data/write-data-with-key-block.md | 203 +++++
.../2023.9/Reference/Blocks/data/_index.md | 5 +
.../data/execute-data-command/_index.md | 5 +
.../execute-data-command-block-1.md | 786 ++++++++++++++++++
.../Reference/Blocks/date-and-time/_index.md | 5 +
.../date-and-time/add-time-period/_index.md | 5 +
.../add-time-period/add-time-period-block.md | 157 ++++
.../date-and-time/convert-date-time/_index.md | 5 +
.../convert-date-time-to-text-block.md | 254 ++++++
.../convert-text-to-date-time-block.md | 270 ++++++
.../date-and-time/get-date-time/_index.md | 5 +
.../get-current-date-time-block.md | 80 ++
.../get-date-time-component-block.md | 426 ++++++++++
.../date-and-time/get-time-period/_index.md | 5 +
...et-time-period-between-date-times-block.md | 146 ++++
.../date-and-time/is-date-time/_index.md | 5 +
.../is-date-time/is-date-time-after-block.md | 156 ++++
.../is-date-time/is-date-time-before-block.md | 156 ++++
.../is-date-time-between-block.md | 161 ++++
.../is-date-time/is-date-time-equal-block.md | 156 ++++
.../subtract-time-period/_index.md | 5 +
.../subtract-time-period-block.md | 157 ++++
.../Reference/Blocks/decisions/_index.md | 5 +
.../Reference/Blocks/decisions/if/_index.md | 5 +
.../if/if-null-exit-bottom-block-1.md | 96 +++
.../if/if-null-exit-right-block-1.md | 96 +++
.../decisions/if/if-true-exit-bottom-block.md | 81 ++
.../decisions/if/if-true-exit-right-block.md | 81 ++
.../2023.9/Reference/Blocks/email/_index.md | 5 +
.../Blocks/email/send-email/_index.md | 5 +
.../send-email-using-smtp-server-block.md | 581 +++++++++++++
.../2023.9/Reference/Blocks/flows/_index.md | 5 +
.../Reference/Blocks/flows/end-flow/_index.md | 5 +
.../Blocks/flows/end-flow/end-flow-block.md | 37 +
.../Reference/Blocks/flows/run-flow/_index.md | 5 +
.../flows/run-flow/run-flow-async-block.md | 272 ++++++
.../Blocks/flows/run-flow/run-flow-block.md | 246 ++++++
.../Blocks/flows/start-flow/_index.md | 5 +
.../flows/start-flow/start-flow-block.md | 37 +
.../Blocks/google-workspace/_index.md | 5 +
.../Blocks/google-workspace/gmail/_index.md | 5 +
.../gmail/send-email/_index.md | 5 +
.../send-email-using-gmail-block.md | 741 +++++++++++++++++
.../2023.9/Reference/Blocks/http/_index.md | 5 +
.../http/execute-http-request/_index.md | 5 +
.../execute-http-request-block-1.md | 518 ++++++++++++
.../http/execute-soap-request/_index.md | 5 +
.../execute-soap-request-block-1.md | 494 +++++++++++
.../2023.9/Reference/Blocks/json/_index.md | 5 +
.../Blocks/json/convert-json/_index.md | 5 +
.../convert-json-to-object-block.md | 248 ++++++
.../convert-object-to-json-block.md | 191 +++++
.../2023.9/Reference/Blocks/logs/_index.md | 5 +
.../Reference/Blocks/logs/log-event/_index.md | 5 +
.../Blocks/logs/log-event/log-event-block.md | 392 +++++++++
.../2023.9/Reference/Blocks/loops/_index.md | 5 +
.../Reference/Blocks/loops/for-each/_index.md | 5 +
.../loops/for-each/for-each-loop-block.md | 186 +++++
.../Reference/Blocks/loops/for/_index.md | 5 +
.../Blocks/loops/for/for-loop-block.md | 254 ++++++
.../Reference/Blocks/microsoft365/_index.md | 5 +
.../Blocks/microsoft365/outlook/_index.md | 5 +
.../microsoft365/outlook/send-email/_index.md | 5 +
.../send-email-using-microsoft365-block.md | 278 +++++++
.../2023.9/Reference/Blocks/objects/_index.md | 5 +
.../Blocks/objects/convert-object/_index.md | 5 +
.../convert-object-to-text-block-1.md | 250 ++++++
.../Blocks/objects/copy-object/_index.md | 5 +
.../copy-object/copy-object-block-1.md | 112 +++
.../2023.9/Reference/Blocks/queues/_index.md | 5 +
.../Blocks/queues/dequeue-item/_index.md | 5 +
.../dequeue-item/dequeue-item-block-2.md | 155 ++++
.../dequeue-item/dequeue-items-block-2.md | 176 ++++
.../Blocks/queues/enqueue-item/_index.md | 5 +
.../enqueue-item/enqueue-item-block-2.md | 211 +++++
.../enqueue-item/enqueue-items-block-2.md | 240 ++++++
.../Blocks/queues/get-count/_index.md | 5 +
.../get-count-of-all-items-block-2.md | 102 +++
.../Blocks/queues/peek-item/_index.md | 5 +
.../queues/peek-item/peek-item-block.md | 116 +++
.../Blocks/queues/remove-item/_index.md | 5 +
.../remove-item/remove-all-items-block.md | 86 ++
.../Reference/Blocks/schedules/_index.md | 5 +
.../Blocks/schedules/wait-for/_index.md | 5 +
.../wait-for/wait-for-duration-block.md | 90 ++
.../2023.9/Reference/Blocks/ssh/_index.md | 5 +
.../Blocks/ssh/execute-ssh-command/_index.md | 5 +
.../execute-ssh-command-block.md | 315 +++++++
.../2023.9/Reference/Blocks/tasks/_index.md | 5 +
.../Blocks/tasks/cancel-task/_index.md | 5 +
.../cancel-task/cancel-all-tasks-block-2.md | 171 ++++
.../tasks/cancel-task/cancel-task-block-1.md | 163 ++++
.../Blocks/tasks/wait-for-task/_index.md | 5 +
.../wait-for-all-tasks-block-2.md | 282 +++++++
.../wait-for-task/wait-for-task-block-1.md | 196 +++++
.../2023.9/Reference/Blocks/telnet/_index.md | 5 +
.../telnet/execute-telnet-command/_index.md | 5 +
.../execute-telnet-command-block.md | 419 ++++++++++
.../Reference/Blocks/variables/_index.md | 5 +
.../Blocks/variables/set-variable/_index.md | 5 +
.../set-variable/set-variable-block-1.md | 202 +++++
.../Reference/Blocks/workspaces/_index.md | 5 +
.../Blocks/workspaces/end-workspace/_index.md | 5 +
.../end-workspace/end-workspace-block.md | 45 +
.../workspaces/start-workspace/_index.md | 5 +
.../start-workspace/start-workspace-block.md | 45 +
.../Blocks/workspaces/workspace/_index.md | 5 +
.../workspaces/workspace/workspace-block.md | 79 ++
.../2023.9/Reference/Blocks/xml/_index.md | 5 +
.../Blocks/xml/convert-xml/_index.md | 5 +
.../convert-structure-to-xml-block.md | 368 ++++++++
.../convert-xml-to-structure-block.md | 332 ++++++++
.../docs/2023.9/Reference/Concepts/_index.md | 8 +
.../Reference/Concepts/fundamentals/_index.md | 6 +
.../Concepts/fundamentals/blocks/_index.md | 6 +
.../blocks/block-properties/_index.md | 6 +
.../block-properties/advanced-properties.md | 71 ++
.../block-properties/common-properties.md | 145 ++++
.../property-editors/_index.md | 6 +
.../property-editors/expression-editor.md | 748 +++++++++++++++++
.../property-editors/literal-editor.md | 74 ++
.../property-editors/variable-editor.md | 102 +++
.../what-is-a-block-property.md | 144 ++++
.../handling-exceptions-within-a-block.md | 54 ++
.../fundamentals/blocks/what-is-a-block.md | 243 ++++++
.../fundamentals/data-types/_index.md | 6 +
.../fundamentals/data-types/generics.md | 38 +
.../data-types/null-and-nullable-types.md | 46 +
.../data-types/what-is-a-data-type.md | 95 +++
.../fundamentals/exceptions/_index.md | 7 +
.../exceptions/handling-exceptions.md | 186 +++++
.../exceptions/throwing-exceptions.md | 55 ++
.../exceptions/what-is-an-exception.md | 110 +++
.../fundamentals/executions/_index.md | 6 +
.../executions/executions-in-development.md | 229 +++++
.../executions/executions-in-production.md | 121 +++
.../executions/what-is-an-execution.md | 100 +++
.../Concepts/fundamentals/flows/_index.md | 6 +
.../fundamentals/flows/calling-other-flows.md | 75 ++
.../handling-exceptions-within-a-flow.md | 68 ++
.../fundamentals/flows/what-is-a-flow.md | 137 +++
.../Concepts/fundamentals/messages/_index.md | 6 +
.../messages/what-is-a-message.md | 107 +++
.../Concepts/fundamentals/variables/_index.md | 6 +
.../fundamentals/variables/using-variables.md | 212 +++++
.../fundamentals/variables/variable-scopes.md | 99 +++
.../variables/what-is-a-variable.md | 259 ++++++
.../fundamentals/workspaces/_index.md | 6 +
.../handling-exceptions-within-a-workspace.md | 64 ++
.../workspaces/what-is-a-workspace.md | 176 ++++
.../Reference/Concepts/working-with/_index.md | 8 +
.../working-with/collections/_index.md | 5 +
.../working-with/collections/indexes.md | 50 ++
.../working-with/collections/items.md | 46 +
.../Concepts/working-with/collections/keys.md | 57 ++
.../working-with/collections/occurrences.md | 65 ++
.../collections/what-is-a-collection.md | 125 +++
.../working-with/concurrency/_index.md | 5 +
.../concurrency/semaphores/_index.md | 5 +
.../semaphores/what-is-a-semaphore.md | 105 +++
.../Concepts/working-with/culture/_index.md | 5 +
.../working-with/culture/current-culture.md | 38 +
.../working-with/culture/custom-cultures.md | 38 +
.../working-with/culture/invariant-culture.md | 38 +
.../working-with/culture/specific-cultures.md | 40 +
.../working-with/culture/what-is-a-culture.md | 45 +
.../working-with/data-sources/_index.md | 5 +
.../supported-data-sources/_index.md | 5 +
.../supported-data-sources/odbc.md | 40 +
.../supported-data-sources/sql-server.md | 45 +
.../data-sources/what-is-a-data-source.md | 53 ++
.../working-with/date-and-time/_index.md | 5 +
.../date-and-time/date-and-time-formatting.md | 181 ++++
.../date-and-time/what-is-date-and-time.md | 51 ++
.../Concepts/working-with/email/_index.md | 5 +
.../working-with/email/authentication.md | 20 +
.../working-with/email/what-is-email.md | 68 ++
.../Concepts/working-with/enums/_index.md | 5 +
.../working-with/enums/what-is-an-enum.md | 60 ++
.../working-with/files-and-folders/_index.md | 5 +
.../files-and-folders/attributes.md | 41 +
.../working-with/files-and-folders/paths.md | 53 ++
.../what-are-files-and-folders.md | 46 +
.../Concepts/working-with/loops/_index.md | 5 +
.../working-with/loops/what-is-a-loop.md | 74 ++
.../Concepts/working-with/numbers/_index.md | 5 +
.../working-with/numbers/what-is-a-number.md | 68 ++
.../Concepts/working-with/objects/_index.md | 5 +
.../working-with/objects/object-casting.md | 50 ++
.../working-with/objects/object-equality.md | 57 ++
.../working-with/objects/what-is-an-object.md | 44 +
.../Concepts/working-with/scopes/_index.md | 5 +
.../working-with/scopes/what-is-a-scope.md | 38 +
.../Concepts/working-with/tasks/_index.md | 7 +
.../Concepts/working-with/text/_index.md | 5 +
.../Concepts/working-with/text/casing.md | 128 +++
.../text/converting-objects-to-text.md | 87 ++
.../text/empty-text-and-whitespace.md | 51 ++
.../Concepts/working-with/text/encoding.md | 49 ++
.../Concepts/working-with/text/equality.md | 126 +++
.../Concepts/working-with/text/formatting.md | 113 +++
.../text/pattern-matching-syntax.md | 48 ++
.../working-with/text/regex-syntax.md | 216 +++++
.../working-with/text/what-is-text.md | 68 ++
.../Exceptions/Common/Property/_index.md | 5 +
.../property-contains-null-item-exception.md | 106 +++
...y-contains-null-or-empty-item-exception.md | 104 +++
.../Property/property-empty-exception.md | 239 ++++++
.../Property/property-item-count-exception.md | 121 +++
.../Property/property-null-exception.md | 403 +++++++++
.../property-value-out-of-range-exception.md | 371 +++++++++
.../Reference/Exceptions/Common/_index.md | 5 +
.../Reference/Exceptions/Lists/_index.md | 5 +
.../cannot-modify-read-only-list-exception.md | 38 +
.../Lists/duplicate-value-exception.md | 22 +
.../2023.9/Reference/Exceptions/Xml/_index.md | 5 +
.../Xml/xml-serialization-exception.md | 22 +
.../2023.9/Reference/Exceptions/_index.md | 6 +
.../Exceptions/collections/_index.md | 5 +
.../occurrence-not-present-exception.md | 22 +
.../Exceptions/concurrency/_index.md | 5 +
.../concurrency/semaphores/_index.md | 5 +
...maphore-could-not-be-acquired-exception.md | 199 +++++
.../Exceptions/data-storage/_index.md | 5 +
...-storage-collection-not-found-exception.md | 130 +++
...-storage-collection-not-found-exception.md | 135 +++
.../Reference/Exceptions/data/_index.md | 5 +
.../Exceptions/data/command-exception.md | 70 ++
.../invalid-connection-string-exception.md | 70 ++
.../Reference/Exceptions/decisions/_index.md | 5 +
.../property-not-nullable-exception.md | 70 ++
.../Exceptions/dictionaries/_index.md | 5 +
...t-modify-read-only-dictionary-exception.md | 38 +
.../dictionaries/key-not-present-exception.md | 22 +
.../dictionaries/key-present-exception.md | 22 +
.../keys-not-present-exception.md | 22 +
.../Reference/Exceptions/email/_index.md | 5 +
.../email/email-session-exception.md | 323 +++++++
.../Exceptions/files-and-folders/_index.md | 5 +
.../invalid-folder-name-exception.md | 22 +
.../invalid-path-exception.md | 22 +
.../operation-failed-exception.md | 62 ++
.../Reference/Exceptions/flows/_index.md | 5 +
.../Exceptions/flows/blocks/_index.md | 5 +
.../flows/blocks/block-timeout-exception.md | 128 +++
.../blocks/invalid-block-timeout-exception.md | 128 +++
.../invalid-property-value-exception.md | 210 +++++
.../Exceptions/flows/execution/_index.md | 5 +
.../flow-execution-cancelled-exception.md | 99 +++
.../invalid-input-variables-exception.md | 140 ++++
.../Exceptions/flows/flow-exception.md | 17 +
.../Reference/Exceptions/http/_index.md | 5 +
.../http/http-authorisation-exception.md | 11 +
.../http/invalid-request-exception.md | 11 +
.../http/invalid-response-exception.md | 11 +
.../Exceptions/impersonation/_index.md | 5 +
.../impersonation/run-as-exception.md | 136 +++
.../Reference/Exceptions/loops/_index.md | 5 +
.../loops/infinite-loop-exception.md | 173 ++++
.../Reference/Exceptions/powershell/_index.md | 5 +
.../Exceptions/powershell/ps-exception.md | 22 +
.../powershell/ps-remoting-exception.md | 22 +
.../Reference/Exceptions/services/_index.md | 5 +
.../service-does-not-exist-exception.md | 129 +++
.../services/service-unavailable-exception.md | 129 +++
.../2023.9/Reference/Exceptions/ssh/_index.md | 5 +
.../Exceptions/ssh/ssh-client-exception.md | 22 +
.../Exceptions/ssh/ssh-response-exception.md | 22 +
.../Reference/Exceptions/tasks/_index.md | 5 +
.../tasks/aggregate-task-exception.md | 123 +++
.../Reference/Exceptions/telnet/_index.md | 5 +
.../telnet/telnet-client-exception.md | 203 +++++
.../telnet/telnet-server-exception.md | 132 +++
.../Reference/Exceptions/text/_index.md | 5 +
.../Exceptions/text/encoding/_index.md | 5 +
.../text/encoding/text-decoding-exception.md | 165 ++++
.../Reference/Exceptions/text/regex/_index.md | 5 +
.../regex/regex-parsing-failed-exception.md | 21 +
.../en/docs/2023.9/Reference/Glossary/0-9.md | 52 ++
.../docs/2023.9/Reference/Glossary/_index.md | 6 +
.../en/docs/2023.9/Reference/Glossary/a-e.md | 447 ++++++++++
.../en/docs/2023.9/Reference/Glossary/f-j.md | 267 ++++++
.../en/docs/2023.9/Reference/Glossary/k-o.md | 162 ++++
.../en/docs/2023.9/Reference/Glossary/p-t.md | 210 +++++
.../en/docs/2023.9/Reference/Glossary/u-z.md | 67 ++
content/en/docs/2023.9/Reference/_index.md | 6 +
.../2023.9/Reference/data-types/_index.md | 6 +
.../2023.9/Reference/data-types/all/_index.md | 6 +
.../Reference/data-types/all/dynamic.md | 83 ++
.../2023.9/Reference/data-types/all/object.md | 92 ++
.../data-types/collections/_index.md | 6 +
.../Reference/data-types/collections/array.md | 114 +++
.../data-types/collections/dictionary-2.md | 96 +++
.../data-types/collections/icomparer-1.md | 87 ++
.../data-types/collections/idictionary-2.md | 103 +++
.../data-types/collections/ienumerable-1.md | 115 +++
.../data-types/collections/ienumerable.md | 114 +++
.../data-types/collections/ilist-1.md | 90 ++
.../data-types/collections/list-1.md | 95 +++
.../collections/queuewithpriority-2.md | 110 +++
.../data-types/collections/structure.md | 93 +++
.../data-types/concurrency/_index.md | 6 +
.../concurrency/semaphores/_index.md | 6 +
.../concurrency/semaphores/queue-settings.md | 120 +++
.../semaphores/semaphore-settings.md | 162 ++++
.../data-types/conditional-logic/_index.md | 6 +
.../data-types/conditional-logic/boolean.md | 99 +++
.../data-types/credentials/_index.md | 6 +
.../data-types/credentials/usercredentials.md | 157 ++++
.../Reference/data-types/data/_index.md | 6 +
.../Reference/data-types/data/command.md | 144 ++++
.../Reference/data-types/data/commands.md | 144 ++++
.../data-types/data/connectiondetails.md | 71 ++
.../Reference/data-types/data/datacommand.md | 140 ++++
.../data-types/data/nonquerycommand.md | 144 ++++
.../data-types/data/odbcconnectiondetails.md | 100 +++
.../Reference/data-types/data/querycommand.md | 144 ++++
.../data/sqlserverconnectiondetails.md | 100 +++
.../data-types/date-and-time/_index.md | 6 +
.../data-types/date-and-time/datetime.md | 133 +++
.../date-and-time/datetimecomponenttype.md | 61 ++
.../date-and-time/datetimeoffset.md | 157 ++++
.../data-types/date-and-time/dayofweek.md | 193 +++++
.../data-types/date-and-time/timeperiod.md | 47 ++
.../data-types/date-and-time/timespan.md | 31 +
.../Reference/data-types/email/_index.md | 6 +
.../email/authentication/EmailCredentials.md | 12 +
.../authentication/EmailUserCredentials.md | 12 +
.../email/authentication/IEmailCredentials.md | 12 +
.../data-types/email/authentication/_index.md | 6 +
.../email/basicemailsessiondetails.md | 139 ++++
.../data-types/email/emailaddress.md | 117 +++
.../data-types/email/emailmessage.md | 228 +++++
.../email/emailmessagebodyformat.md | 150 ++++
.../data-types/email/emailmessagepriority.md | 169 ++++
.../data-types/email/emailsessionerrorcode.md | 265 ++++++
.../Reference/data-types/exceptions/_index.md | 6 +
.../data-types/exceptions/exception.md | 31 +
.../data-types/files-and-folders/_index.md | 6 +
.../files-and-folders/contentoptions.md | 37 +
.../files-and-folders/fileinformation.md | 73 ++
.../data-types/files-and-folders/filematch.md | 37 +
.../files-and-folders/folderinformation.md | 77 ++
.../Reference/data-types/flows/_index.md | 6 +
.../data-types/flows/flowreference.md | 78 ++
.../data-types/flows/inputvariables.md | 83 ++
.../data-types/google-workspace/_index.md | 6 +
.../google-workspace/gmail/_index.md | 6 +
.../gmail/authentication/_index.md | 6 +
.../gmail/authentication/oauth/_index.md | 6 +
.../oauth/gmailoauthcertificatecredentials.md | 151 ++++
.../gmail/gmailsessiondetails.md | 161 ++++
.../Reference/data-types/http/_index.md | 6 +
.../http/authentication/HttpCredentials.md | 12 +
.../authentication/HttpUserCredentials.md | 12 +
.../http/authentication/IHttpCredentials.md | 12 +
.../data-types/http/authentication/_index.md | 6 +
.../http/authentication/oauth/_index.md | 6 +
.../oauth/clientauthentication.md | 22 +
.../authentication/oauth/clientauthtype.md | 12 +
.../oauth/httpoauthclientcredentials.md | 22 +
.../oauth/httpoauthcredentials.md | 12 +
.../oauth/httpoauthpasswordcredentials.md | 26 +
.../data-types/http/httprequestversion.md | 20 +
.../Reference/data-types/http/request.md | 12 +
.../data-types/http/requestcontenttype.md | 12 +
.../Reference/data-types/http/requestverb.md | 28 +
.../Reference/data-types/http/rest/_index.md | 6 +
.../data-types/http/rest/httprequest.md | 30 +
.../data-types/http/rest/httpresponse.md | 24 +
.../Reference/data-types/http/soap/_index.md | 6 +
.../data-types/http/soap/soap11message.md | 18 +
.../data-types/http/soap/soap12message.md | 16 +
.../data-types/http/soap/soapmessage.md | 20 +
.../data-types/http/soap/soaprequest.md | 24 +
.../data-types/http/soap/soapresponse.md | 24 +
.../Reference/data-types/json/_index.md | 6 +
.../data-types/json/jsonserializersettings.md | 35 +
.../Reference/data-types/logs/_index.md | 6 +
.../data-types/logs/eventseverity.md | 45 +
.../Reference/data-types/loops/_index.md | 6 +
.../data-types/loops/infinitelooperrorcode.md | 39 +
.../data-types/microsoft365/_index.md | 6 +
.../microsoft365/authentication/_index.md | 6 +
.../authentication/oauth/_index.md | 6 +
.../oauth/microsoft365credentials.md | 12 +
...microsoft365oauthcertificatecredentials.md | 26 +
.../oauth/microsoft365oauthcredentials.md | 24 +
.../data-types/most-common/_index.md | 16 +
.../Reference/data-types/numbers/_index.md | 6 +
.../Reference/data-types/numbers/double.md | 112 +++
.../Reference/data-types/numbers/int16.md | 106 +++
.../Reference/data-types/numbers/int32.md | 115 +++
.../Reference/data-types/numbers/int64.md | 115 +++
.../Reference/data-types/numbers/single.md | 108 +++
.../Reference/data-types/other/_index.md | 6 +
.../2023.9/Reference/data-types/other/guid.md | 31 +
.../Reference/data-types/other/nullable-1.md | 31 +
.../Reference/data-types/powershell/_index.md | 6 +
.../powershell/powershellsessiondetails.md | 133 +++
.../powershellwinrmsessiondetails.md | 143 ++++
.../data-types/powershell/records.md | 156 ++++
.../Reference/data-types/scopes/_index.md | 6 +
.../data-types/scopes/scope-option.md | 132 +++
.../Reference/data-types/scopes/scope.md | 126 +++
.../data-types/session-details/_index.md | 6 +
.../session-details/serverdetails.md | 156 ++++
.../2023.9/Reference/data-types/ssh/_index.md | 6 +
.../ssh/authentication/ISshCredentials.md | 12 +
.../ssh/authentication/SshCredentials.md | 12 +
.../ssh/authentication/SshUserCredentials.md | 12 +
.../data-types/ssh/authentication/_index.md | 6 +
.../sshcertificatecredentials.md | 12 +
.../Reference/data-types/ssh/sshlogs.md | 123 +++
.../data-types/ssh/sshsessiondetails.md | 163 ++++
.../Reference/data-types/tasks/_index.md | 6 +
.../data-types/tasks/executiontask.md | 163 ++++
.../data-types/tasks/iexecutiontask.md | 165 ++++
.../Reference/data-types/tasks/itask-1.md | 150 ++++
.../Reference/data-types/telnet/_index.md | 6 +
.../telnet/telnetclienterrorcode.md | 194 +++++
.../Reference/data-types/telnet/telnetlogs.md | 122 +++
.../telnet/telnetservererrorcode.md | 130 +++
.../data-types/telnet/telnetsessiondetails.md | 133 +++
.../Reference/data-types/text/_index.md | 6 +
.../2023.9/Reference/data-types/text/char.md | 72 ++
.../Reference/data-types/text/cultureinfo.md | 40 +
.../Reference/data-types/text/encoding.md | 31 +
.../data-types/text/encryptabletext.md | 31 +
.../data-types/text/encryptedtext.md | 31 +
.../data-types/text/iformatprovider.md | 31 +
.../data-types/text/searchoptions.md | 39 +
.../Reference/data-types/text/string.md | 82 ++
.../data-types/text/stringcomparer.md | 150 ++++
.../data-types/text/stringcomparison.md | 31 +
.../data-types/text/stringsplitoptions.md | 178 ++++
.../data-types/text/textdecodingerrorcode.md | 167 ++++
.../data-types/text/textencodingformat.md | 221 +++++
.../data-types/text/unicodeencoding.md | 31 +
.../data-types/text/utf32encoding.md | 31 +
.../Reference/data-types/text/utf8encoding.md | 31 +
.../en/docs/2023.9/Reference/logs/_index.md | 6 +
.../Reference/logs/cortex-gateway/_index.md | 8 +
.../logs/cortex-innovation/_index.md | 6 +
.../core-application/_index.md | 6 +
.../core-application/services/_index.md | 6 +
.../services/api-gateway-service/_index.md | 8 +
.../cortex-provisioning-service/_index.md | 8 +
.../licence-management-service/_index.md | 8 +
.../package-management-service/_index.md | 8 +
.../execution-application/_index.md | 6 +
.../execution-application/services/_index.md | 6 +
.../services/execution-service/_index.md | 8 +
.../Reference/logs/cortex-studio/_index.md | 8 +
.../docs/2023.9/Reference/messages/_index.md | 8 +
.../Reference/messages/validation/_index.md | 8 +
.../messages/validation/errors/_index.md | 8 +
.../2023.9/Reference/observability/_index.md | 6 +
.../Reference/observability/grafana/_index.md | 6 +
.../grafana/advanced-setup/_index.md | 6 +
.../advanced-setup/configuring-thresholds.md | 32 +
.../grafana/dashboards/_index.md | 6 +
.../dashboards/flow-execution-requests.md | 216 +++++
.../grafana/dashboards/platform-health.md | 237 ++++++
.../Reference/troubleshooting/_index.md | 6 +
.../Reference/troubleshooting/installation.md | 338 ++++++++
.../2023.9/Tutorials/Installation/_index.md | 8 +
.../en/docs/2023.9/Tutorials/Setup/_index.md | 8 +
content/en/docs/2023.9/Tutorials/_index.md | 6 +
.../docs/2023.9/Tutorials/administration.md | 52 ++
.../en/docs/2023.9/Tutorials/development.md | 124 +++
.../docs/2023.9/Tutorials/troubleshooting.md | 22 +
content/en/docs/2023.9/Whats New/_index.md | 54 ++
content/en/docs/2023.9/_index.md | 6 +
content/en/docs/2023.9/_shared/_index.md | 3 +
.../architecture/components/multi-server.md | 55 ++
.../architecture/components/node-details.md | 3 +
.../components/purpose/api-gateway-service.md | 1 +
.../purpose/authorisation-service.md | 1 +
.../purpose/concurrency-management-service.md | 1 +
.../configuration-management-service.md | 1 +
.../purpose/cortex-block-packages.md | 1 +
.../purpose/cortex-gateway-databases.md | 1 +
.../components/purpose/cortex-gateway.md | 1 +
.../cortex-innovation-core-application.md | 1 +
...cortex-innovation-execution-application.md | 1 +
.../components/purpose/cortex-studio.md | 1 +
.../purpose/data-storage-service.md | 1 +
.../components/purpose/erlang-otp.md | 1 +
.../purpose/execution-management-service.md | 1 +
.../components/purpose/execution-service.md | 1 +
.../components/purpose/gobetween.md | 1 +
.../purpose/licence-management-service.md | 1 +
.../purpose/ms-service-fabric-explorer.md | 1 +
.../components/purpose/ms-service-fabric.md | 1 +
.../components/purpose/ms-sql-server.md | 1 +
.../architecture/components/purpose/nssm.md | 1 +
.../purpose/package-management-service.md | 1 +
.../purpose/particular-nservicebus.md | 1 +
.../components/purpose/pivotal-rabbitmq.md | 1 +
.../purpose/provisioning-service.md | 1 +
.../components/purpose/scheduling-service.md | 1 +
.../components/purpose/triggers-service.md | 1 +
.../architecture/components/single-server.md | 51 ++
.../en/docs/2023.9/_shared/currentVersion.md | 1 +
.../multi-server.md | 37 +
.../single-server.md | 37 +
.../description/api-gateway.md | 1 +
.../description/authorisation.md | 1 +
.../description/configuration-management.md | 1 +
.../description/data-storage.md | 1 +
.../description/execution-management.md | 1 +
.../description/execution.md | 1 +
.../description/licence-management.md | 1 +
.../description/package-management.md | 1 +
.../description/provisioning.md | 1 +
.../description/triggers-snmp.md | 1 +
.../en/docs/2023.9/getting-started/_index.md | 6 +
.../2023.9/getting-started/cloud/_index.md | 5 +
.../Grafana/_index.md | 10 +
.../Grafana/architecture.md | 32 +
.../Grafana/import-dashboards.md | 71 ++
.../Grafana/install-promtail/_index.md | 6 +
.../install-promtail/configure-promtail.md | 51 ++
.../install-promtail/install-promtail.md | 30 +
.../Grafana/prerequisites.md | 59 ++
.../Grafana/setup-grafana.md | 33 +
.../Grafana/setup-loki.md | 33 +
.../Grafana/try-it-out.md | 49 ++
.../add-observability-to-innovation/_index.md | 6 +
.../getting-started/on-premise/_index.md | 9 +
.../on-premise/add-innovation-to-72/_index.md | 10 +
.../multiple-server-with-ha/_index.md | 12 +
.../multiple-server-with-ha/architecture.md | 63 ++
...ll-application-and-loadbalancer-servers.md | 328 ++++++++
.../install-web-application-server.md | 171 ++++
.../multiple-server-with-ha/prerequisites.md | 326 ++++++++
.../multiple-server-with-ha/try-it-out.md | 61 ++
.../single-server-without-ha/_index.md | 12 +
.../single-server-without-ha/architecture.md | 30 +
.../install-application-server.md | 295 +++++++
.../install-web-application-server.md | 156 ++++
.../single-server-without-ha/prerequisites.md | 209 +++++
.../single-server-without-ha/try-it-out.md | 63 ++
.../_index.md | 8 +
.../Grafana/_index.md | 10 +
.../Grafana/advanced/_index.md | 6 +
.../Grafana/advanced/port-requirements.md | 16 +
.../advanced/self-signed-certificates.md | 237 ++++++
.../Grafana/advanced/ssl-best-practices.md | 83 ++
.../Grafana/architecture.md | 40 +
.../Grafana/install-grafana/_index.md | 6 +
.../install-grafana/configure-grafana.md | 67 ++
.../install-grafana/install-grafana.md | 24 +
.../Grafana/install-loki/_index.md | 6 +
.../Grafana/install-loki/configure-loki.md | 132 +++
.../Grafana/install-loki/install-loki.md | 32 +
.../Grafana/install-promtail/_index.md | 6 +
.../install-promtail/configure-promtail.md | 80 ++
.../install-promtail/install-promtail.md | 31 +
.../Grafana/prerequisites.md | 170 ++++
.../Grafana/setup-grafana.md | 85 ++
.../Grafana/try-it-out.md | 47 ++
.../add-observability-to-innovation/_index.md | 6 +
.../install-innovation-only/_index.md | 10 +
.../advanced/_index.md | 6 +
.../advanced/advanced-config-changes.md | 203 +++++
.../advanced/configure-firewalls.md | 23 +
.../advanced/encrypt-text.md | 33 +
.../advanced/port-requirements.md | 80 ++
.../advanced/rollover-certificates.md | 160 ++++
.../advanced/self-signed-certificates.md | 234 ++++++
.../advanced/ssl-best-practices.md | 87 ++
.../install-innovation-only/advanced/tde.md | 39 +
.../multiple-server-with-ha/_index.md | 12 +
.../multiple-server-with-ha/architecture.md | 30 +
...ll-application-and-loadbalancer-servers.md | 328 ++++++++
.../install-web-application-server.md | 256 ++++++
.../multiple-server-with-ha/prerequisites.md | 294 +++++++
.../multiple-server-with-ha/setup-gateway.md | 92 ++
.../multiple-server-with-ha/try-it-out.md | 61 ++
.../single-server-without-ha/_index.md | 12 +
.../single-server-without-ha/architecture.md | 28 +
.../install-application-server.md | 294 +++++++
.../install-web-application-server.md | 243 ++++++
.../single-server-without-ha/prerequisites.md | 236 ++++++
.../single-server-without-ha/setup-gateway.md | 92 ++
.../single-server-without-ha/try-it-out.md | 63 ++
.../2023.9/blocks/SEQ-VARIABLE-STORE.png | Bin 0 -> 56323 bytes
.../data-execute-command-block-icon.png | Bin 0 -> 4639 bytes
.../data-storage-create-collection-block.png | Bin 0 -> 5495 bytes
.../data-storage-delete-collection-block.png | Bin 0 -> 5351 bytes
...ata-storage-delete-data-with-key-block.png | Bin 0 -> 4642 bytes
.../data-storage-read-data-with-key-block.png | Bin 0 -> 4778 bytes
...data-storage-wait-for-collection-block.png | Bin 0 -> 5510 bytes
...orage-wait-for-key-in-collection-block.png | Bin 0 -> 4766 bytes
...data-storage-write-data-with-key-block.png | Bin 0 -> 4813 bytes
.../blocks/date-and-time-add-block-icon.png | Bin 0 -> 4575 bytes
...nd-time-convert-to-datetime-block-icon.png | Bin 0 -> 4527 bytes
...te-and-time-convert-to-text-block-icon.png | Bin 0 -> 4537 bytes
.../blocks/date-and-time-get-block-icon.png | Bin 0 -> 4496 bytes
.../blocks/date-and-time-is-block-icon.png | Bin 0 -> 4633 bytes
.../date-and-time-subtract-block-icon.png | Bin 0 -> 4398 bytes
...cisions-if-true-exit-bottom-block-icon.png | Bin 0 -> 5707 bytes
...ecisions-if-true-exit-right-block-icon.png | Bin 0 -> 5826 bytes
.../blocks/dictionaries-add-block-icon.png | Bin 0 -> 4764 bytes
.../dictionaries-contains-block-icon.png | Bin 0 -> 4922 bytes
.../dictionaries-get-all-items-block-icon.png | Bin 0 -> 5320 bytes
.../dictionaries-get-all-keys-block-icon.png | Bin 0 -> 5542 bytes
.../blocks/dictionaries-get-block-icon.png | Bin 0 -> 4660 bytes
.../dictionaries-get-count-block-icon.png | Bin 0 -> 5011 bytes
.../blocks/dictionaries-remove-block-icon.png | Bin 0 -> 4757 bytes
.../blocks/dictionaries-set-block-icon.png | Bin 0 -> 4972 bytes
...end-email-using-smtp-server-block-icon.png | Bin 0 -> 3735 bytes
.../exceptions-handle-block-block-icon.png | Bin 0 -> 2823 bytes
.../exceptions-handle-flow-block-icon.png | Bin 0 -> 4116 bytes
...exceptions-handle-workspace-block-icon.png | Bin 0 -> 5346 bytes
.../blocks/exceptions-rethrow-block-icon.png | Bin 0 -> 3815 bytes
.../blocks/exceptions-throw-block-icon.png | Bin 0 -> 3936 bytes
.../execute-telnet-command-block-icon.png | Bin 0 -> 3706 bytes
.../2023.9/blocks/files-check-block-icon.png | Bin 0 -> 3302 bytes
.../2023.9/blocks/files-copy-block-icon.png | Bin 0 -> 3207 bytes
.../2023.9/blocks/files-delete-block-icon.png | Bin 0 -> 3479 bytes
.../files-get-information-block-icon.png | Bin 0 -> 3123 bytes
.../2023.9/blocks/files-move-block-icon.png | Bin 0 -> 3443 bytes
.../2023.9/blocks/files-read-block-icon.png | Bin 0 -> 3324 bytes
.../2023.9/blocks/files-search-block-icon.png | Bin 0 -> 3402 bytes
.../2023.9/blocks/files-write-block-icon.png | Bin 0 -> 3415 bytes
.../blocks/flows-end-flow-block-icon.png | Bin 0 -> 2010 bytes
.../blocks/flows-run-flow-block-icon.png | Bin 0 -> 4853 bytes
.../blocks/flows-start-flow-block-icon.png | Bin 0 -> 1759 bytes
.../blocks/folders-check-block-icon.png | Bin 0 -> 4311 bytes
.../2023.9/blocks/folders-copy-block-icon.png | Bin 0 -> 4188 bytes
.../blocks/folders-create-block-icon.png | Bin 0 -> 4452 bytes
.../blocks/folders-delete-block-icon.png | Bin 0 -> 4546 bytes
.../blocks/folders-get-content-block-icon.png | Bin 0 -> 4329 bytes
.../folders-get-information-block-icon.png | Bin 0 -> 4158 bytes
.../2023.9/blocks/folders-move-block-icon.png | Bin 0 -> 4457 bytes
.../blocks/folders-rename-block-icon.png | Bin 0 -> 4342 bytes
...pace-send-email-using-gmail-block-icon.png | Bin 0 -> 3735 bytes
.../http-execute-http-request-block-icon.png | Bin 0 -> 5016 bytes
.../http-execute-soap-request-block-icon.png | Bin 0 -> 5353 bytes
.../json-convert-to-json-block-icon.png | Bin 0 -> 4110 bytes
.../json-convert-to-object-block-icon.png | Bin 0 -> 4104 bytes
.../2023.9/blocks/lists-add-block-icon.png | Bin 0 -> 2995 bytes
.../blocks/lists-contains-block-icon.png | Bin 0 -> 3166 bytes
.../2023.9/blocks/lists-get-block-icon.png | Bin 0 -> 2876 bytes
.../blocks/lists-get-count-block-icon.png | Bin 0 -> 3051 bytes
.../blocks/lists-get-index-block-icon.png | Bin 0 -> 3014 bytes
.../2023.9/blocks/lists-remove-block-icon.png | Bin 0 -> 2939 bytes
.../2023.9/blocks/lists-set-block-icon.png | Bin 0 -> 3030 bytes
.../blocks/logs-log-event-block-icon.png | Bin 0 -> 3950 bytes
.../blocks/loops-for-each-loop-block-icon.png | Bin 0 -> 6118 bytes
.../blocks/loops-for-loop-block-icon.png | Bin 0 -> 6445 bytes
...nd-email-using-microsoft365-block-icon.png | Bin 0 -> 3735 bytes
.../blocks/objects-convert-block-icon.png | Bin 0 -> 3769 bytes
.../2023.9/blocks/objects-copy-block-icon.png | Bin 0 -> 3658 bytes
...l-execute-powershell-script-block-icon.png | Bin 0 -> 4652 bytes
.../blocks/queues-dequeue-block-icon.png | Bin 0 -> 3259 bytes
.../blocks/queues-enqueue-block-icon.png | Bin 0 -> 3345 bytes
.../blocks/queues-get-count-block-icon.png | Bin 0 -> 3394 bytes
.../2023.9/blocks/queues-peek-block-icon.png | Bin 0 -> 3320 bytes
.../queues-remove-all-items-block-icon.png | Bin 0 -> 3008 bytes
.../blocks/schedules-wait-for-block-icon.png | Bin 0 -> 5283 bytes
.../ssh-execute-ssh-command-block-icon.png | Bin 0 -> 3593 bytes
.../2023.9/blocks/tasks-cancel-task-block.png | Bin 0 -> 3664 bytes
.../blocks/tasks-wait-for-task-block-icon.png | Bin 0 -> 3537 bytes
.../2023.9/blocks/text-add-block-icon.png | Bin 0 -> 3232 bytes
.../blocks/text-contains-block-icon.png | Bin 0 -> 3154 bytes
.../2023.9/blocks/text-convert-block-icon.png | Bin 0 -> 3215 bytes
.../2023.9/blocks/text-decode-block-icon.png | Bin 0 -> 3275 bytes
.../blocks/text-encode-text-block-icon.png | Bin 0 -> 3492 bytes
.../text-find-and-remove-block-icon.png | Bin 0 -> 3229 bytes
.../text-find-and-replace-block-icon.png | Bin 0 -> 3362 bytes
.../2023.9/blocks/text-format-block-icon.png | Bin 0 -> 3304 bytes
.../2023.9/blocks/text-get-block-icon.png | Bin 0 -> 3144 bytes
.../blocks/text-get-index-block-icon.png | Bin 0 -> 3238 bytes
.../blocks/text-get-length-block-icon.png | Bin 0 -> 3316 bytes
.../2023.9/blocks/text-is-block-icon.png | Bin 0 -> 3224 bytes
.../2023.9/blocks/text-join-block-icon.png | Bin 0 -> 3137 bytes
.../2023.9/blocks/text-remove-block-icon.png | Bin 0 -> 2931 bytes
.../2023.9/blocks/text-split-block-icon.png | Bin 0 -> 3185 bytes
.../variables-set-variable-block-icon.png | Bin 0 -> 4134 bytes
.../workspaces-end-workspace-block-icon.png | Bin 0 -> 1623 bytes
.../workspaces-start-workspace-block-icon.png | Bin 0 -> 1688 bytes
.../workspaces-workspace-block-icon.png | Bin 0 -> 3499 bytes
.../xml-convert-to-structure-block-icon.png | Bin 0 -> 4020 bytes
.../blocks/xml-convert-to-xml-block-icon.png | Bin 0 -> 4029 bytes
.../static/2023.9/images/DashboardsIcon.png | Bin 0 -> 260 bytes
content/static/2023.9/images/Flow.png | Bin 0 -> 79230 bytes
.../static/2023.9/images/Gateway Setup1.png | Bin 0 -> 18229 bytes
.../static/2023.9/images/Gateway Setup2.png | Bin 0 -> 18291 bytes
.../static/2023.9/images/Gateway Setup3.png | Bin 0 -> 18477 bytes
.../static/2023.9/images/Gateway Setup4.png | Bin 0 -> 19993 bytes
.../static/2023.9/images/Gateway Setup5.png | Bin 0 -> 28743 bytes
.../images/Grafana Cloud - Create Stack.png | Bin 0 -> 23004 bytes
.../Grafana Cloud - Dashboards Link.png | Bin 0 -> 2003 bytes
...rafana Cloud - Hosted Logs Config Data.png | Bin 0 -> 86843 bytes
... Cloud - Hosted Logs Config Token Name.png | Bin 0 -> 36672 bytes
...ana Cloud - Hosted Logs Config Usecase.png | Bin 0 -> 11405 bytes
.../images/Grafana Cloud - Hosted Logs.png | Bin 0 -> 3664 bytes
.../2023.9/images/GrafanaConnectionsLink.png | Bin 0 -> 2618 bytes
.../2023.9/images/GrafanaLighteningIcon.png | Bin 0 -> 688 bytes
.../static/2023.9/images/GrafanaMenuIcon.png | Bin 0 -> 353 bytes
content/static/2023.9/images/IIS Bindings.png | Bin 0 -> 14415 bytes
.../2023.9/images/Network Discovery 1.png | Bin 0 -> 6523 bytes
.../2023.9/images/Network Discovery 2.png | Bin 0 -> 11930 bytes
.../2023.9/images/Network Discovery 3.png | Bin 0 -> 10670 bytes
.../images/New Innovation Flow View.PNG | Bin 0 -> 58377 bytes
.../static/2023.9/images/RabbitMQ Status.png | Bin 0 -> 27734 bytes
content/static/2023.9/images/Screenshots.pptx | Bin 0 -> 192187 bytes
...Fabric Explorer - Expiring Certificate.PNG | Bin 0 -> 78840 bytes
...ce Fabric Explorer - Instance - Single.png | Bin 0 -> 82044 bytes
.../Service Fabric Explorer - Instance.png | Bin 0 -> 86654 bytes
...ervice Fabric Explorer - Node - Single.png | Bin 0 -> 69968 bytes
.../images/Service Fabric Explorer - Node.png | Bin 0 -> 74038 bytes
...ice Fabric Explorer - Service - Single.png | Bin 0 -> 91953 bytes
.../Service Fabric Explorer - Service.png | Bin 0 -> 95804 bytes
.../Service Fabric Explorer - Single.png | Bin 0 -> 102115 bytes
.../2023.9/images/Service Fabric Explorer.png | Bin 0 -> 106323 bytes
.../static/2023.9/images/Url Rewrite Icon.png | Bin 0 -> 1619 bytes
.../static/2023.9/images/Variable-Scopes.png | Bin 0 -> 156981 bytes
.../2023.9/images/WaitForAllTasksExample.png | Bin 0 -> 94551 bytes
.../images/Web Platform Installer Icon.png | Bin 0 -> 2706 bytes
content/static/2023.9/images/_ReadMe.md | 9 +
.../static/2023.9/images/action-blocks.svg | 3 +
.../static/2023.9/images/block-exception.gif | Bin 0 -> 32046 bytes
.../2023.9/images/chained-exception.gif | Bin 0 -> 41435 bytes
...chaining-handle-block-exception-blocks.png | Bin 0 -> 15877 bytes
.../2023.9/images/child-execution-in-grid.PNG | Bin 0 -> 87943 bytes
.../static/2023.9/images/decision-blocks.svg | 3 +
.../2023.9/images/discarded-variable.PNG | Bin 0 -> 1168 bytes
.../Cortex Innovation Node Details.png | Bin 0 -> 144866 bytes
...rtex Innovation Overview-Single Server.png | Bin 0 -> 20686 bytes
.../editable/Cortex Innovation Overview.png | Bin 0 -> 57924 bytes
... Innovation and v7.2 Best Architecture.png | Bin 0 -> 78745 bytes
...x Innovation and v7.2 Min Architecture.png | Bin 0 -> 84964 bytes
.../Cortex Innovation v7.2 Single Server.png | Bin 0 -> 26263 bytes
.../Flow Execution Requests - Duration.png | Bin 0 -> 382464 bytes
.../Flow Execution Requests - Errors.png | Bin 0 -> 335979 bytes
.../Flow Execution Requests - Filters.png | Bin 0 -> 20158 bytes
.../Flow Execution Requests - Not Zero.png | Bin 0 -> 175012 bytes
.../Flow Execution Requests - Overview.png | Bin 0 -> 603554 bytes
.../Flow Execution Requests - Requests.png | Bin 0 -> 397547 bytes
...ecution Requests - Time Range extended.png | Bin 0 -> 65200 bytes
.../Flow Execution Requests - Time Range.png | Bin 0 -> 312197 bytes
.../Flow Execution Requests Dashboard.png | Bin 0 -> 2041447 bytes
... Platform Architecture Diagram - Cloud.png | Bin 0 -> 171339 bytes
...form Architecture Diagram - On-Premise.png | Bin 0 -> 187938 bytes
.../Platform Health - Availability.png | Bin 0 -> 173788 bytes
.../Platform Health - Break in Line.png | Bin 0 -> 149286 bytes
.../editable/Platform Health - Duration.png | Bin 0 -> 304543 bytes
.../editable/Platform Health - Errors.png | Bin 0 -> 246802 bytes
.../editable/Platform Health - Filters.png | Bin 0 -> 17559 bytes
.../editable/Platform Health - Not Zeros.png | Bin 0 -> 158708 bytes
.../editable/Platform Health - Overview.png | Bin 0 -> 609302 bytes
.../editable/Platform Health - Requests.png | Bin 0 -> 316764 bytes
.../Platform Health - Time Range extended.png | Bin 0 -> 65109 bytes
.../editable/Platform Health - Time Range.png | Bin 0 -> 313107 bytes
.../editable/Platform Health Dashboard.png | Bin 0 -> 1739773 bytes
.../2023.9/images/editable/editor-types.png | Bin 0 -> 34205 bytes
.../editable/exception-handling-blocks.png | Bin 0 -> 64508 bytes
.../images/editable/variable-editor.png | Bin 0 -> 9045 bytes
.../2023.9/images/exception-in-viewer.PNG | Bin 0 -> 61509 bytes
.../2023.9/images/execution-in-grid.PNG | Bin 0 -> 87466 bytes
.../2023.9/images/flow-control-blocks.svg | 3 +
.../2023.9/images/flow-error-status.png | Bin 0 -> 7106 bytes
.../flow-exception-full-configuration.png | Bin 0 -> 80494 bytes
.../flow-exception-no-configuration.png | Bin 0 -> 41757 bytes
.../static/2023.9/images/flow-exception.gif | Bin 0 -> 62789 bytes
content/static/2023.9/images/loading.gif | Bin 0 -> 49613 bytes
.../static/2023.9/images/messages-grid.PNG | Bin 0 -> 15156 bytes
.../static/2023.9/images/nested-workspace.png | Bin 0 -> 72526 bytes
.../static/2023.9/images/nested-workspace.svg | 3 +
.../what-is-a-variable-anycommand-panel.png | Bin 0 -> 6375 bytes
.../what-is-a-variable-anycommand.png | Bin 0 -> 1763 bytes
.../what-is-a-variable-command-panel.png | Bin 0 -> 5472 bytes
.../what-is-a-variable-dictionary-panel.png | Bin 0 -> 6293 bytes
.../what-is-a-variable-dictionary.png | Bin 0 -> 2215 bytes
.../what-is-a-variable-exception-panel.png | Bin 0 -> 76807 bytes
.../what-is-a-variable-exception.png | Bin 0 -> 1630 bytes
.../variables/what-is-a-variable-string.png | Bin 0 -> 1213 bytes
.../what-is-a-variable-variable-panel-2.png | Bin 0 -> 13784 bytes
.../what-is-a-variable-variable-panel.png | Bin 0 -> 14101 bytes
.../2023.9/images/rethrow-exception.png | Bin 0 -> 18353 bytes
.../images/rethrow-from-list-exception.png | Bin 0 -> 38550 bytes
.../2023.9/images/rethrow-from-subflow.gif | Bin 0 -> 1070584 bytes
.../rethrow-original-list-exception.png | Bin 0 -> 38531 bytes
.../images/run-flow-contract-change.gif | Bin 0 -> 120437 bytes
.../images/run-flow-selecting-a-flow.gif | Bin 0 -> 192569 bytes
...end-email-using-smtp-server-html-email.png | Bin 0 -> 4051 bytes
...mail-using-smtp-server-important-email.png | Bin 0 -> 4447 bytes
.../set-variable-block-timeout.svg | 4 +
.../set-variable/set-variable-description.svg | 4 +
.../set-variable-expression-arithmetic.PNG | Bin 0 -> 4811 bytes
.../set-variable-expression-boolean-and.PNG | Bin 0 -> 5183 bytes
.../set-variable-expression-boolean.PNG | Bin 0 -> 4796 bytes
.../set-variable-expression-casting.PNG | Bin 0 -> 4854 bytes
.../set-variable-expression-char.PNG | Bin 0 -> 4423 bytes
.../set-variable-expression-comparison.PNG | Bin 0 -> 5198 bytes
...ariable-expression-concatenated-string.PNG | Bin 0 -> 5269 bytes
.../set-variable-expression-constructor.PNG | Bin 0 -> 5470 bytes
.../set-variable-expression-double.PNG | Bin 0 -> 4709 bytes
.../set-variable-expression-empty.PNG | Bin 0 -> 4602 bytes
.../set-variable-expression-enum.PNG | Bin 0 -> 5033 bytes
.../set-variable-expression-index.PNG | Bin 0 -> 4771 bytes
.../set-variable-expression-int.PNG | Bin 0 -> 4899 bytes
.../set-variable-expression-int64.PNG | Bin 0 -> 4840 bytes
...ariable-expression-interpolated-string.PNG | Bin 0 -> 5598 bytes
.../set-variable-expression-list.PNG | Bin 0 -> 4770 bytes
.../set-variable-expression-method.PNG | Bin 0 -> 4911 bytes
.../set-variable-expression-properties.PNG | Bin 0 -> 5453 bytes
.../set-variable-expression-single.PNG | Bin 0 -> 4737 bytes
.../set-variable-expression-string.PNG | Bin 0 -> 5359 bytes
.../set-variable-expression-structure.PNG | Bin 0 -> 5657 bytes
.../set-variable-expression-variable.PNG | Bin 0 -> 5036 bytes
...et-variable-expression-verbatim-string.PNG | Bin 0 -> 5332 bytes
.../set-variable/set-variable-run-as.svg | 4 +
.../2023.9/images/top-level-workspace.svg | 3 +
.../static/2023.9/images/variables-grid.PNG | Bin 0 -> 11762 bytes
.../static/2023.9/images/work-in-progress.jpg | Bin 0 -> 99357 bytes
.../static/2023.9/images/workspace-blocks.svg | 3 +
.../2023.9/images/workspace-exception.gif | Bin 0 -> 126962 bytes
.../workspace/workspace-block-semaphore.svg | 4 +
...ex Interaction Portal Deployment Guide.pdf | Bin 0 -> 1041714 bytes
...tex Interaction Portal Developer Guide.pdf | Bin 0 -> 2403710 bytes
...ortex Interaction Portal Merging Guide.pdf | Bin 0 -> 494016 bytes
.../Cortex Interaction Portal User Guide.pdf | Bin 0 -> 1639723 bytes
data/urls.toml | 32 +-
1141 files changed, 72494 insertions(+), 73 deletions(-)
create mode 100644 content/en/blog/releases/2023.X/2023.9.md
create mode 100644 content/en/docs/2023.9/FAQs/_index.md
create mode 100644 content/en/docs/2023.9/Guides/_index.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-gateway/_index.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-gateway/help/_index.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-gateway/help/cortex-release-notes.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-gateway/settings/_index.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-gateway/settings/ldap-authorisation.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-gateway/settings/ldap-connection.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-gateway/settings/license-consumption.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-gateway/settings/packages.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-gateway/settings/studio-authorisation.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-gateway/settings/studio-export.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-gateway/settings/studio-hierarchy.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-gateway/settings/studio-import.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-gateway/settings/version-control.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-gateway/welcome-page/_index.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-innovation/_index.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-innovation/core-application/_index.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-innovation/core-application/services/_index.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-innovation/core-application/services/api-gateway-service/_index.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-innovation/core-application/services/authorisation-service/_index.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-innovation/core-application/services/concurrency-management-service/_index.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-innovation/core-application/services/configuration-management-service/_index.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-innovation/core-application/services/data-storage-service/_index.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-innovation/core-application/services/execution-management-service/_index.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-innovation/core-application/services/licence-management-service/_index.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-innovation/core-application/services/package-management-service/_index.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-innovation/core-application/services/provisioning-service/_index.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-innovation/core-application/services/scheduling-service/_index.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-innovation/core-application/services/triggers-service/_index.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-innovation/execution-application/_index.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-innovation/execution-application/services/_index.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-innovation/execution-application/services/execution-service/_index.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-interaction-portal/_index.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-studio/_index.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-studio/debugging.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-studio/east-panel.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-studio/expression-editor.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-studio/literal-editor.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-studio/main-display-area.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-studio/navigation.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-studio/package-management.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-studio/palettes.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-studio/south-panel.md
create mode 100644 content/en/docs/2023.9/Guides/cortex-studio/variable-editor.md
create mode 100644 content/en/docs/2023.9/Overview/_index.md
create mode 100644 content/en/docs/2023.9/Reference/APIs/_index.md
create mode 100644 content/en/docs/2023.9/Reference/APIs/cortex-gateway/_index.md
create mode 100644 content/en/docs/2023.9/Reference/APIs/cortex-innovation/_index.md
create mode 100644 content/en/docs/2023.9/Reference/APIs/cortex-innovation/core-application/_index.md
create mode 100644 content/en/docs/2023.9/Reference/APIs/cortex-innovation/core-application/services/_index.md
create mode 100644 content/en/docs/2023.9/Reference/APIs/cortex-innovation/core-application/services/api-gateway-service/_index.md
create mode 100644 content/en/docs/2023.9/Reference/APIs/cortex-innovation/core-application/services/licence-management-service/_index.md
create mode 100644 content/en/docs/2023.9/Reference/APIs/cortex-innovation/core-application/services/package-management-service/_index.md
create mode 100644 content/en/docs/2023.9/Reference/APIs/cortex-innovation/core-application/services/provisioning-service/_index.md
create mode 100644 content/en/docs/2023.9/Reference/APIs/cortex-innovation/execution-application/_index.md
create mode 100644 content/en/docs/2023.9/Reference/APIs/cortex-innovation/execution-application/services/_index.md
create mode 100644 content/en/docs/2023.9/Reference/APIs/cortex-innovation/execution-application/services/execution-service/_index.md
create mode 100644 content/en/docs/2023.9/Reference/APIs/cortex-studio/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/add-item/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/add-item/add-item-with-key-block-3.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/contains-item/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/contains-item/contains-item-with-key-and-value-block-3.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/contains-item/contains-item-with-key-block-3.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/contains-item/contains-item-with-value-block-3.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/contains-item/contains-items-with-keys-block-3.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/contains-item/contains-items-with-values-block-3.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-count/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-count/get-count-of-all-items-block-3.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-count/get-count-of-items-with-value-block-3.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-count/get-counts-of-items-with-values-block-3.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-item/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-item/get-all-items-block-3.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-item/get-item-with-key-block-3.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-item/get-items-with-key-block-3.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-key/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-key/get-all-keys-block-3.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-all-items-block-3.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-item-with-key-block-3.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-item-with-value-block-3.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-items-with-key-block-3.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-items-with-keys-block-3.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-items-with-value-block-3.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-items-with-values-block-3.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-all-items-block-3.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-item-with-key-block-3.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-item-with-value-block-3.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-items-with-key-block-3.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-items-with-keys-block-3.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-items-with-value-block-3.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-items-with-values-block-3.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Exceptions/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-block-exception/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-block-exception/handle-block-exception-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-block-exception/handle-block-exception-matching-message-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-block-exception/handle-block-exception-matching-messages-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-block-exception/handle-block-exception-matching-type-name-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-block-exception/handle-block-exception-matching-type-names-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-flow-exception/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-flow-exception/handle-flow-exception-workspace-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-workspace-exception/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-workspace-exception/handle-workspace-exception-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Exceptions/rethrow-exception/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Exceptions/rethrow-exception/rethrow-exception-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Exceptions/throw-exception/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Exceptions/throw-exception/throw-new-flow-exception-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/check-file/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/check-file/check-file-exists-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/check-folder/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/check-folder/check-folder-exists-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-file/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-file/copy-file-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-file/copy-files-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-folder/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-folder/copy-folder-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-folder/copy-folders-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-folder/duplicate-folder-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/create-folder/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/create-folder/create-folder-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/create-folder/create-folders-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/delete-file/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/delete-file/delete-file-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/delete-file/delete-files-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/delete-folder/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/delete-folder/delete-folder-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/delete-folder/delete-folders-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/get-file-information/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/get-file-information/get-file-information-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/get-folder-content/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/get-folder-content/get-folder-content-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/get-folder-information/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/get-folder-information/get-folder-information-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/move-file/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/move-file/move-file-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/move-file/move-files-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/move-folder/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/move-folder/move-folder-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/move-folder/move-folders-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/read-file/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/read-file/read-all-lines-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/read-file/read-all-text-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/rename-folder/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/rename-folder/rename-folder-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/search-file/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/search-file/search-file-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/search-file/search-files-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/write-file/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/write-file/write-all-lines-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/write-file/write-all-text-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/Get-Count/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/Get-Count/get-count-of-all-items-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/Get-Count/get-count-of-items-with-value-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/Get-Count/get-count-of-items-with-values-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/Get-Index/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/Get-Index/get-index-of-item-with-value-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/Get-Index/get-indexes-of-items-with-value-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/add-item/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/add-item/add-item-at-beginning-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/add-item/add-item-at-end-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/add-item/add-item-at-index-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/add-item/add-items-at-beginning-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/add-item/add-items-at-end-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/add-item/add-items-at-index-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/contains-item/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/contains-item/contains-item-with-value-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/contains-item/contains-items-with-values-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/get-item/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-item-at-beginning-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-item-at-end-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-item-at-index-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-items-at-beginning-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-items-at-end-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-items-at-index-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-items-at-indexes-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-all-items-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-duplicate-items-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-item-at-beginning-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-item-at-end-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-item-at-index-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-item-with-value-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-items-at-beginning-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-items-at-end-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-items-at-index-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-items-at-indexes-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-items-with-value-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-items-with-values-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/set-item/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-all-items-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-item-at-beginning-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-item-at-end-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-item-at-index-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-item-with-value-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-items-at-beginning-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-items-at-end-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-items-at-index-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-items-at-indexes-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-items-with-value-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-items-with-values-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/PowerShell/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/PowerShell/execute-powershell-script/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/PowerShell/execute-powershell-script/execute-powershell-script-block-1.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/Convert-To/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/Convert-To/convert-to-camel-case-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/Convert-To/convert-to-lower-case-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/Convert-To/convert-to-pascal-case-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/Convert-To/convert-to-title-case-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/Convert-To/convert-to-upper-case-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/Get-Index/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/Get-Index/get-index-of-text-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/Get-Index/get-indexes-of-text-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/Get-Length/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/Get-Length/get-length-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/add-text/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/add-text/add-text-after-index-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/add-text/add-text-at-beginning-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/add-text/add-text-at-end-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/add-text/add-text-before-index-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/contains-text/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/contains-text/contains-all-text-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/contains-text/contains-any-text-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/contains-text/contains-text-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/decode-text/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/decode-text/decode-text-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/encode-text/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/encode-text/encode-text-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/find-and-remove-text/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/find-and-remove-text/find-and-remove-all-text-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/find-and-remove-text/find-and-remove-text-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/find-and-replace-text/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/find-and-replace-text/find-and-replace-all-text-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/find-and-replace-text/find-and-replace-text-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/format-text/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/format-text/format-text-with-value-block-1.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/format-text/format-text-with-values-block-1.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/get-text/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/get-text/get-text-at-beginning-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/get-text/get-text-at-end-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/get-text/get-text-at-index-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/get-text/get-text-before-index-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/get-text/get-text-between-indexes-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/is-text/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/is-text/is-text-empty-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/is-text/is-text-empty-or-whitespace-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/is-text/is-text-equal-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/is-text/is-text-null-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/is-text/is-text-null-empty-or-whitespace-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/is-text/is-text-null-or-empty-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/join-text/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/join-text/join-text-block-1.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/remove-text/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/remove-text/remove-text-at-beginning-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/remove-text/remove-text-at-end-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/remove-text/remove-text-at-index-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/remove-text/remove-text-before-index-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/remove-text/remove-text-between-indexes-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/split-text/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/Text/split-text/split-text-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/data-storage/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/data-storage/create-collection/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/data-storage/create-collection/create-collection-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/data-storage/delete-collection/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/data-storage/delete-collection/delete-collection-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/data-storage/delete-data/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/data-storage/delete-data/delete-data-with-key-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/data-storage/read-data/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/data-storage/read-data/read-data-with-key-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/data-storage/wait-for-collection/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/data-storage/wait-for-collection/wait-for-collection-to-exist-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/data-storage/wait-for-collection/wait-for-collection-to-not-exist-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/data-storage/wait-for-key-in-collection/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/data-storage/wait-for-key-in-collection/wait-for-key-in-collection-to-be-set-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/data-storage/wait-for-key-in-collection/wait-for-key-in-collection-to-contain-value-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/data-storage/wait-for-key-in-collection/wait-for-key-in-collection-to-exist-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/data-storage/wait-for-key-in-collection/wait-for-key-in-collection-to-not-exist-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/data-storage/write-data/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/data-storage/write-data/write-data-with-key-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/data/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/data/execute-data-command/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/data/execute-data-command/execute-data-command-block-1.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/date-and-time/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/date-and-time/add-time-period/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/date-and-time/add-time-period/add-time-period-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/date-and-time/convert-date-time/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/date-and-time/convert-date-time/convert-date-time-to-text-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/date-and-time/convert-date-time/convert-text-to-date-time-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/date-and-time/get-date-time/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/date-and-time/get-date-time/get-current-date-time-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/date-and-time/get-date-time/get-date-time-component-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/date-and-time/get-time-period/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/date-and-time/get-time-period/get-time-period-between-date-times-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/date-and-time/is-date-time/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/date-and-time/is-date-time/is-date-time-after-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/date-and-time/is-date-time/is-date-time-before-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/date-and-time/is-date-time/is-date-time-between-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/date-and-time/is-date-time/is-date-time-equal-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/date-and-time/subtract-time-period/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/date-and-time/subtract-time-period/subtract-time-period-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/decisions/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/decisions/if/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/decisions/if/if-null-exit-bottom-block-1.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/decisions/if/if-null-exit-right-block-1.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/decisions/if/if-true-exit-bottom-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/decisions/if/if-true-exit-right-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/email/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/email/send-email/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/email/send-email/send-email-using-smtp-server-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/flows/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/flows/end-flow/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/flows/end-flow/end-flow-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/flows/run-flow/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/flows/run-flow/run-flow-async-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/flows/run-flow/run-flow-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/flows/start-flow/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/flows/start-flow/start-flow-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/google-workspace/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/google-workspace/gmail/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/google-workspace/gmail/send-email/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/google-workspace/gmail/send-email/send-email-using-gmail-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/http/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/http/execute-http-request/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/http/execute-http-request/execute-http-request-block-1.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/http/execute-soap-request/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/http/execute-soap-request/execute-soap-request-block-1.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/json/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/json/convert-json/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/json/convert-json/convert-json-to-object-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/json/convert-json/convert-object-to-json-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/logs/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/logs/log-event/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/logs/log-event/log-event-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/loops/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/loops/for-each/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/loops/for-each/for-each-loop-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/loops/for/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/loops/for/for-loop-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/microsoft365/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/microsoft365/outlook/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/microsoft365/outlook/send-email/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/microsoft365/outlook/send-email/send-email-using-microsoft365-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/objects/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/objects/convert-object/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/objects/convert-object/convert-object-to-text-block-1.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/objects/copy-object/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/objects/copy-object/copy-object-block-1.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/queues/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/queues/dequeue-item/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/queues/dequeue-item/dequeue-item-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/queues/dequeue-item/dequeue-items-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/queues/enqueue-item/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/queues/enqueue-item/enqueue-item-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/queues/enqueue-item/enqueue-items-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/queues/get-count/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/queues/get-count/get-count-of-all-items-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/queues/peek-item/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/queues/peek-item/peek-item-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/queues/remove-item/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/queues/remove-item/remove-all-items-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/schedules/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/schedules/wait-for/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/schedules/wait-for/wait-for-duration-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/ssh/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/ssh/execute-ssh-command/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/ssh/execute-ssh-command/execute-ssh-command-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/tasks/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/tasks/cancel-task/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/tasks/cancel-task/cancel-all-tasks-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/tasks/cancel-task/cancel-task-block-1.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/tasks/wait-for-task/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/tasks/wait-for-task/wait-for-all-tasks-block-2.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/tasks/wait-for-task/wait-for-task-block-1.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/telnet/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/telnet/execute-telnet-command/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/telnet/execute-telnet-command/execute-telnet-command-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/variables/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/variables/set-variable/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/variables/set-variable/set-variable-block-1.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/workspaces/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/workspaces/end-workspace/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/workspaces/end-workspace/end-workspace-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/workspaces/start-workspace/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/workspaces/start-workspace/start-workspace-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/workspaces/workspace/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/workspaces/workspace/workspace-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/xml/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/xml/convert-xml/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/xml/convert-xml/convert-structure-to-xml-block.md
create mode 100644 content/en/docs/2023.9/Reference/Blocks/xml/convert-xml/convert-xml-to-structure-block.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/blocks/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/blocks/block-properties/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/blocks/block-properties/advanced-properties.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/blocks/block-properties/common-properties.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/blocks/block-properties/property-editors/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/blocks/block-properties/property-editors/expression-editor.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/blocks/block-properties/property-editors/literal-editor.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/blocks/block-properties/property-editors/variable-editor.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/blocks/block-properties/what-is-a-block-property.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/blocks/handling-exceptions-within-a-block.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/blocks/what-is-a-block.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/data-types/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/data-types/generics.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/data-types/null-and-nullable-types.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/data-types/what-is-a-data-type.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/exceptions/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/exceptions/handling-exceptions.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/exceptions/throwing-exceptions.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/exceptions/what-is-an-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/executions/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/executions/executions-in-development.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/executions/executions-in-production.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/executions/what-is-an-execution.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/flows/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/flows/calling-other-flows.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/flows/handling-exceptions-within-a-flow.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/flows/what-is-a-flow.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/messages/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/messages/what-is-a-message.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/variables/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/variables/using-variables.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/variables/variable-scopes.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/variables/what-is-a-variable.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/workspaces/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/workspaces/handling-exceptions-within-a-workspace.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/fundamentals/workspaces/what-is-a-workspace.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/collections/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/collections/indexes.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/collections/items.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/collections/keys.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/collections/occurrences.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/collections/what-is-a-collection.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/concurrency/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/concurrency/semaphores/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/concurrency/semaphores/what-is-a-semaphore.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/culture/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/culture/current-culture.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/culture/custom-cultures.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/culture/invariant-culture.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/culture/specific-cultures.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/culture/what-is-a-culture.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/data-sources/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/data-sources/supported-data-sources/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/data-sources/supported-data-sources/odbc.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/data-sources/supported-data-sources/sql-server.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/data-sources/what-is-a-data-source.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/date-and-time/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/date-and-time/date-and-time-formatting.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/date-and-time/what-is-date-and-time.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/email/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/email/authentication.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/email/what-is-email.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/enums/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/enums/what-is-an-enum.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/files-and-folders/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/files-and-folders/attributes.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/files-and-folders/paths.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/files-and-folders/what-are-files-and-folders.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/loops/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/loops/what-is-a-loop.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/numbers/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/numbers/what-is-a-number.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/objects/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/objects/object-casting.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/objects/object-equality.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/objects/what-is-an-object.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/scopes/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/scopes/what-is-a-scope.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/tasks/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/text/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/text/casing.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/text/converting-objects-to-text.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/text/empty-text-and-whitespace.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/text/encoding.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/text/equality.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/text/formatting.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/text/pattern-matching-syntax.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/text/regex-syntax.md
create mode 100644 content/en/docs/2023.9/Reference/Concepts/working-with/text/what-is-text.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/Common/Property/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/Common/Property/property-contains-null-item-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/Common/Property/property-contains-null-or-empty-item-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/Common/Property/property-empty-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/Common/Property/property-item-count-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/Common/Property/property-null-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/Common/Property/property-value-out-of-range-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/Common/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/Lists/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/Lists/cannot-modify-read-only-list-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/Lists/duplicate-value-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/Xml/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/Xml/xml-serialization-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/collections/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/collections/occurrence-not-present-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/concurrency/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/concurrency/semaphores/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/concurrency/semaphores/semaphore-could-not-be-acquired-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/data-storage/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/data-storage/data-storage-collection-not-found-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/data-storage/key-in-data-storage-collection-not-found-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/data/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/data/command-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/data/invalid-connection-string-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/decisions/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/decisions/property-not-nullable-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/dictionaries/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/dictionaries/cannot-modify-read-only-dictionary-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/dictionaries/key-not-present-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/dictionaries/key-present-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/dictionaries/keys-not-present-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/email/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/email/email-session-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/files-and-folders/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/files-and-folders/invalid-folder-name-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/files-and-folders/invalid-path-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/files-and-folders/operation-failed-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/flows/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/flows/blocks/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/flows/blocks/block-timeout-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/flows/blocks/invalid-block-timeout-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/flows/blocks/invalid-property-value-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/flows/execution/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/flows/execution/flow-execution-cancelled-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/flows/execution/invalid-input-variables-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/flows/flow-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/http/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/http/http-authorisation-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/http/invalid-request-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/http/invalid-response-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/impersonation/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/impersonation/run-as-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/loops/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/loops/infinite-loop-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/powershell/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/powershell/ps-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/powershell/ps-remoting-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/services/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/services/service-does-not-exist-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/services/service-unavailable-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/ssh/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/ssh/ssh-client-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/ssh/ssh-response-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/tasks/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/tasks/aggregate-task-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/telnet/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/telnet/telnet-client-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/telnet/telnet-server-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/text/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/text/encoding/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/text/encoding/text-decoding-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/text/regex/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Exceptions/text/regex/regex-parsing-failed-exception.md
create mode 100644 content/en/docs/2023.9/Reference/Glossary/0-9.md
create mode 100644 content/en/docs/2023.9/Reference/Glossary/_index.md
create mode 100644 content/en/docs/2023.9/Reference/Glossary/a-e.md
create mode 100644 content/en/docs/2023.9/Reference/Glossary/f-j.md
create mode 100644 content/en/docs/2023.9/Reference/Glossary/k-o.md
create mode 100644 content/en/docs/2023.9/Reference/Glossary/p-t.md
create mode 100644 content/en/docs/2023.9/Reference/Glossary/u-z.md
create mode 100644 content/en/docs/2023.9/Reference/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/all/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/all/dynamic.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/all/object.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/collections/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/collections/array.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/collections/dictionary-2.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/collections/icomparer-1.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/collections/idictionary-2.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/collections/ienumerable-1.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/collections/ienumerable.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/collections/ilist-1.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/collections/list-1.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/collections/queuewithpriority-2.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/collections/structure.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/concurrency/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/concurrency/semaphores/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/concurrency/semaphores/queue-settings.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/concurrency/semaphores/semaphore-settings.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/conditional-logic/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/conditional-logic/boolean.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/credentials/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/credentials/usercredentials.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/data/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/data/command.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/data/commands.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/data/connectiondetails.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/data/datacommand.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/data/nonquerycommand.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/data/odbcconnectiondetails.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/data/querycommand.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/data/sqlserverconnectiondetails.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/date-and-time/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/date-and-time/datetime.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/date-and-time/datetimecomponenttype.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/date-and-time/datetimeoffset.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/date-and-time/dayofweek.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/date-and-time/timeperiod.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/date-and-time/timespan.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/email/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/email/authentication/EmailCredentials.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/email/authentication/EmailUserCredentials.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/email/authentication/IEmailCredentials.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/email/authentication/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/email/basicemailsessiondetails.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/email/emailaddress.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/email/emailmessage.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/email/emailmessagebodyformat.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/email/emailmessagepriority.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/email/emailsessionerrorcode.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/exceptions/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/exceptions/exception.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/files-and-folders/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/files-and-folders/contentoptions.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/files-and-folders/fileinformation.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/files-and-folders/filematch.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/files-and-folders/folderinformation.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/flows/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/flows/flowreference.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/flows/inputvariables.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/google-workspace/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/google-workspace/gmail/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/google-workspace/gmail/authentication/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/google-workspace/gmail/authentication/oauth/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/google-workspace/gmail/authentication/oauth/gmailoauthcertificatecredentials.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/google-workspace/gmail/gmailsessiondetails.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/http/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/http/authentication/HttpCredentials.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/http/authentication/HttpUserCredentials.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/http/authentication/IHttpCredentials.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/http/authentication/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/http/authentication/oauth/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/http/authentication/oauth/clientauthentication.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/http/authentication/oauth/clientauthtype.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/http/authentication/oauth/httpoauthclientcredentials.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/http/authentication/oauth/httpoauthcredentials.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/http/authentication/oauth/httpoauthpasswordcredentials.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/http/httprequestversion.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/http/request.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/http/requestcontenttype.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/http/requestverb.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/http/rest/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/http/rest/httprequest.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/http/rest/httpresponse.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/http/soap/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/http/soap/soap11message.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/http/soap/soap12message.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/http/soap/soapmessage.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/http/soap/soaprequest.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/http/soap/soapresponse.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/json/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/json/jsonserializersettings.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/logs/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/logs/eventseverity.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/loops/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/loops/infinitelooperrorcode.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/microsoft365/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/microsoft365/authentication/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/microsoft365/authentication/oauth/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/microsoft365/authentication/oauth/microsoft365credentials.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/microsoft365/authentication/oauth/microsoft365oauthcertificatecredentials.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/microsoft365/authentication/oauth/microsoft365oauthcredentials.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/most-common/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/numbers/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/numbers/double.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/numbers/int16.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/numbers/int32.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/numbers/int64.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/numbers/single.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/other/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/other/guid.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/other/nullable-1.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/powershell/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/powershell/powershellsessiondetails.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/powershell/powershellwinrmsessiondetails.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/powershell/records.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/scopes/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/scopes/scope-option.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/scopes/scope.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/session-details/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/session-details/serverdetails.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/ssh/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/ssh/authentication/ISshCredentials.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/ssh/authentication/SshCredentials.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/ssh/authentication/SshUserCredentials.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/ssh/authentication/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/ssh/authentication/sshcertificatecredentials.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/ssh/sshlogs.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/ssh/sshsessiondetails.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/tasks/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/tasks/executiontask.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/tasks/iexecutiontask.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/tasks/itask-1.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/telnet/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/telnet/telnetclienterrorcode.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/telnet/telnetlogs.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/telnet/telnetservererrorcode.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/telnet/telnetsessiondetails.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/text/_index.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/text/char.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/text/cultureinfo.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/text/encoding.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/text/encryptabletext.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/text/encryptedtext.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/text/iformatprovider.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/text/searchoptions.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/text/string.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/text/stringcomparer.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/text/stringcomparison.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/text/stringsplitoptions.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/text/textdecodingerrorcode.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/text/textencodingformat.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/text/unicodeencoding.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/text/utf32encoding.md
create mode 100644 content/en/docs/2023.9/Reference/data-types/text/utf8encoding.md
create mode 100644 content/en/docs/2023.9/Reference/logs/_index.md
create mode 100644 content/en/docs/2023.9/Reference/logs/cortex-gateway/_index.md
create mode 100644 content/en/docs/2023.9/Reference/logs/cortex-innovation/_index.md
create mode 100644 content/en/docs/2023.9/Reference/logs/cortex-innovation/core-application/_index.md
create mode 100644 content/en/docs/2023.9/Reference/logs/cortex-innovation/core-application/services/_index.md
create mode 100644 content/en/docs/2023.9/Reference/logs/cortex-innovation/core-application/services/api-gateway-service/_index.md
create mode 100644 content/en/docs/2023.9/Reference/logs/cortex-innovation/core-application/services/cortex-provisioning-service/_index.md
create mode 100644 content/en/docs/2023.9/Reference/logs/cortex-innovation/core-application/services/licence-management-service/_index.md
create mode 100644 content/en/docs/2023.9/Reference/logs/cortex-innovation/core-application/services/package-management-service/_index.md
create mode 100644 content/en/docs/2023.9/Reference/logs/cortex-innovation/execution-application/_index.md
create mode 100644 content/en/docs/2023.9/Reference/logs/cortex-innovation/execution-application/services/_index.md
create mode 100644 content/en/docs/2023.9/Reference/logs/cortex-innovation/execution-application/services/execution-service/_index.md
create mode 100644 content/en/docs/2023.9/Reference/logs/cortex-studio/_index.md
create mode 100644 content/en/docs/2023.9/Reference/messages/_index.md
create mode 100644 content/en/docs/2023.9/Reference/messages/validation/_index.md
create mode 100644 content/en/docs/2023.9/Reference/messages/validation/errors/_index.md
create mode 100644 content/en/docs/2023.9/Reference/observability/_index.md
create mode 100644 content/en/docs/2023.9/Reference/observability/grafana/_index.md
create mode 100644 content/en/docs/2023.9/Reference/observability/grafana/advanced-setup/_index.md
create mode 100644 content/en/docs/2023.9/Reference/observability/grafana/advanced-setup/configuring-thresholds.md
create mode 100644 content/en/docs/2023.9/Reference/observability/grafana/dashboards/_index.md
create mode 100644 content/en/docs/2023.9/Reference/observability/grafana/dashboards/flow-execution-requests.md
create mode 100644 content/en/docs/2023.9/Reference/observability/grafana/dashboards/platform-health.md
create mode 100644 content/en/docs/2023.9/Reference/troubleshooting/_index.md
create mode 100644 content/en/docs/2023.9/Reference/troubleshooting/installation.md
create mode 100644 content/en/docs/2023.9/Tutorials/Installation/_index.md
create mode 100644 content/en/docs/2023.9/Tutorials/Setup/_index.md
create mode 100644 content/en/docs/2023.9/Tutorials/_index.md
create mode 100644 content/en/docs/2023.9/Tutorials/administration.md
create mode 100644 content/en/docs/2023.9/Tutorials/development.md
create mode 100644 content/en/docs/2023.9/Tutorials/troubleshooting.md
create mode 100644 content/en/docs/2023.9/Whats New/_index.md
create mode 100644 content/en/docs/2023.9/_index.md
create mode 100644 content/en/docs/2023.9/_shared/_index.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/multi-server.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/node-details.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/purpose/api-gateway-service.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/purpose/authorisation-service.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/purpose/concurrency-management-service.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/purpose/configuration-management-service.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/purpose/cortex-block-packages.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/purpose/cortex-gateway-databases.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/purpose/cortex-gateway.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/purpose/cortex-innovation-core-application.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/purpose/cortex-innovation-execution-application.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/purpose/cortex-studio.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/purpose/data-storage-service.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/purpose/erlang-otp.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/purpose/execution-management-service.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/purpose/execution-service.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/purpose/gobetween.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/purpose/licence-management-service.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/purpose/ms-service-fabric-explorer.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/purpose/ms-service-fabric.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/purpose/ms-sql-server.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/purpose/nssm.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/purpose/package-management-service.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/purpose/particular-nservicebus.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/purpose/pivotal-rabbitmq.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/purpose/provisioning-service.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/purpose/scheduling-service.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/purpose/triggers-service.md
create mode 100644 content/en/docs/2023.9/_shared/architecture/components/single-server.md
create mode 100644 content/en/docs/2023.9/_shared/currentVersion.md
create mode 100644 content/en/docs/2023.9/_shared/install-application-server/check-application-services/multi-server.md
create mode 100644 content/en/docs/2023.9/_shared/install-application-server/check-application-services/single-server.md
create mode 100644 content/en/docs/2023.9/_shared/port-requirements/description/api-gateway.md
create mode 100644 content/en/docs/2023.9/_shared/port-requirements/description/authorisation.md
create mode 100644 content/en/docs/2023.9/_shared/port-requirements/description/configuration-management.md
create mode 100644 content/en/docs/2023.9/_shared/port-requirements/description/data-storage.md
create mode 100644 content/en/docs/2023.9/_shared/port-requirements/description/execution-management.md
create mode 100644 content/en/docs/2023.9/_shared/port-requirements/description/execution.md
create mode 100644 content/en/docs/2023.9/_shared/port-requirements/description/licence-management.md
create mode 100644 content/en/docs/2023.9/_shared/port-requirements/description/package-management.md
create mode 100644 content/en/docs/2023.9/_shared/port-requirements/description/provisioning.md
create mode 100644 content/en/docs/2023.9/_shared/port-requirements/description/triggers-snmp.md
create mode 100644 content/en/docs/2023.9/getting-started/_index.md
create mode 100644 content/en/docs/2023.9/getting-started/cloud/_index.md
create mode 100644 content/en/docs/2023.9/getting-started/cloud/add-observability-to-innovation/Grafana/_index.md
create mode 100644 content/en/docs/2023.9/getting-started/cloud/add-observability-to-innovation/Grafana/architecture.md
create mode 100644 content/en/docs/2023.9/getting-started/cloud/add-observability-to-innovation/Grafana/import-dashboards.md
create mode 100644 content/en/docs/2023.9/getting-started/cloud/add-observability-to-innovation/Grafana/install-promtail/_index.md
create mode 100644 content/en/docs/2023.9/getting-started/cloud/add-observability-to-innovation/Grafana/install-promtail/configure-promtail.md
create mode 100644 content/en/docs/2023.9/getting-started/cloud/add-observability-to-innovation/Grafana/install-promtail/install-promtail.md
create mode 100644 content/en/docs/2023.9/getting-started/cloud/add-observability-to-innovation/Grafana/prerequisites.md
create mode 100644 content/en/docs/2023.9/getting-started/cloud/add-observability-to-innovation/Grafana/setup-grafana.md
create mode 100644 content/en/docs/2023.9/getting-started/cloud/add-observability-to-innovation/Grafana/setup-loki.md
create mode 100644 content/en/docs/2023.9/getting-started/cloud/add-observability-to-innovation/Grafana/try-it-out.md
create mode 100644 content/en/docs/2023.9/getting-started/cloud/add-observability-to-innovation/_index.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/_index.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-innovation-to-72/_index.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-innovation-to-72/multiple-server-with-ha/_index.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-innovation-to-72/multiple-server-with-ha/architecture.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-innovation-to-72/multiple-server-with-ha/install-application-and-loadbalancer-servers.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-innovation-to-72/multiple-server-with-ha/install-web-application-server.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-innovation-to-72/multiple-server-with-ha/prerequisites.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-innovation-to-72/multiple-server-with-ha/try-it-out.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-innovation-to-72/single-server-without-ha/_index.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-innovation-to-72/single-server-without-ha/architecture.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-innovation-to-72/single-server-without-ha/install-application-server.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-innovation-to-72/single-server-without-ha/install-web-application-server.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-innovation-to-72/single-server-without-ha/prerequisites.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-innovation-to-72/single-server-without-ha/try-it-out.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-interaction-portal-to-innovation/_index.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-observability-to-innovation/Grafana/_index.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-observability-to-innovation/Grafana/advanced/_index.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-observability-to-innovation/Grafana/advanced/port-requirements.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-observability-to-innovation/Grafana/advanced/self-signed-certificates.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-observability-to-innovation/Grafana/advanced/ssl-best-practices.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-observability-to-innovation/Grafana/architecture.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-observability-to-innovation/Grafana/install-grafana/_index.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-observability-to-innovation/Grafana/install-grafana/configure-grafana.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-observability-to-innovation/Grafana/install-grafana/install-grafana.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-observability-to-innovation/Grafana/install-loki/_index.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-observability-to-innovation/Grafana/install-loki/configure-loki.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-observability-to-innovation/Grafana/install-loki/install-loki.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-observability-to-innovation/Grafana/install-promtail/_index.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-observability-to-innovation/Grafana/install-promtail/configure-promtail.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-observability-to-innovation/Grafana/install-promtail/install-promtail.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-observability-to-innovation/Grafana/prerequisites.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-observability-to-innovation/Grafana/setup-grafana.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-observability-to-innovation/Grafana/try-it-out.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/add-observability-to-innovation/_index.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/install-innovation-only/_index.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/install-innovation-only/advanced/_index.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/install-innovation-only/advanced/advanced-config-changes.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/install-innovation-only/advanced/configure-firewalls.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/install-innovation-only/advanced/encrypt-text.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/install-innovation-only/advanced/port-requirements.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/install-innovation-only/advanced/rollover-certificates.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/install-innovation-only/advanced/self-signed-certificates.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/install-innovation-only/advanced/ssl-best-practices.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/install-innovation-only/advanced/tde.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/install-innovation-only/multiple-server-with-ha/_index.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/install-innovation-only/multiple-server-with-ha/architecture.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/install-innovation-only/multiple-server-with-ha/install-application-and-loadbalancer-servers.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/install-innovation-only/multiple-server-with-ha/install-web-application-server.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/install-innovation-only/multiple-server-with-ha/prerequisites.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/install-innovation-only/multiple-server-with-ha/setup-gateway.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/install-innovation-only/multiple-server-with-ha/try-it-out.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/install-innovation-only/single-server-without-ha/_index.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/install-innovation-only/single-server-without-ha/architecture.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/install-innovation-only/single-server-without-ha/install-application-server.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/install-innovation-only/single-server-without-ha/install-web-application-server.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/install-innovation-only/single-server-without-ha/prerequisites.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/install-innovation-only/single-server-without-ha/setup-gateway.md
create mode 100644 content/en/docs/2023.9/getting-started/on-premise/install-innovation-only/single-server-without-ha/try-it-out.md
create mode 100644 content/static/2023.9/blocks/SEQ-VARIABLE-STORE.png
create mode 100644 content/static/2023.9/blocks/data-execute-command-block-icon.png
create mode 100644 content/static/2023.9/blocks/data-storage-create-collection-block.png
create mode 100644 content/static/2023.9/blocks/data-storage-delete-collection-block.png
create mode 100644 content/static/2023.9/blocks/data-storage-delete-data-with-key-block.png
create mode 100644 content/static/2023.9/blocks/data-storage-read-data-with-key-block.png
create mode 100644 content/static/2023.9/blocks/data-storage-wait-for-collection-block.png
create mode 100644 content/static/2023.9/blocks/data-storage-wait-for-key-in-collection-block.png
create mode 100644 content/static/2023.9/blocks/data-storage-write-data-with-key-block.png
create mode 100644 content/static/2023.9/blocks/date-and-time-add-block-icon.png
create mode 100644 content/static/2023.9/blocks/date-and-time-convert-to-datetime-block-icon.png
create mode 100644 content/static/2023.9/blocks/date-and-time-convert-to-text-block-icon.png
create mode 100644 content/static/2023.9/blocks/date-and-time-get-block-icon.png
create mode 100644 content/static/2023.9/blocks/date-and-time-is-block-icon.png
create mode 100644 content/static/2023.9/blocks/date-and-time-subtract-block-icon.png
create mode 100644 content/static/2023.9/blocks/decisions-if-true-exit-bottom-block-icon.png
create mode 100644 content/static/2023.9/blocks/decisions-if-true-exit-right-block-icon.png
create mode 100644 content/static/2023.9/blocks/dictionaries-add-block-icon.png
create mode 100644 content/static/2023.9/blocks/dictionaries-contains-block-icon.png
create mode 100644 content/static/2023.9/blocks/dictionaries-get-all-items-block-icon.png
create mode 100644 content/static/2023.9/blocks/dictionaries-get-all-keys-block-icon.png
create mode 100644 content/static/2023.9/blocks/dictionaries-get-block-icon.png
create mode 100644 content/static/2023.9/blocks/dictionaries-get-count-block-icon.png
create mode 100644 content/static/2023.9/blocks/dictionaries-remove-block-icon.png
create mode 100644 content/static/2023.9/blocks/dictionaries-set-block-icon.png
create mode 100644 content/static/2023.9/blocks/email-send-email-using-smtp-server-block-icon.png
create mode 100644 content/static/2023.9/blocks/exceptions-handle-block-block-icon.png
create mode 100644 content/static/2023.9/blocks/exceptions-handle-flow-block-icon.png
create mode 100644 content/static/2023.9/blocks/exceptions-handle-workspace-block-icon.png
create mode 100644 content/static/2023.9/blocks/exceptions-rethrow-block-icon.png
create mode 100644 content/static/2023.9/blocks/exceptions-throw-block-icon.png
create mode 100644 content/static/2023.9/blocks/execute-telnet-command-block-icon.png
create mode 100644 content/static/2023.9/blocks/files-check-block-icon.png
create mode 100644 content/static/2023.9/blocks/files-copy-block-icon.png
create mode 100644 content/static/2023.9/blocks/files-delete-block-icon.png
create mode 100644 content/static/2023.9/blocks/files-get-information-block-icon.png
create mode 100644 content/static/2023.9/blocks/files-move-block-icon.png
create mode 100644 content/static/2023.9/blocks/files-read-block-icon.png
create mode 100644 content/static/2023.9/blocks/files-search-block-icon.png
create mode 100644 content/static/2023.9/blocks/files-write-block-icon.png
create mode 100644 content/static/2023.9/blocks/flows-end-flow-block-icon.png
create mode 100644 content/static/2023.9/blocks/flows-run-flow-block-icon.png
create mode 100644 content/static/2023.9/blocks/flows-start-flow-block-icon.png
create mode 100644 content/static/2023.9/blocks/folders-check-block-icon.png
create mode 100644 content/static/2023.9/blocks/folders-copy-block-icon.png
create mode 100644 content/static/2023.9/blocks/folders-create-block-icon.png
create mode 100644 content/static/2023.9/blocks/folders-delete-block-icon.png
create mode 100644 content/static/2023.9/blocks/folders-get-content-block-icon.png
create mode 100644 content/static/2023.9/blocks/folders-get-information-block-icon.png
create mode 100644 content/static/2023.9/blocks/folders-move-block-icon.png
create mode 100644 content/static/2023.9/blocks/folders-rename-block-icon.png
create mode 100644 content/static/2023.9/blocks/google-workspace-send-email-using-gmail-block-icon.png
create mode 100644 content/static/2023.9/blocks/http-execute-http-request-block-icon.png
create mode 100644 content/static/2023.9/blocks/http-execute-soap-request-block-icon.png
create mode 100644 content/static/2023.9/blocks/json-convert-to-json-block-icon.png
create mode 100644 content/static/2023.9/blocks/json-convert-to-object-block-icon.png
create mode 100644 content/static/2023.9/blocks/lists-add-block-icon.png
create mode 100644 content/static/2023.9/blocks/lists-contains-block-icon.png
create mode 100644 content/static/2023.9/blocks/lists-get-block-icon.png
create mode 100644 content/static/2023.9/blocks/lists-get-count-block-icon.png
create mode 100644 content/static/2023.9/blocks/lists-get-index-block-icon.png
create mode 100644 content/static/2023.9/blocks/lists-remove-block-icon.png
create mode 100644 content/static/2023.9/blocks/lists-set-block-icon.png
create mode 100644 content/static/2023.9/blocks/logs-log-event-block-icon.png
create mode 100644 content/static/2023.9/blocks/loops-for-each-loop-block-icon.png
create mode 100644 content/static/2023.9/blocks/loops-for-loop-block-icon.png
create mode 100644 content/static/2023.9/blocks/microsoft365-send-email-using-microsoft365-block-icon.png
create mode 100644 content/static/2023.9/blocks/objects-convert-block-icon.png
create mode 100644 content/static/2023.9/blocks/objects-copy-block-icon.png
create mode 100644 content/static/2023.9/blocks/powershell-execute-powershell-script-block-icon.png
create mode 100644 content/static/2023.9/blocks/queues-dequeue-block-icon.png
create mode 100644 content/static/2023.9/blocks/queues-enqueue-block-icon.png
create mode 100644 content/static/2023.9/blocks/queues-get-count-block-icon.png
create mode 100644 content/static/2023.9/blocks/queues-peek-block-icon.png
create mode 100644 content/static/2023.9/blocks/queues-remove-all-items-block-icon.png
create mode 100644 content/static/2023.9/blocks/schedules-wait-for-block-icon.png
create mode 100644 content/static/2023.9/blocks/ssh-execute-ssh-command-block-icon.png
create mode 100644 content/static/2023.9/blocks/tasks-cancel-task-block.png
create mode 100644 content/static/2023.9/blocks/tasks-wait-for-task-block-icon.png
create mode 100644 content/static/2023.9/blocks/text-add-block-icon.png
create mode 100644 content/static/2023.9/blocks/text-contains-block-icon.png
create mode 100644 content/static/2023.9/blocks/text-convert-block-icon.png
create mode 100644 content/static/2023.9/blocks/text-decode-block-icon.png
create mode 100644 content/static/2023.9/blocks/text-encode-text-block-icon.png
create mode 100644 content/static/2023.9/blocks/text-find-and-remove-block-icon.png
create mode 100644 content/static/2023.9/blocks/text-find-and-replace-block-icon.png
create mode 100644 content/static/2023.9/blocks/text-format-block-icon.png
create mode 100644 content/static/2023.9/blocks/text-get-block-icon.png
create mode 100644 content/static/2023.9/blocks/text-get-index-block-icon.png
create mode 100644 content/static/2023.9/blocks/text-get-length-block-icon.png
create mode 100644 content/static/2023.9/blocks/text-is-block-icon.png
create mode 100644 content/static/2023.9/blocks/text-join-block-icon.png
create mode 100644 content/static/2023.9/blocks/text-remove-block-icon.png
create mode 100644 content/static/2023.9/blocks/text-split-block-icon.png
create mode 100644 content/static/2023.9/blocks/variables-set-variable-block-icon.png
create mode 100644 content/static/2023.9/blocks/workspaces-end-workspace-block-icon.png
create mode 100644 content/static/2023.9/blocks/workspaces-start-workspace-block-icon.png
create mode 100644 content/static/2023.9/blocks/workspaces-workspace-block-icon.png
create mode 100644 content/static/2023.9/blocks/xml-convert-to-structure-block-icon.png
create mode 100644 content/static/2023.9/blocks/xml-convert-to-xml-block-icon.png
create mode 100644 content/static/2023.9/images/DashboardsIcon.png
create mode 100644 content/static/2023.9/images/Flow.png
create mode 100644 content/static/2023.9/images/Gateway Setup1.png
create mode 100644 content/static/2023.9/images/Gateway Setup2.png
create mode 100644 content/static/2023.9/images/Gateway Setup3.png
create mode 100644 content/static/2023.9/images/Gateway Setup4.png
create mode 100644 content/static/2023.9/images/Gateway Setup5.png
create mode 100644 content/static/2023.9/images/Grafana Cloud - Create Stack.png
create mode 100644 content/static/2023.9/images/Grafana Cloud - Dashboards Link.png
create mode 100644 content/static/2023.9/images/Grafana Cloud - Hosted Logs Config Data.png
create mode 100644 content/static/2023.9/images/Grafana Cloud - Hosted Logs Config Token Name.png
create mode 100644 content/static/2023.9/images/Grafana Cloud - Hosted Logs Config Usecase.png
create mode 100644 content/static/2023.9/images/Grafana Cloud - Hosted Logs.png
create mode 100644 content/static/2023.9/images/GrafanaConnectionsLink.png
create mode 100644 content/static/2023.9/images/GrafanaLighteningIcon.png
create mode 100644 content/static/2023.9/images/GrafanaMenuIcon.png
create mode 100644 content/static/2023.9/images/IIS Bindings.png
create mode 100644 content/static/2023.9/images/Network Discovery 1.png
create mode 100644 content/static/2023.9/images/Network Discovery 2.png
create mode 100644 content/static/2023.9/images/Network Discovery 3.png
create mode 100644 content/static/2023.9/images/New Innovation Flow View.PNG
create mode 100644 content/static/2023.9/images/RabbitMQ Status.png
create mode 100644 content/static/2023.9/images/Screenshots.pptx
create mode 100644 content/static/2023.9/images/Service Fabric Explorer - Expiring Certificate.PNG
create mode 100644 content/static/2023.9/images/Service Fabric Explorer - Instance - Single.png
create mode 100644 content/static/2023.9/images/Service Fabric Explorer - Instance.png
create mode 100644 content/static/2023.9/images/Service Fabric Explorer - Node - Single.png
create mode 100644 content/static/2023.9/images/Service Fabric Explorer - Node.png
create mode 100644 content/static/2023.9/images/Service Fabric Explorer - Service - Single.png
create mode 100644 content/static/2023.9/images/Service Fabric Explorer - Service.png
create mode 100644 content/static/2023.9/images/Service Fabric Explorer - Single.png
create mode 100644 content/static/2023.9/images/Service Fabric Explorer.png
create mode 100644 content/static/2023.9/images/Url Rewrite Icon.png
create mode 100644 content/static/2023.9/images/Variable-Scopes.png
create mode 100644 content/static/2023.9/images/WaitForAllTasksExample.png
create mode 100644 content/static/2023.9/images/Web Platform Installer Icon.png
create mode 100644 content/static/2023.9/images/_ReadMe.md
create mode 100644 content/static/2023.9/images/action-blocks.svg
create mode 100644 content/static/2023.9/images/block-exception.gif
create mode 100644 content/static/2023.9/images/chained-exception.gif
create mode 100644 content/static/2023.9/images/chaining-handle-block-exception-blocks.png
create mode 100644 content/static/2023.9/images/child-execution-in-grid.PNG
create mode 100644 content/static/2023.9/images/decision-blocks.svg
create mode 100644 content/static/2023.9/images/discarded-variable.PNG
create mode 100644 content/static/2023.9/images/editable/Cortex Innovation Node Details.png
create mode 100644 content/static/2023.9/images/editable/Cortex Innovation Overview-Single Server.png
create mode 100644 content/static/2023.9/images/editable/Cortex Innovation Overview.png
create mode 100644 content/static/2023.9/images/editable/Cortex Innovation and v7.2 Best Architecture.png
create mode 100644 content/static/2023.9/images/editable/Cortex Innovation and v7.2 Min Architecture.png
create mode 100644 content/static/2023.9/images/editable/Cortex Innovation v7.2 Single Server.png
create mode 100644 content/static/2023.9/images/editable/Flow Execution Requests - Duration.png
create mode 100644 content/static/2023.9/images/editable/Flow Execution Requests - Errors.png
create mode 100644 content/static/2023.9/images/editable/Flow Execution Requests - Filters.png
create mode 100644 content/static/2023.9/images/editable/Flow Execution Requests - Not Zero.png
create mode 100644 content/static/2023.9/images/editable/Flow Execution Requests - Overview.png
create mode 100644 content/static/2023.9/images/editable/Flow Execution Requests - Requests.png
create mode 100644 content/static/2023.9/images/editable/Flow Execution Requests - Time Range extended.png
create mode 100644 content/static/2023.9/images/editable/Flow Execution Requests - Time Range.png
create mode 100644 content/static/2023.9/images/editable/Flow Execution Requests Dashboard.png
create mode 100644 content/static/2023.9/images/editable/Grafana Platform Architecture Diagram - Cloud.png
create mode 100644 content/static/2023.9/images/editable/Grafana Platform Architecture Diagram - On-Premise.png
create mode 100644 content/static/2023.9/images/editable/Platform Health - Availability.png
create mode 100644 content/static/2023.9/images/editable/Platform Health - Break in Line.png
create mode 100644 content/static/2023.9/images/editable/Platform Health - Duration.png
create mode 100644 content/static/2023.9/images/editable/Platform Health - Errors.png
create mode 100644 content/static/2023.9/images/editable/Platform Health - Filters.png
create mode 100644 content/static/2023.9/images/editable/Platform Health - Not Zeros.png
create mode 100644 content/static/2023.9/images/editable/Platform Health - Overview.png
create mode 100644 content/static/2023.9/images/editable/Platform Health - Requests.png
create mode 100644 content/static/2023.9/images/editable/Platform Health - Time Range extended.png
create mode 100644 content/static/2023.9/images/editable/Platform Health - Time Range.png
create mode 100644 content/static/2023.9/images/editable/Platform Health Dashboard.png
create mode 100644 content/static/2023.9/images/editable/editor-types.png
create mode 100644 content/static/2023.9/images/editable/exception-handling-blocks.png
create mode 100644 content/static/2023.9/images/editable/variable-editor.png
create mode 100644 content/static/2023.9/images/exception-in-viewer.PNG
create mode 100644 content/static/2023.9/images/execution-in-grid.PNG
create mode 100644 content/static/2023.9/images/flow-control-blocks.svg
create mode 100644 content/static/2023.9/images/flow-error-status.png
create mode 100644 content/static/2023.9/images/flow-exception-full-configuration.png
create mode 100644 content/static/2023.9/images/flow-exception-no-configuration.png
create mode 100644 content/static/2023.9/images/flow-exception.gif
create mode 100644 content/static/2023.9/images/loading.gif
create mode 100644 content/static/2023.9/images/messages-grid.PNG
create mode 100644 content/static/2023.9/images/nested-workspace.png
create mode 100644 content/static/2023.9/images/nested-workspace.svg
create mode 100644 content/static/2023.9/images/reference/concepts/fundamentals/variables/what-is-a-variable-anycommand-panel.png
create mode 100644 content/static/2023.9/images/reference/concepts/fundamentals/variables/what-is-a-variable-anycommand.png
create mode 100644 content/static/2023.9/images/reference/concepts/fundamentals/variables/what-is-a-variable-command-panel.png
create mode 100644 content/static/2023.9/images/reference/concepts/fundamentals/variables/what-is-a-variable-dictionary-panel.png
create mode 100644 content/static/2023.9/images/reference/concepts/fundamentals/variables/what-is-a-variable-dictionary.png
create mode 100644 content/static/2023.9/images/reference/concepts/fundamentals/variables/what-is-a-variable-exception-panel.png
create mode 100644 content/static/2023.9/images/reference/concepts/fundamentals/variables/what-is-a-variable-exception.png
create mode 100644 content/static/2023.9/images/reference/concepts/fundamentals/variables/what-is-a-variable-string.png
create mode 100644 content/static/2023.9/images/reference/concepts/fundamentals/variables/what-is-a-variable-variable-panel-2.png
create mode 100644 content/static/2023.9/images/reference/concepts/fundamentals/variables/what-is-a-variable-variable-panel.png
create mode 100644 content/static/2023.9/images/rethrow-exception.png
create mode 100644 content/static/2023.9/images/rethrow-from-list-exception.png
create mode 100644 content/static/2023.9/images/rethrow-from-subflow.gif
create mode 100644 content/static/2023.9/images/rethrow-original-list-exception.png
create mode 100644 content/static/2023.9/images/run-flow-contract-change.gif
create mode 100644 content/static/2023.9/images/run-flow-selecting-a-flow.gif
create mode 100644 content/static/2023.9/images/send-email-using-smtp-server-html-email.png
create mode 100644 content/static/2023.9/images/send-email-using-smtp-server-important-email.png
create mode 100644 content/static/2023.9/images/set-variable/set-variable-block-timeout.svg
create mode 100644 content/static/2023.9/images/set-variable/set-variable-description.svg
create mode 100644 content/static/2023.9/images/set-variable/set-variable-expression-arithmetic.PNG
create mode 100644 content/static/2023.9/images/set-variable/set-variable-expression-boolean-and.PNG
create mode 100644 content/static/2023.9/images/set-variable/set-variable-expression-boolean.PNG
create mode 100644 content/static/2023.9/images/set-variable/set-variable-expression-casting.PNG
create mode 100644 content/static/2023.9/images/set-variable/set-variable-expression-char.PNG
create mode 100644 content/static/2023.9/images/set-variable/set-variable-expression-comparison.PNG
create mode 100644 content/static/2023.9/images/set-variable/set-variable-expression-concatenated-string.PNG
create mode 100644 content/static/2023.9/images/set-variable/set-variable-expression-constructor.PNG
create mode 100644 content/static/2023.9/images/set-variable/set-variable-expression-double.PNG
create mode 100644 content/static/2023.9/images/set-variable/set-variable-expression-empty.PNG
create mode 100644 content/static/2023.9/images/set-variable/set-variable-expression-enum.PNG
create mode 100644 content/static/2023.9/images/set-variable/set-variable-expression-index.PNG
create mode 100644 content/static/2023.9/images/set-variable/set-variable-expression-int.PNG
create mode 100644 content/static/2023.9/images/set-variable/set-variable-expression-int64.PNG
create mode 100644 content/static/2023.9/images/set-variable/set-variable-expression-interpolated-string.PNG
create mode 100644 content/static/2023.9/images/set-variable/set-variable-expression-list.PNG
create mode 100644 content/static/2023.9/images/set-variable/set-variable-expression-method.PNG
create mode 100644 content/static/2023.9/images/set-variable/set-variable-expression-properties.PNG
create mode 100644 content/static/2023.9/images/set-variable/set-variable-expression-single.PNG
create mode 100644 content/static/2023.9/images/set-variable/set-variable-expression-string.PNG
create mode 100644 content/static/2023.9/images/set-variable/set-variable-expression-structure.PNG
create mode 100644 content/static/2023.9/images/set-variable/set-variable-expression-variable.PNG
create mode 100644 content/static/2023.9/images/set-variable/set-variable-expression-verbatim-string.PNG
create mode 100644 content/static/2023.9/images/set-variable/set-variable-run-as.svg
create mode 100644 content/static/2023.9/images/top-level-workspace.svg
create mode 100644 content/static/2023.9/images/variables-grid.PNG
create mode 100644 content/static/2023.9/images/work-in-progress.jpg
create mode 100644 content/static/2023.9/images/workspace-blocks.svg
create mode 100644 content/static/2023.9/images/workspace-exception.gif
create mode 100644 content/static/2023.9/images/workspace/workspace-block-semaphore.svg
create mode 100644 content/static/2023.9/pdf/Cortex Interaction Portal Deployment Guide.pdf
create mode 100644 content/static/2023.9/pdf/Cortex Interaction Portal Developer Guide.pdf
create mode 100644 content/static/2023.9/pdf/Cortex Interaction Portal Merging Guide.pdf
create mode 100644 content/static/2023.9/pdf/Cortex Interaction Portal User Guide.pdf
diff --git a/config/_default/config.toml b/config/_default/config.toml
index c8310f176..1426fbf2a 100644
--- a/config/_default/config.toml
+++ b/config/_default/config.toml
@@ -200,15 +200,20 @@ enable = true
[[menu.main]]
identifier = 'documentation'
name = 'Documentation'
- url = '/docs/2023.7'
+ url = '/docs/2023.9'
weight = 10
# Releases menu
+[[params.versions]]
+ version = "2023.9"
+ url = "/docs/2023.9/"
+ dotNetVersion = "net-6.0"
+ latest = true
+
[[params.versions]]
version = "2023.7"
url = "/docs/2023.7/"
dotNetVersion = "net-6.0"
- latest = true
[[params.versions]]
version = "2023.5"
diff --git a/content/en/blog/releases/2023.X/2023.7.md b/content/en/blog/releases/2023.X/2023.7.md
index 7ecce4e01..f0097b41c 100644
--- a/content/en/blog/releases/2023.X/2023.7.md
+++ b/content/en/blog/releases/2023.X/2023.7.md
@@ -333,8 +333,8 @@ Any changes to these forecasts will be announced via the [News channel][].
[Blocks]: {{< url path="Cortex.Reference.Blocks.MainDoc" version="2023.7" >}}
[Data Storage]: {{< url path="Cortex.Reference.Blocks.DataStorage.MainDoc" version="2023.7" >}}
-[Create Collection]: {{< url path="Cortex.Reference.Blocks.DataStorage.CreateCollection.CreateCollectionBLock.MainDoc" version="2023.7" >}}
-[Delete Collection]: {{< url path="Cortex.Reference.Blocks.DataStorage.DeleteCollection.DeleteCollectionBLock.MainDoc" version="2023.7" >}}
+[Create Collection]: {{< url path="Cortex.Reference.Blocks.DataStorage.CreateCollection.CreateCollectionBlock.MainDoc" version="2023.7" >}}
+[Delete Collection]: {{< url path="Cortex.Reference.Blocks.DataStorage.DeleteCollection.DeleteCollectionBlock.MainDoc" version="2023.7" >}}
[Delete Data with Key]: {{< url path="Cortex.Reference.Blocks.DataStorage.DeleteData.DeleteDataWithKeyBlock.MainDoc" version="2023.7" >}}
[Read Data with Key]: {{< url path="Cortex.Reference.Blocks.DataStorage.ReadData.ReadDataWithKeyBlock.MainDoc" version="2023.7" >}}
[Write Data with Key]: {{< url path="Cortex.Reference.Blocks.DataStorage.WriteData.WriteDataWithKeyBlock.MainDoc" version="2023.7" >}}
diff --git a/content/en/blog/releases/2023.X/2023.9.md b/content/en/blog/releases/2023.X/2023.9.md
new file mode 100644
index 000000000..e01d545b3
--- /dev/null
+++ b/content/en/blog/releases/2023.X/2023.9.md
@@ -0,0 +1,331 @@
+---
+title: "2023.9"
+linkTitle: "2023.9"
+date: 2023-10-16
+author: Paul Arnold ([@paulmarnold](https://twitter.com/paulmarnold))
+---
+
+## Summary
+
+The 2023.9 Release is now available.
+
+## Download Artefacts
+
+Installation artefacts can be requested by raising a case in the [{{% ctx %}} Service Portal][CORTEX Service Portal].
+
+## Release Notes
+
+### Overview
+
+2023.9 is the fifth [Fast Track][] release of the next generation of {{% ctx %}} and continues our journey to improve on the previous 7.X generation in the following areas:
+
+* Capability
+* Documentation
+
+The following new services have been added to the [HA Platform][]:
+
+* [Triggers Service][] - Allows for the execution of flows based on specific triggers. Currently, the Triggers Service allows for triggering executions of flows within the {{% ctx %}} Innovation platform when specific SNMP Traps are received.
+
+Six [new Blocks][New Blocks] have been added to the [{{% ctx %}} Block Packages][Blocks], adding new functionality to work with:
+
+* [Data Storage][] - Allowing for communication between flows by using the shared Data Storage within the HA Platform
+
+{{% ctx %}} Gateway has been [rebranded][CORTEX Gateway Rebranding] and theme support for light and dark mode has been added.
+
+Support for [Windows Server 2022][Windows Server 2022 Support] has been added to the Innovation Platform as part of the 2023.9 release, and support for [Windows Server 2016][Windows Server 2016 Support] has been removed.
+
+Finally, this [Product Portal][] has been updated to reflect the [new services][HA Platform], and reference documentation has been added for the [new blocks][New Blocks].
+
+### Components
+
+| Release Component | Version | Updated This Release | Update Type | Notes |
+|---------------------------------------------------------------------------------------------------------|---------------|----------------------|---------------|-------------------------------------------------------------------------------------------------------|
+| [{{% ctx %}} Innovation Core Application][CORTEX Innovation Core Application] | 37.1.0.23430 | Yes | Major | |
+| > [{{% ctx %}} API Gateway Service][CORTEX API Gateway Service] | 30.7.0.23420 | Yes | Minor | |
+| > [{{% ctx %}} Authorisation Service][CORTEX Authorisation Service] | 2.4.9.23420 | Yes | Patch | |
+| > [{{% ctx %}} Concurrency Management Service][CORTEX Concurrency Management Service] | 1.1.6.23420 | Yes | Patch | |
+| > [{{% ctx %}} Configuration Management Service][CORTEX Configuration Management Service] | 1.5.6.23420 | Yes | Patch | |
+| > [{{% ctx %}} Data Storage Service][CORTEX Data Storage Service] | 2.2.1.23420 | Yes | Minor | |
+| > [{{% ctx %}} Execution Management Service][CORTEX Execution Management Service] | 2.3.8.23420 | Yes | Patch | |
+| > [{{% ctx %}} Licence Management Service][CORTEX Licence Management Service] | 1.1.7.23420 | Yes | Patch | |
+| > [{{% ctx %}} Package Management Service][CORTEX Package Management Service] | 6.0.8.23420 | Yes | Patch | |
+| > [{{% ctx %}} Provisioning Service][CORTEX Provisioning Service] | 6.5.1.23430 | Yes | Minor | |
+| > [{{% ctx %}} Scheduling Service][CORTEX Scheduling Service] | 2.1.12.23430 | Yes | Patch | |
+| > [{{% ctx %}} Triggers Service][CORTEX Triggers Service] | 3.2.0.23430 | Yes | First Release | |
+| [{{% ctx %}} Innovation Execution Application][CORTEX Innovation Execution Application] | 9.3.2.23420 | Yes | Minor | |
+| > [{{% ctx %}} Execution Service][CORTEX Execution Service] | 9.3.2.23420 | Yes | Minor | |
+| [{{% ctx %}} Gateway][Gateway], including [{{% ctx %}} Studio][CORTEX Studio] | 7.1.0.23430 | Yes | Major | |
+| [{{% ctx %}} Blocks Package][Blocks] | 40.0.0.23420 | Yes | Major | [Potential breaking change][FlowExecutionStoppedException renamed to FlowExecutionCancelledException] |
+| [{{% ctx %}} Interaction Portal][Interaction Portal] | | Yes | | |
+
+### Features
+
+#### Expansion of the HA Platform
+
+##### New Triggers Service
+
+The [Triggers][CORTEX Triggers Service] service has been added to the HA Platform, which allows for triggering executions of flows within the {{% ctx %}} Innovation platform when specific SNMP Traps are received.
+
+SNMP Triggers can be added, or deleted, when managing a version of a package within [{{% ctx %}} Gateway][Gateway].
+
+Triggers can be configured to control when the execution occurs, and a trigger can be created with input variables that are passed in to the execution. Currently, triggers for both SNMPV1 and SNMPV2 traps have been added, allowing for the running of flows based on specific filters related to these SNMP Versions, including:
+
+* Device Address
+* Device Port
+* Trap OID
+* Community (Available for SNMPV1 and SNMPV2)
+* Agent Address (Available for SNMPV1)
+
+Support for SNMPV3 will be added in a future release, this is targeted for 2023.11 or 2024.1.
+
+Additional types of trigger (e.g. Files created, emails received, Kafka topic notifications) will also be added in future releases.
+
+Affected Components:
+
+* [{{% ctx %}} Innovation Core Application][CORTEX Innovation Core Application]
+ * [{{% ctx %}} API Gateway Service][CORTEX API Gateway Service]
+ * [{{% ctx %}} Triggers Service][CORTEX Triggers Service]
+* [{{% ctx %}} Gateway][Gateway]
+
+#### New Blocks
+
+Six new [Blocks][] have been added to the Innovation platform to work with:
+
+* [Data Storage][] - Allowing for communication using the shared Data Storage within the HA Platform
+ * [Wait For Collection To Exist][]
+ * [Wait For Collection To Not Exist][]
+ * [Wait For Key In Collection To Exist][]
+ * [Wait For Key In Collection To Not Exist][]
+ * [Wait For Key In Collection To Contain Value][]
+ * [Wait For Key In Collection To Be Set][]
+
+Affected Components:
+
+* [{{% ctx %}} Innovation Core Application][CORTEX Innovation Core Application]
+ * [{{% ctx %}} Data Storage Service][CORTEX Data Storage Service]
+* [{{% ctx %}} Innovation Execution Application][CORTEX Innovation Execution Application]
+ * [{{% ctx %}} Execution Service][CORTEX Execution Service]
+* [{{% ctx %}} Block Packages][Blocks]
+
+#### CORTEX Gateway Rebranding
+
+{{% ctx %}} Gateway has been rebranded, this includes:
+
+* Updating the fonts and colours
+* Refreshing the icons
+* Updating the debug token shown when debugging flows
+
+Also, theme support has been added, and both light and dark themes have been included. It is possible to switch themes by clicking the user icon on the top right hand corner of the home page, selecting settings, and choosing light or dark theme. The choice of selected theme is persisted within your browser's local storage.
+
+Affected Components:
+
+* [{{% ctx %}} Gateway][Gateway]
+
+#### Windows Server 2022 Support
+
+Support for Windows Server 2022 has been added to the Innovation Platform as part of the 2023.9 release, and support for [Windows Server 2016][Windows Server 2016 Support] has been removed.
+
+Affected Components:
+
+* None
+
+#### Product Portal
+
+The documentation has been updated to reflect the [new services][HA Platform], and reference documentation has been added for the [new blocks][New Blocks].
+
+### Bug Fixes
+
+The following bugs have been fixed in the 2023.9 release:
+
+#### Some Cortex DataTypes could not be Serialised
+
+Some {{% ctx %}} [Data Types][] were not serialisable within the Innovation platform, all [Data Types][] have been verified and updated to be serialisable.
+
+#### Updating Certificates with Different Casing for Node Names Caused the Certificates to be Invalid
+
+When updating certificates within the Innovation platform, any nodes with different casing from the previous certificate would not be valid. This has been fixed, and certificates with different casing will now match the nodes correctly.
+
+#### TLS Bug with CortexSSLBestPractices Script
+
+The CortexSSLBestPractices script previously did not correctly disable TLS1.1.
+
+#### Write Data with Key Block does not Accept Null Values
+
+The [Write Data with Key] block previously threw an exception when `null` was passed into the `Data` property, this has now been fixed and `null` can be saved to the [Data Storage Service][CORTEX Data Storage Service].
+
+#### Grafana Promtail Incorrectly Reporting of 4XX and 5XX Error Codes as Successful
+
+Grafana Promtail was previously reporting 4XX and 5XX error codes within problem details as successful requests but now report correctly.
+
+#### Running Parallel Flows can Cause an Exception to Occur
+
+The same flow being called asynchronously and running in parallel could cause an exception to be thrown when two flows were executing the same block. This issue has been fixed, and concurrent execution of the same flows no longer throw exceptions in this case.
+
+#### Scope Default Value is not set until the Block was Updated
+
+Previously, any block that used [Scope][] would not have a default value set when placing the block on a flow for the first time, until the block had been updated.
+
+#### Incorrect Help Links for Data Storage Blocks
+
+The following [Data Storage][] blocks had incorrect links to their documentation pages:
+
+* [Read Data with Key][]
+* [Write Data with Key][]
+* [Delete Data with Key][]
+
+This was due to their namespaces being incorrect, this is a [potentially breaking change][Data Storage Block Namespace Change] if you were using these blocks within a flow.
+
+### Deprecated Features
+
+The following features were previously deprecated in the 2022.9 release:
+
+* SQL Server will no longer be required by [Gateway][] in a future release; this was targeted for removal in 2023.3 or 2023.5, but has been pushed out, currently targeting the 2024.1 release
+
+### Removed Features
+
+The following features have been removed in the 2023.9 release:
+
+#### Windows Server 2016 Support
+
+Support for Windows Server 2016 has been removed as part of the 2023.9 release, and [support for Windows Server 2022][Windows Server 2022 Support] has been added.
+
+### Potential Breaking Changes
+
+The following may potentially break interactions with the {{% ctx %}} Innovation Platform.
+
+#### FlowExecutionStoppedException renamed to FlowExecutionCancelledException
+
+The FlowExecutionStoppedException has been renamed to FlowExecutionCancelledException.
+
+This is potentially breaking if you were interacting with the exception and using its name to make decisions within a flow. Any occurrence of this will need to be updated to use the new name.
+
+#### Data Storage Block Namespace Change
+
+The following [Data Storage][] blocks, have had their namespaces changed to be:
+
+* [Read Data with Key][] - Cortex.Blocks.DataStorage.ReadData.ReadDataWithKeyBlock
+* [Write Data with Key][] - Cortex.Blocks.DataStorage.WriteData.WriteDataWithKeyBlock
+* [Delete Data with Key][] - Cortex.Blocks.DataStorage.DeleteData.DeleteDataWithKeyBlock
+
+This is potentially breaking if you were using these blocks within a flow. Any flow using these blocks will need to be upgraded in order to continue working; please request assistance with upgrading flows by raising a case in the [{{% ctx %}} Service Portal][CORTEX Service Portal].
+
+### Breaking Changes
+
+There are no known breaking changes as part of this release of the platform.
+
+### Known Limitations
+
+There are no known limitations added as part of this release of the platform.
+
+## Version Support
+
+### Operating Systems
+
+| OS Type | Supported Versions |
+|-|-|-|
+| Windows |
(Cortex.Blocks.Dictionaries.AddItem.AddItemWithKeyBlock`3)
+ +## Description + +Adds an [Item][Item Property] to a [Dictionary][Dictionary Property] with the specified [Key][Key Property]. + +## Examples + +### Add an Item to an empty Dictionary + +This example will add `1` to `{}` with a key of `"Key1"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{}` | `($)Dictionary` is a variable of type [IDictionary][]<[dynamic][], [dynamic][]> | +| [Key][Key Property] | `($)Key`, with value `"Key1"` | `($)Key` is a variable of type [String][] | +| [Item][Item Property] | `($)Item`, with value `1` | `($)Item` is a variable of type [Int32][] | + +#### Result + +Adding `1` to `{}` with a key of `"Key1"` results in the variable `($)Dictionary` being updated to the following: + +```json +{"Key1" : 1} +``` + +*** + +### Add an Item to a Dictionary + +This example will add `2` to `{"Key1" : 1}` with a key of `"Key2"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Key][Key Property] | `($)Key`, with value `"Key2"` | `($)Key` is a variable of type [String][] | +| [Item][Item Property] | `($)Item`, with value `2` | `($)Item` is a variable of type [Int32][] | + +#### Result + +Adding `2` to `{"Key1" : 1}` with a key of `"Key2"` results in the variable `($)Dictionary` being updated to the following: + +```json +{"Key1" : 1, "Key2" : 2} +``` + +*** + +## Properties + +### Dictionary + +The [Dictionary][Dictionary Property] where the [Item][Item Property] is added with the specified [Key][Key Property]. + +[Dictionary][Dictionary Property] can be any [IDictionary][]<[TKey][], [TItem][]>, where [TKey][] represents the type of keys used to lookup items in the [Dictionary][Dictionary Property], and [TItem][] represents the type of items in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[TKey][], [TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Dictionary` with no value | + +### Key + +The [Key][Key Property] to add the [Item][Item Property] with. + +Keys cannot be `null` and must be unique within a dictionary, as they are used to lookup the item they correspond to. + +For information and examples of how it is determined whether a key is already present, please see [Object Equality][]. + +For information about what a key is, please see [Keys][]. + +| | | +|--------------------|---------------------------| +| Data Type | [TKey][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Item + +The [Item][Item Property] to be added to the [Dictionary][Dictionary Property] with the specified [Key][Key Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyDictionaryException][] | Thrown when [Dictionary][Dictionary Property] is read-only. | +| [InvalidPropertyValueException][] | Thrown when [Item][Item Property] is `null` and [Dictionary][Dictionary Property] only accepts non-nullable value types. See [Value Is Invalid][]. | +| [KeyPresentException][] | Thrown when an item with the specified [Key][Key Property] is already present. | +| [PropertyNullException][] | Thrown when [Dictionary][Dictionary Property] or [Key][Key Property] are `null`. | + +## Remarks + +### Key Equality + +For information and examples of how it is determined whether a key is already present, please see [Object Equality][]. + +### Defining dictionaries using literal syntax + +For information about how to define dictionaries using literal syntax, see [Dictionary Literals][]. + +### Defining dictionaries using expression syntax + +For information about how to define dictionaries using expression syntax, see [Create a Dictionary<TKey, TItem>][]. + +### Dictionaries containing items with same data types vs different data types + +For information about the different types of dictionaries, including those that can contain only the same type of item, and those that can contain different types of item, see [Dictionaries][]. + +[Dictionary Property]: {{< ref "#dictionary" >}} +[Key Property]: {{< ref "#key" >}} +[Item Property]: {{< ref "#item" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Keys]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Keys.MainDoc" >}} + +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[Dictionary Literals]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.DictionaryLiteral" >}} +[Create a Dictionary<TKey, TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.Dictionary.CreateNew" >}} +[Dictionaries]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Dictionaries" >}} + +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[TKey]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyDictionaryException]: {{< url path="Cortex.Reference.Exceptions.Dictionaries.CannotModifyReadOnlyDictionaryException.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[KeyPresentException]: {{< url path="Cortex.Reference.Exceptions.Dictionaries.KeyPresentException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/contains-item/_index.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/contains-item/_index.md new file mode 100644 index 000000000..18d91f743 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/contains-item/_index.md @@ -0,0 +1,5 @@ +--- +title: "Contains Item(s)" +linkTitle: "Contains Item(s)" +description: "Check if an item or multiple items are contained in a dictionary." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/contains-item/contains-item-with-key-and-value-block-3.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/contains-item/contains-item-with-key-and-value-block-3.md new file mode 100644 index 000000000..361824949 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/contains-item/contains-item-with-key-and-value-block-3.md @@ -0,0 +1,192 @@ +--- +title: "Contains Item With Key And Value" +linkTitle: "Contains Item With Key And Value" +description: "Checks if a Dictionary contains at least one item with the specified key and matching the specified value." +--- + +{{< figure src="/blocks/dictionaries-contains-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Dictionaries.ContainsItem.ContainsItemWithKeyAndValueBlock`3)
+ +## Description + +Checks if [Dictionary][Dictionary Property] contains at least one item with the specified [Key][Key Property] and matching the specified [Value][Value Property]. + +## Examples + +### Dictionary contains item with Key and Value + +This example will check whether `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` contains at least one item with the key `"Key1"` and value `1`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Key][Key Property] | `($)Key`, with value `"Key1"` | `($)Key` is a variable of type [String][] | +| [Value][Value Property] | `($)Value`, with value `1` | `($)Value` is a variable of type [Int32][] | +| [Contains Item][ContainsItem Property] | `($)ContainsItem`, with no value | `($)ContainsItem` is a variable that will be set to a [Boolean][] value | + +#### Result + +`{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` contains one item with the key `Key1` and value `1`. Therefore, the variable `($)ContainsItem` will be updated to the following: + +```json +true +``` + +*** + +### Dictionary does not contain item with Key and Value + +This example will check whether `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` contains at least one item with the key `"Key1"` and value `10`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Key][Key Property] | `($)Key`, with value `"Key1"` | `($)Key` is a variable of type [String][] | +| [Value][Value Property] | `($)Value`, with value `10` | `($)Value` is a variable of type [Int32][] | +| [Contains Item][ContainsItem Property] | `($)ContainsItem`, with no value | `($)ContainsItem` is a variable that will be set to a [Boolean][] value | + +#### Result + +`{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` contains one item with the key `"Key1"`, but its value is not `10`. Therefore, the variable `($)ContainsItem` will be updated to the following: + +```json +false +``` + +*** + +## Properties + +### Dictionary + +The [Dictionary][Dictionary Property] to check whether it contains at least one item with the specified [Key][Key Property] and matching [Value][Value Property]. + +[Dictionary][Dictionary Property] can be any [IDictionary][]<[TKey][], [TItem][]>, where [TKey][] represents the type of keys used to lookup items in the [Dictionary][Dictionary Property], and [TItem][] represents the type of items in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[TKey][], [TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Dictionary` with no value | + +### Key + +The [Key][Key Property] to check for matching items. + +For information and examples of how it is determined whether an item has a specified key, please see [Object Equality][]. + +For information about what a key is, please see [Keys][]. + +| | | +|--------------------|---------------------------| +| Data Type | [TKey][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Value + +The [Value][Value Property] to check for matching items. + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Contains Item + +The result of the contains item check. + +If [Dictionary][Dictionary Property] contains at least one item with the specified [Key][Key Property] and matching [Value][Value Property], the specified variable will be set to `true`, otherwise it will be set to `false`. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)ContainsItem` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [InvalidPropertyValueException][] | Thrown when [Value][Value Property] is `null` and [Dictionary][Dictionary Property] only accepts non-nullable value types. See [Value Is Invalid]. | +| [PropertyNullException][] | Thrown when [Dictionary][Dictionary Property] or [Key][Key Property] are `null`. | + +## Remarks + +### Key Equality + +For information and examples of how it is determined whether an item has a specified key, please see [Object Equality][]. + +### Item Equality + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +### Empty Dictionary + +If [Dictionary][Dictionary Property] is empty (i.e. `{}`), the variable specified in the [Contains Item][ContainsItem Property] property is set to `false`. + +### Defining dictionaries using literal syntax + +For information about how to define dictionaries using literal syntax, see [Dictionary Literals][]. + +### Defining dictionaries using expression syntax + +For information about how to define dictionaries using expression syntax, see [Create a Dictionary<TKey, TItem>][]. + +### Dictionaries containing items with same data types vs different data types + +For information about the different types of dictionaries, including those that can contain only the same type of item, and those that can contain different types of item, see [Dictionaries][]. + +[Dictionary Property]: {{< ref "#dictionary" >}} +[Key Property]: {{< ref "#key" >}} +[Value Property]: {{< ref "#value" >}} +[ContainsItem Property]: {{< ref "#contains-item" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Keys]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Keys.MainDoc" >}} + +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[Dictionary Literals]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.DictionaryLiteral" >}} +[Create a Dictionary<TKey, TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.Dictionary.CreateNew" >}} +[Dictionaries]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Dictionaries" >}} + +[TKey]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/contains-item/contains-item-with-key-block-3.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/contains-item/contains-item-with-key-block-3.md new file mode 100644 index 000000000..6a47e7df1 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/contains-item/contains-item-with-key-block-3.md @@ -0,0 +1,167 @@ +--- +title: "Contains Item With Key" +linkTitle: "Contains Item With Key" +description: "Checks if a Dictionary contains at least one item with the specified key." +--- + +{{< figure src="/blocks/dictionaries-contains-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Dictionaries.ContainsItem.ContainsItemWithKeyBlock`3)
+ +## Description + +Checks if [Dictionary][Dictionary Property] contains at least one item with the specified [Key][Key Property]. + +## Examples + +### Dictionary contains item with Key + +This example will check whether `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` contains at least one item with the key `"Key1"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Key][Key Property] | `($)Key`, with value `"Key1"` | `($)Key` is a variable of type [String][] | +| [Contains Item][ContainsItem Property] | `($)ContainsItem`, with no value | `($)ContainsItem` is a variable that will be set to a [Boolean][] value | + +#### Result + +`{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` contains one item with the key `Key1`. Therefore, the variable `($)ContainsItem` will be updated to the following: + +```json +true +``` + +*** + +### Dictionary does not contain item with Key + +This example will check whether `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` contains at least one item with the key `"Key10"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Key][Key Property] | `($)Key`, with value `"Key10"` | `($)Key` is a variable of type [String][] | +| [Contains Item][ContainsItem Property] | `($)ContainsItem`, with no value | `($)ContainsItem` is a variable that will be set to a [Boolean][] value | + +#### Result + +`{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` does not contain any items with the key `"Key10"`. Therefore, the variable `($)ContainsItem` will be updated to the following: + +```json +false +``` + +*** + +## Properties + +### Dictionary + +The [Dictionary][Dictionary Property] to check whether it contains at least one item with the specified [Key][Key Property]. + +[Dictionary][Dictionary Property] can be any [IDictionary][]<[TKey][], [TItem][]>, where [TKey][] represents the type of keys used to lookup items in the [Dictionary][Dictionary Property], and [TItem][] represents the type of items in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[TKey][], [TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Dictionary` with no value | + +### Key + +The [Key][Key Property] to check for matching items. + +For information and examples of how it is determined whether an item has a specified key, please see [Object Equality][]. + +For information about what a key is, please see [Keys][]. + +| | | +|--------------------|---------------------------| +| Data Type | [TKey][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Contains Item + +The result of the contains item check. + +If [Dictionary][Dictionary Property] contains at least one item with the specified [Key][Key Property], the specified variable will be set to `true`, otherwise it will be set to `false`. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)ContainsItem` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyNullException][] | Thrown when [Dictionary][Dictionary Property] or [Key][Key Property] are `null`. | + +## Remarks + +### Key Equality + +For information and examples of how it is determined whether an item has a specified key, please see [Object Equality][]. + +### Empty Dictionary + +If [Dictionary][Dictionary Property] is empty (i.e. `{}`), the variable specified in the [Contains Item][ContainsItem Property] property is set to `false`. + +### Defining dictionaries using literal syntax + +For information about how to define dictionaries using literal syntax, see [Dictionary Literals][]. + +### Defining dictionaries using expression syntax + +For information about how to define dictionaries using expression syntax, see [Create a Dictionary<TKey, TItem>][]. + +### Dictionaries containing items with same data types vs different data types + +For information about the different types of dictionaries, including those that can contain only the same type of item, and those that can contain different types of item, see [Dictionaries][]. + +[Dictionary Property]: {{< ref "#dictionary" >}} +[Key Property]: {{< ref "#key" >}} +[ContainsItem Property]: {{< ref "#contains-item" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Keys]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Keys.MainDoc" >}} + +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[Dictionary Literals]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.DictionaryLiteral" >}} +[Create a Dictionary<TKey, TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.Dictionary.CreateNew" >}} +[Dictionaries]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Dictionaries" >}} + +[TKey]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/contains-item/contains-item-with-value-block-3.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/contains-item/contains-item-with-value-block-3.md new file mode 100644 index 000000000..a976ada81 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/contains-item/contains-item-with-value-block-3.md @@ -0,0 +1,169 @@ +--- +title: "Contains Item With Value" +linkTitle: "Contains Item With Value" +description: "Checks if a Dictionary contains at least one item matching the specified value." +--- + +{{< figure src="/blocks/dictionaries-contains-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Dictionaries.ContainsItem.ContainsItemWithValueBlock`3)
+ +## Description + +Checks if [Dictionary][Dictionary Property] contains at least one item matching [Value][Value Property]. + +## Examples + +### Dictionary contains item with Value + +This example will check whether `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` contains the value `1`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Value][Value Property] | `($)Value`, with value `1` | `($)Value` is a variable of type [Int32][] | +| [Contains Item][ContainsItem Property] | `($)ContainsItem`, with no value | `($)ContainsItem` is a variable that will be set to a [Boolean][] value | + +#### Result + +`{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` contains two items with the value `1`. Therefore, the variable `($)ContainsItem` will be updated to the following: + +```json +true +``` + +*** + +### Dictionary does not contain item with Value + +This example will check whether `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` contains the value `10`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Value][Value Property] | `($)Value`, with value `10` | `($)Value` is a variable of type [Int32][] | +| [Contains Item][ContainsItem Property] | `($)ContainsItem`, with no value | `($)ContainsItem` is a variable that will be set to a [Boolean][] value | + +#### Result + +`{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` does not contain any items with the value `10`. Therefore, the variable `($)ContainsItem` will be updated to the following: + +```json +false +``` + +*** + +## Properties + +### Dictionary + +The [Dictionary][Dictionary Property] to check whether it contains at least one item matching the specified [Value][Value Property]. + +Items are considered matching if they have the specified [Value][Value Property]. + +[Dictionary][Dictionary Property] can be any [IDictionary][]<[TKey][], [TItem][]>, where [TKey][] represents the type of keys used to lookup items in the [Dictionary][Dictionary Property], and [TItem][] represents the type of items in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[TKey][], [TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Dictionary` with no value | + +### Value + +The [Value][Value Property] to check for matching items. + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Contains Item + +The result of the contains item check. + +If [Dictionary][Dictionary Property] contains at least one item matching the specified [Value][Value Property], the specified variable will be set to `true`, otherwise it will be set to `false`. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)ContainsItem` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [InvalidPropertyValueException][] | Thrown when [Value][Value Property] is `null` and [Dictionary][Dictionary Property] only accepts non-nullable value types. See [Value Is Invalid][]. | +| [PropertyNullException][] | Thrown when [Dictionary][Dictionary Property] is `null`. | + +## Remarks + +### Item Equality + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +### Empty Dictionary + +If [Dictionary][Dictionary Property] is empty (i.e. `{}`), the variable specified in the [Contains Item][ContainsItem Property] property is set to `false`. + +### Defining dictionaries using literal syntax + +For information about how to define dictionaries using literal syntax, see [Dictionary Literals][]. + +### Defining dictionaries using expression syntax + +For information about how to define dictionaries using expression syntax, see [Create a Dictionary<TKey, TItem>][]. + +### Dictionaries containing items with same data types vs different data types + +For information about the different types of dictionaries, including those that can contain only the same type of item, and those that can contain different types of item, see [Dictionaries][]. + +[Dictionary Property]: {{< ref "#dictionary" >}} +[Value Property]: {{< ref "#value" >}} +[ContainsItem Property]: {{< ref "#contains-item" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[Dictionary Literals]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.DictionaryLiteral" >}} +[Create a Dictionary<TKey, TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.Dictionary.CreateNew" >}} +[Dictionaries]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Dictionaries" >}} + +[TKey]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/contains-item/contains-items-with-keys-block-3.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/contains-item/contains-items-with-keys-block-3.md new file mode 100644 index 000000000..4b1dc3610 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/contains-item/contains-items-with-keys-block-3.md @@ -0,0 +1,174 @@ +--- +title: "Contains Items With Keys" +linkTitle: "Contains Items With Keys" +description: "Checks if a Dictionary contains at least one item with each of the specified keys." +--- + +{{< figure src="/blocks/dictionaries-contains-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Dictionaries.ContainsItem.ContainsItemsWithKeysBlock`3)
+ +## Description + +Checks if [Dictionary][Dictionary Property] contains at least one item with each of the specified [Keys][Keys Property]. + +## Examples + +### Dictionary contains items with Keys + +This example will check whether `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` contains at least one item with each of the keys in `["Key1", "Key2", "Key3"]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Keys][Keys Property] | `($)Keys`, with value `["Key1", "Key2", "Key3"]` | `($)Keys` is a variable of type [IEnumerable][]<[String][]> | +| [Contains Items][ContainsItems Property] | `($)ContainsItems`, with no value | `($)ContainsItems` is a variable that will be set to a [Boolean][] value | + +#### Result + +`{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` contains at least one item matching each of the values in `["Key1", "Key2", "Key3"]`; it contains one item with the key `"Key1"`, one item with the key `"Key2"` and one item with the key `"Key3"`. Therefore, the variable `($)ContainsItems` will be updated to the following: + +```json +true +``` + +*** + +### Dictionary does not contain items with Keys + +This example will check whether `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` contains at least one item with each of the keys in `["Key1", "Key2", "Key3", "Key10"]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Keys][Keys Property] | `($)Keys`, with value `["Key1", "Key2", "Key3", "Key10"]` | `($)Keys` is a variable of type [IEnumerable][]<[String][]> | +| [Contains Items][ContainsItems Property] | `($)ContainsItems`, with no value | `($)ContainsItems` is a variable that will be set to a [Boolean][] value | + +#### Result + +`{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` does not contain at least one item matching each of the values in `["Key1", "Key2", "Key3"]`; it contains one item with the key `"Key1"`, one item with the key `"Key2"` and one item with the key `"Key3"`, but no items with the key `"Key10"`. Therefore, the variable `($)ContainsItems` will be updated to the following: + +```json +false +``` + +*** + +## Properties + +### Dictionary + +The [Dictionary][Dictionary Property] to check whether it contains at least one item with each of the specified [Keys][Keys Property]. + +[Dictionary][Dictionary Property] can be any [IDictionary][]<[TKey][], [TItem][]>, where [TKey][] represents the type of keys used to lookup items in the [Dictionary][Dictionary Property], and [TItem][] represents the type of items in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[TKey][], [TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Dictionary` with no value | + +### Keys + +The [Keys][Keys Property] to check for matching items. + +For information and examples of how it is determined whether an item has a specified key, please see [Object Equality][]. + +For information about what a key is, please see [Keys][]. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[TKey][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Contains Items + +The result of the contains items check. + +If [Dictionary][Dictionary Property] contains at least one item with each of the specified [Keys][Keys Property], the specified variable will be set to `true`, otherwise it will be set to `false`. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)ContainsItems` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [ArgumentNullException][] | Thrown when any key in [Keys][Keys Property] is `null`| +| [PropertyNullException][] | Thrown when [Dictionary][Dictionary Property] or [Keys][Keys Property] are `null`. | + +## Remarks + +### Key Equality + +For information and examples of how it is determined whether an item has a specified key, please see [Object Equality][]. + +### Empty Dictionary + +If [Dictionary][Dictionary Property] is empty (i.e. `{}`), the variable specified in the [Contains Items][ContainsItems Property] property is set to `false`. + +### Empty Keys + +If [Keys][Keys Property] is empty (i.e. `[]`), the variable specified in the [Contains Items][ContainsItems Property] property is set to `false`. + +### Defining dictionaries using literal syntax + +For information about how to define dictionaries using literal syntax, see [Dictionary Literals][]. + +### Defining dictionaries using expression syntax + +For information about how to define dictionaries using expression syntax, see [Create a Dictionary<TKey, TItem>][]. + +### Dictionaries containing items with same data types vs different data types + +For information about the different types of dictionaries, including those that can contain only the same type of item, and those that can contain different types of item, see [Dictionaries][]. + +[Dictionary Property]: {{< ref "#dictionary" >}} +[Keys Property]: {{< ref "#keys" >}} +[ContainsItems Property]: {{< ref "#contains-items" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Keys]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Keys.MainDoc" >}} + +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[Dictionary Literals]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.DictionaryLiteral" >}} +[Create a Dictionary<TKey, TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.Dictionary.CreateNew" >}} +[Dictionaries]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Dictionaries" >}} + +[TKey]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[ArgumentNullException]: {{< url path="MSDocs.DotNet.Api.System.ArgumentNullException" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/contains-item/contains-items-with-values-block-3.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/contains-item/contains-items-with-values-block-3.md new file mode 100644 index 000000000..ad2cfd5d6 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/contains-item/contains-items-with-values-block-3.md @@ -0,0 +1,170 @@ +--- +title: "Contains Items With Values" +linkTitle: "Contains Items With Values" +description: "Checks if a Dictionary contains at least one item matching each of the specified values." +--- + +{{< figure src="/blocks/dictionaries-contains-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Dictionaries.ContainsItem.ContainsItemsWithValuesBlock`3)
+ +## Description + +Checks if [Dictionary][Dictionary Property] contains at least one item matching each of the specified [Values][Values Property]. + +## Examples + +### Dictionary contains items with Values + +This example will check whether `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` contains at least one item matching each of the values in `[1, 2, 3]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Values][Values Property] | `($)Values`, with value `[1, 2, 3]` | `($)Values` is a variable of type [IEnumerable][]<[Int32][]> | +| [Contains Items][ContainsItems Property] | `($)ContainsItems`, with no value | `($)ContainsItems` is a variable that will be set to a [Boolean][] value | + +#### Result + +`{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` contains at least one item matching each of the values in `[1, 2, 3]`; it contains two items with the value `1`, two items with the value `2` and two items with the value `3`. Therefore, the variable `($)ContainsItems` will be updated to the following: + +```json +true +``` + +*** + +### Dictionary does not contain items with Values + +This example will check whether `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` contains at least one item matching each of the values in `[1, 2, 3, 10]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Values][Values Property] | `($)Values`, with value `[1, 2, 3, 10]` | `($)Values` is a variable of type [IEnumerable][]<[Int32][]> | +| [Contains Items][ContainsItems Property] | `($)ContainsItems`, with no value | `($)ContainsItems` is a variable that will be set to a [Boolean][] value | + +#### Result + +`{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` does not contain at least one item matching each of the values in `[1, 2, 3, 10]`; it contains two items with the value `1`, two items with the value `2` and two items with the value `3`, but no items with the value `10`. Therefore, the variable `($)ContainsItems` will be updated to the following: + +```json +false +``` + +*** + +## Properties + +### Dictionary + +The [Dictionary][Dictionary Property] to check whether it contains at least one item matching each of the specified [Values][Values Property]. + +Items are considered matching if they have a value matching one of the specified [Values][Values Property]. + +[Dictionary][Dictionary Property] can be any [IDictionary][]<[TKey][], [TItem][]>, where [TKey][] represents the type of keys used to lookup items in the [Dictionary][Dictionary Property], and [TItem][] represents the type of items in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[TKey][], [TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Dictionary` with no value | + +### Values + +The [Values][Values Property] to check for matching items. + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Contains Items + +The result of the contains items check. + +If [Dictionary][Dictionary Property] contains at least one item matching each of the specified [Values][Values Property], the specified variable will be set to `true`, otherwise it will be set to `false`. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)ContainsItems` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyNullException][] | Thrown when [Dictionary][Dictionary Property] or [Values][Values Property] are `null`. | + +## Remarks + +### Item Equality + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +### Empty Dictionary + +If [Dictionary][Dictionary Property] is empty (i.e. `{}`), the variable specified in the [Contains Items][ContainsItems Property] property is set to `false`. + +### Empty Values + +If [Values][Values Property] is empty (i.e. `[]`), the variable specified in the [Contains Items][ContainsItems Property] property is set to `false`. + +### Defining dictionaries using literal syntax + +For information about how to define dictionaries using literal syntax, see [Dictionary Literals][]. + +### Defining dictionaries using expression syntax + +For information about how to define dictionaries using expression syntax, see [Create a Dictionary<TKey, TItem>][]. + +### Dictionaries containing items with same data types vs different data types + +For information about the different types of dictionaries, including those that can contain only the same type of item, and those that can contain different types of item, see [Dictionaries][]. + +[Dictionary Property]: {{< ref "#dictionary" >}} +[Values Property]: {{< ref "#values" >}} +[ContainsItems Property]: {{< ref "#contains-items" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[Dictionary Literals]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.DictionaryLiteral" >}} +[Create a Dictionary<TKey, TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.Dictionary.CreateNew" >}} +[Dictionaries]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Dictionaries" >}} + +[TKey]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-count/_index.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-count/_index.md new file mode 100644 index 000000000..ec65cd646 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-count/_index.md @@ -0,0 +1,5 @@ +--- +title: "Get Count(s) of Items" +linkTitle: "Get Count(s) of Items" +description: "Get the count(s) of items in a dictionary." +--- \ No newline at end of file diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-count/get-count-of-all-items-block-3.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-count/get-count-of-all-items-block-3.md new file mode 100644 index 000000000..80273366c --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-count/get-count-of-all-items-block-3.md @@ -0,0 +1,116 @@ +--- +title: "Get Count Of All Items" +linkTitle: "Get Count Of All Items" +description: "Gets the count of all items in a Dictionary." +--- + +{{< figure src="/blocks/dictionaries-get-count-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Dictionaries.GetCount.GetCountOfAllItemsBlock`3)
+ +## Description + +Gets the [Count][Count Property] of all items in a [Dictionary][Dictionary Property]. + +## Examples + +### Get Count of all items in a Dictionary + +This example will get the count of all items in `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Count][Count Property] | `($)Count`, with no value | `($)Count` is a variable that will be set to an [Int32][] value | + +#### Result + +Getting the count of all items in `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` results in the variable `($)Count` being updated to the following: + +```json +6 +``` + +*** + +## Properties + +### Dictionary + +The [Dictionary][Dictionary Property] to get the [Count][Count Property] of all items for. + +[Dictionary][Dictionary Property] can be any [IDictionary][]<[TKey][], [TItem][]>, where [TKey][] represents the type of keys used to lookup items in the [Dictionary][Dictionary Property], and [TItem][] represents the type of items in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[TKey][], [TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Dictionary` with no value | + +### Count + +The [Count][Count Property] of all items in [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Count` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyNullException][] | Thrown when [Dictionary][Dictionary Property] is `null`. | + +## Remarks + +### Empty Dictionary + +If [Dictionary][Dictionary Property] is empty (i.e. `{}`), the variable specified in the [Count][Count Property] property is set to `0`. + +### Defining dictionaries using literal syntax + +For information about how to define dictionaries using literal syntax, see [Dictionary Literals][]. + +### Defining dictionaries using expression syntax + +For information about how to define dictionaries using expression syntax, see [Create a Dictionary<TKey, TItem>][]. + +### Dictionaries containing items with same data types vs different data types + +For information about the different types of dictionaries, including those that can contain only the same type of item, and those that can contain different types of item, see [Dictionaries][]. + +[Dictionary Property]: {{< ref "#dictionary" >}} +[Count Property]: {{< ref "#count" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Dictionary Literals]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.DictionaryLiteral" >}} +[Create a Dictionary<TKey, TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.Dictionary.CreateNew" >}} +[Dictionaries]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Dictionaries" >}} + +[TKey]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-count/get-count-of-items-with-value-block-3.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-count/get-count-of-items-with-value-block-3.md new file mode 100644 index 000000000..78527d7ae --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-count/get-count-of-items-with-value-block-3.md @@ -0,0 +1,146 @@ +--- +title: "Get Count Of Items With Value" +linkTitle: "Get Count Of Items With Value" +description: "Gets the count of items in a Dictionary with the specified value." +--- + +{{< figure src="/blocks/dictionaries-get-count-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Dictionaries.GetCount.GetCountOfItemsWithValueBlock`3)
+ +## Description + +Gets the [Count][Count Property] of items in a [Dictionary][Dictionary Property] with the specified [Value][Value Property]. + +## Examples + +### Get Count of items in a Dictionary with a Value + +This example will get the count of items in `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` with the value `1`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Value][Value Property] | `($)Value`, with value `1` | `($)Value` is a variable of type [Int32][] | +| [Count][Count Property] | `($)Count`, with no value | `($)Count` is a variable that will be set to an [Int32][] value | + +#### Result + +Getting the count of items in `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` with the value `1` results in the variable `($)Count` being updated to the following: + +```json +2 +``` + +*** + +## Properties + +### Dictionary + +The [Dictionary][Dictionary Property] to get the [Count][Count Property] of items with the specified [Value][Value Property] for. + +[Dictionary][Dictionary Property] can be any [IDictionary][]<[TKey][], [TItem][]>, where [TKey][] represents the type of keys used to lookup items in the [Dictionary][Dictionary Property], and [TItem][] represents the type of items in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[TKey][], [TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Dictionary` with no value | + +### Value + +The [Value][Value Property] items must match to be included in the [Count][Count Property]. + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Count + +The [Count][Count Property] of items in [Dictionary][Dictionary Property] with the specified [Value][Value Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Count` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [InvalidPropertyValueException][] | Thrown when [Value][Value Property] is `null` and [Dictionary][Dictionary Property] only accepts non-nullable value types. See [Value Is Invalid][]. | +| [PropertyNullException][] | Thrown when [Dictionary][Dictionary Property] is `null`. | + +## Remarks + +### Item Equality + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +### Empty Dictionary + +If [Dictionary][Dictionary Property] is empty (i.e. `{}`), the variable specified in the [Count][Count Property] property is set to `0`. + +### No items matching Value + +If [Dictionary][Dictionary Property] does not contain items matching the specified [Value][Value Property], the variable specified in the [Count][Count Property] property is set to `0`. + +### Defining dictionaries using literal syntax + +For information about how to define dictionaries using literal syntax, see [Dictionary Literals][]. + +### Defining dictionaries using expression syntax + +For information about how to define dictionaries using expression syntax, see [Create a Dictionary<TKey, TItem>][]. + +### Dictionaries containing items with same data types vs different data types + +For information about the different types of dictionaries, including those that can contain only the same type of item, and those that can contain different types of item, see [Dictionaries][]. + +[Dictionary Property]: {{< ref "#dictionary" >}} +[Value Property]: {{< ref "#value" >}} +[Count Property]: {{< ref "#count" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Dictionary Literals]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.DictionaryLiteral" >}} +[Create a Dictionary<TKey, TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.Dictionary.CreateNew" >}} +[Dictionaries]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Dictionaries" >}} + +[TKey]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-count/get-counts-of-items-with-values-block-3.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-count/get-counts-of-items-with-values-block-3.md new file mode 100644 index 000000000..6237debae --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-count/get-counts-of-items-with-values-block-3.md @@ -0,0 +1,151 @@ +--- +title: "Get Counts Of Items With Values" +linkTitle: "Get Counts Of Items With Values" +description: "Gets the counts of items in a Dictionary matching each of the specified values." +--- + +{{< figure src="/blocks/dictionaries-get-count-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Dictionaries.GetCount.GetCountsOfItemsWithValuesBlock`3)
+ +## Description + +Gets the [Counts][Counts Property] of items in a [Dictionary][Dictionary Property] matching each of the specified [Values][Values Property]. + +## Examples + +### Get Counts of items in a Dictionary matching each of the Values + +This example will get the counts of items in `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` matching each of the values `[1, 2, 3]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Values][Values Property] | `($)Values`, with value `[1, 2, 3]` | `($)Values` is a variable of type [IEnumerable][]<[Int32][]> | +| [Counts][Counts Property] | `($)Counts`, with no value | `($)Counts` is a variable that will be set to an [IList][]<[Int32][]> value | + +#### Result + +Getting the counts of items in `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` matching each of the values `[1, 2, 3]` results in the variable `($)Counts` being updated to the following: + +```json +[2, 2, 2] +``` + +The counts of items matching each value are added to `($)Counts` at the same [index][Indexes] the value is in `($)Values`. In this example, there are two items matching the first value `1`, two items matching the second value `2` and two items matching the third value `3`, resulting in `($)Counts` being set to `[2, 2, 2]`. + +*** + +## Properties + +### Dictionary + +The [Dictionary][Dictionary Property] to get the [Counts][Counts Property] of items matching each of the specified [Values][Values Property] for. + +[Dictionary][Dictionary Property] can be any [IDictionary][]<[TKey][], [TItem][]>, where [TKey][] represents the type of keys used to lookup items in the [Dictionary][Dictionary Property], and [TItem][] represents the type of items in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[TKey][], [TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Dictionary` with no value | + +### Values + +The [Values][Values Property] items must match to be included in the [Counts][Counts Property]. + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Counts + +The [Counts][Counts Property] of items in [Dictionary][Dictionary Property] matching each of the specified [Values][Values Property]. + +For each value in [Values][Values Property], [Counts][Counts Property] will have a corresponding item whose value is the count of items in [Dictionary][Dictionary Property] matching the value. + +I.e. The count of items matching the first value in [Values][Values Property] will be saved as the first item in [Counts][Counts Property]; the count of items matching the second value in [Values][Values Property] will be saved as the second item in [Counts][Counts Property] etc. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[Int32][]> | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Counts` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyNullException][] | Thrown when [Dictionary][Dictionary Property] or [Values][Values Property] are `null`. | + +## Remarks + +### Item Equality + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +### Empty Values + +If [Values][Values Property] is empty (i.e. `[]`), the variable specified in the [Counts][Counts Property] property is set to empty (i.e. `[]`). + +### No items matching a specified value in Values + +If [Dictionary][Dictionary Property] does not contain items matching one of the specified [Values][Values Property], `0` is written to the corresponding item in [Counts][Counts Property] for that value. + +### Defining dictionaries using literal syntax + +For information about how to define dictionaries using literal syntax, see [Dictionary Literals][]. + +### Defining dictionaries using expression syntax + +For information about how to define dictionaries using expression syntax, see [Create a Dictionary<TKey, TItem>][]. + +### Dictionaries containing items with same data types vs different data types + +For information about the different types of dictionaries, including those that can contain only the same type of item, and those that can contain different types of item, see [Dictionaries][]. + +[Dictionary Property]: {{< ref "#dictionary" >}} +[Values Property]: {{< ref "#values" >}} +[Counts Property]: {{< ref "#counts" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Dictionary Literals]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.DictionaryLiteral" >}} +[Create a Dictionary<TKey, TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.Dictionary.CreateNew" >}} +[Dictionaries]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Dictionaries" >}} + +[TKey]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} +[Indexes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Indexes.MainDoc" >}} + +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-item/_index.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-item/_index.md new file mode 100644 index 000000000..9a60abac1 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-item/_index.md @@ -0,0 +1,5 @@ +--- +title: "Get Item(s)" +linkTitle: "Get Item(s)" +description: "Get an item or multiple items from a dictionary." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-item/get-all-items-block-3.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-item/get-all-items-block-3.md new file mode 100644 index 000000000..e0a826a97 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-item/get-all-items-block-3.md @@ -0,0 +1,116 @@ +--- +title: "Get All Items" +linkTitle: "Get All Items" +description: "Gets all items from a Dictionary." +--- + +{{< figure src="/blocks/dictionaries-get-all-items-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Dictionaries.GetItem.GetAllItemsBlock`3)
+ +## Description + +Get all [Items][Items Property] from a [Dictionary][Dictionary Property]. + +## Examples + +### Get all items from a Dictionary + +This example will get all items in `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Items][Items Property] | `($)Items`, with no value | `($)Items` is a variable that will be set to an [IList][]<[Int32][]> | + +#### Result + +Getting all items from `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` results in the variable `($)Items` being updated to the following: + +```json +[1, 2, 3, 3, 2, 1] +``` + +*** + +## Properties + +### Dictionary + +The [Dictionary][Dictionary Property] to get all [Items][Items Property] from. + +[Dictionary][Dictionary Property] can be any [IDictionary][]<[TKey][], [TItem][]>, where [TKey][] represents the type of keys used to lookup items in the [Dictionary][Dictionary Property], and [TItem][] represents the type of items in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[TKey][], [TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Dictionary` with no value | + +### Items + +The [Items][Items Property] in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Items` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyNullException][] | Thrown when [Dictionary][Dictionary Property] is `null`. | + +## Remarks + +### Empty Dictionary + +If [Dictionary][Dictionary Property] is empty (i.e. `{}`) the variable specified in the [Items][Items Property] property is set to an empty [IList][]<[TItem][]> (i.e. `[]`). + +### Defining dictionaries using literal syntax + +For information about how to define dictionaries using literal syntax, see [Dictionary Literals][]. + +### Defining dictionaries using expression syntax + +For information about how to define dictionaries using expression syntax, see [Create a Dictionary<TKey, TItem>][]. + +### Dictionaries containing items with same data types vs different data types + +For information about the different types of dictionaries, including those that can contain only the same type of item, and those that can contain different types of item, see [Dictionaries][]. + +[Dictionary Property]: {{< ref "#dictionary" >}} +[Items Property]: {{< ref "#items" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Dictionary Literals]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.DictionaryLiteral" >}} +[Create a Dictionary<TKey, TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.Dictionary.CreateNew" >}} +[Dictionaries]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Dictionaries" >}} + +[TKey]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-item/get-item-with-key-block-3.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-item/get-item-with-key-block-3.md new file mode 100644 index 000000000..faa9ea684 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-item/get-item-with-key-block-3.md @@ -0,0 +1,202 @@ +--- +title: "Get Item With Key" +linkTitle: "Get Item With Key" +description: "Gets the specified occurrence of an item with the given key from a Dictionary." +--- + +{{< figure src="/blocks/dictionaries-get-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Dictionaries.GetItem.GetItemWithKeyBlock`3)
+ +## Description + +Gets the specified [Occurrence][Occurrence Property] of an [Item][Item Property] with the given [Key][Key Property] from a [Dictionary][Dictionary Property]. + +## Examples + +### Get the first Occurrence of an Item with a Key from a Dictionary + +This example will attempt to get the first occurrence of an item with the key `"Key1"` from `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Key][Key Property] | `($)Key`, with value `"Key1"` | `($)Key` is a variable of type [String][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | +| [Item][Item Property] | `($)Item`, with no value | `($)Item` is a variable that will be set to the type of the item (i.e. [Int32][]) | + +#### Result + +An [Occurrence][Occurrence Property] of `1` means get the first occurrence; `2` means second etc. + +Attempting to get the first occurrence of an item with the key `"Key1"` from `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` results in the variable `($)Item` being updated to the following: + +```json +1 +``` + +*** + +### Get the last Occurrence of an Item with a Key from a Dictionary + +Typically keys are simple data types such as [String][], [Int32][], [Boolean][], and for these a dictionary cannot the same key value more than once. This is due to how the data type's object equality is implemented (two items are considered equal if they have the same value rather than being the same object reference). + +However, other data types such as [IList][]<[Int32][]> can also be used as keys. For these data types, object equality only considers two items equal if they are the same reference; it does not care about whether they have the same value. Therefore, it is possible to have the same key value more than once, and as a result you should be able to get an occurrence of item with that key. + +This example will illustrate this, by attempting to get the last occurrence of an item with the key `[1]` from `{[1] : 1, [2] : 2, [3] : 3, [3] : 3, [2] : 2, [1] : 10}`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{[1] : 1, [2] : 2, [3] : 3, [3] : 3, [2] : 2, [1] : 10}` | `($)Dictionary` is a variable of type [IDictionary][]<[IList][]<[Int32][]>, [Int32][]> | +| [Key][Key Property] | `($)Key`, with value `[1]` | `($)Key` is a variable of type [IList][]<[Int32][]> | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `-1` | `($)Occurrence` is a variable of type [Int32][] | +| [Item][Item Property] | `($)Item`, with no value | `($)Item` is a variable that will be set to the type of the item (i.e. [Int32][]) | + +#### Result + +An [Occurrence][Occurrence Property] of `-1` means get the last occurrence; `-2` means second last etc. + +Attempting to get the last occurrence of an item with the key `[1]` from `{[1] : 1, [2] : 2, [3] : 3, [3] : 3, [2] : 2, [1] : 10}` results in the variable `($)Item` being updated to the following: + +```json +10 +``` + +*** + +## Properties + +### Dictionary + +The [Dictionary][Dictionary Property] to get the specified [Occurrence][Occurrence Property] of [Item][Item Property] with the given [Key][Key Property] from. + +[Dictionary][Dictionary Property] can be any [IDictionary][]<[TKey][], [TItem][]>, where [TKey][] represents the type of keys used to lookup items in the [Dictionary][Dictionary Property], and [TItem][] represents the type of items in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[TKey][], [TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Dictionary` with no value | + +### Key + +The [Key][Key Property] the [Item][Item Property] to get must have. + +For information and examples of how it is determined whether an item has a specified key, please see [Object Equality][]. + +For information about what a key is, please see [Keys][]. + +| | | +|--------------------|---------------------------| +| Data Type | [TKey][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Occurrence + +The [Occurrence][Occurrence Property] of matching [Item][Item Property] to get from the [Dictionary][Dictionary Property]. + +Items are considered matching if they have the specified [Key][Key Property]. + +Unlike lists, dictionaries do not have a defined order. This means the nth occurrence is determined by the underlying Microsoft .Net implementation; this is not published and could change if the algorithm were to change. + +For information about [supported values][Occurrences] for the [Occurrence][Occurrence Property] property and examples of how it can be used, please see [Occurrences][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `1` | + +### Item + +The specified [Occurrence][Occurrence Property] of [Item][Item Property] with the given [Key][Key Property] from [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Item` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [KeyNotPresentException][] | Thrown when the [Key][Key Property] is not present in the [Dictionary][Dictionary Property]. | +| [OccurrenceNotPresentException][] | Thrown when the specified [Occurrence][Occurrence Property] of [Item][Item Property] with the given [Key][Key Property] is not present in the [Dictionary][Dictionary Property]. | +| [PropertyNullException][] | Thrown when [Dictionary][Dictionary Property] or [Key][Key Property] are `null`. | + +## Remarks + +### Key Equality + +For information and examples of how it is determined whether a key is already present, please see [Object Equality][]. + +### Occurrences + +Unlike lists, dictionaries do not have a defined order. This means the nth occurrence is determined by the underlying Microsoft .Net implementation; this is not published and could change if the algorithm were to change. + +For information about [supported values][Occurrences] for the [Occurrence][Occurrence Property] property and examples of how it can be used, please see [Occurrences][]. + +### Defining dictionaries using literal syntax + +For information about how to define dictionaries using literal syntax, see [Dictionary Literals][]. + +### Defining dictionaries using expression syntax + +For information about how to define dictionaries using expression syntax, see [Create a Dictionary<TKey, TItem>][]. + +### Dictionaries containing items with same data types vs different data types + +For information about the different types of dictionaries, including those that can contain only the same type of item, and those that can contain different types of item, see [Dictionaries][]. + +[Dictionary Property]: {{< ref "#dictionary" >}} +[Key Property]: {{< ref "#key" >}} +[Occurrence Property]: {{< ref "#occurrence" >}} +[Item Property]: {{< ref "#item" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Keys]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Keys.MainDoc" >}} +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} +[Occurrences]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Occurrences.MainDoc" >}} + +[Dictionary Literals]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.DictionaryLiteral" >}} +[Create a Dictionary<TKey, TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.Dictionary.CreateNew" >}} +[Dictionaries]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Dictionaries" >}} + +[TKey]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[KeyNotPresentException]: {{< url path="Cortex.Reference.Exceptions.Dictionaries.KeyNotPresentException.MainDoc" >}} +[OccurrenceNotPresentException]: {{< url path="Cortex.Reference.Exceptions.Collections.OccurrenceNotPresentException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-item/get-items-with-key-block-3.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-item/get-items-with-key-block-3.md new file mode 100644 index 000000000..7223d31a2 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-item/get-items-with-key-block-3.md @@ -0,0 +1,145 @@ +--- +title: "Get Items With Key" +linkTitle: "Get Items With Key" +description: "Gets all items with the given key from a Dictionary." +--- + +{{< figure src="/blocks/dictionaries-get-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Dictionaries.GetItem.GetItemsWithKeyBlock`3)
+ +## Description + +Gets all [Items][Items Property] with the given [Key][Key Property] from a [Dictionary][Dictionary Property]. + +## Examples + +### Get all Items with a Key from a Dictionary + +Typically keys are simple data types such as [String][], [Int32][], [Boolean][], and for these a dictionary cannot the same key value more than once. This is due to how the data type's object equality is implemented (two items are considered equal if they have the same value rather than being the same object reference). + +However, other data types such as [IList][]<[Int32][]> can also be used as keys. For these data types, object equality only considers two items equal if they are the same reference; it does not care about whether they have the same value. Therefore, it is possible to have the same key value more than once, and as a result you should be able to get all items with that key. + +This example will illustrate this, by attempting to get all items with the key `[1]` from `{[1] : 1, [2] : 2, [3] : 3, [3] : 3, [2] : 2, [1] : 10}`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{[1] : 1, [2] : 2, [3] : 3, [3] : 3, [2] : 2, [1] : 10}` | `($)Dictionary` is a variable of type [IDictionary][]<[IList][]<[Int32][]>, [Int32][]> | +| [Key][Key Property] | `($)Key`, with value `[1]` | `($)Key` is a variable of type [IList][]<[Int32][]> | +| [Items][Items Property] | `($)Items`, with no value | `($)Items` is a variable that will be set to an [IList][]<[Int32][]> | + +#### Result + +Attempting to get all items with the key `[1]` from `{[1] : 1, [2] : 2, [3] : 3, [3] : 3, [2] : 2, [1] : 10}` results in the variable `($)Items` being updated to the following: + +```json +[1, 10] +``` + +*** + +## Properties + +### Dictionary + +The [Dictionary][Dictionary Property] to get all [Items][Items Property] with the given [Key][Key Property] from. + +[Dictionary][Dictionary Property] can be any [IDictionary][]<[TKey][], [TItem][]>, where [TKey][] represents the type of keys used to lookup items in the [Dictionary][Dictionary Property], and [TItem][] represents the type of items in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[TKey][], [TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Dictionary` with no value | + +### Key + +The [Key][Key Property] the [Items][Items Property] to get must have. + +For information and examples of how it is determined whether an item has a specified key, please see [Object Equality][]. + +For information about what a key is, please see [Keys][]. + +| | | +|--------------------|---------------------------| +| Data Type | [TKey][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Items + +All [Items][Items Property] with the given [Key][Key Property] in [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Items` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [KeyNotPresentException][] | Thrown when the [Key][Key Property] is not present in the [Dictionary][Dictionary Property]. | +| [PropertyNullException][] | Thrown when [Dictionary][Dictionary Property] or [Key][Key Property] are `null`. | + +## Remarks + +### Key Equality + +For information and examples of how it is determined whether a key is already present, please see [Object Equality][]. + +### Defining dictionaries using literal syntax + +For information about how to define dictionaries using literal syntax, see [Dictionary Literals][]. + +### Defining dictionaries using expression syntax + +For information about how to define dictionaries using expression syntax, see [Create a Dictionary<TKey, TItem>][]. + +### Dictionaries containing items with same data types vs different data types + +For information about the different types of dictionaries, including those that can contain only the same type of item, and those that can contain different types of item, see [Dictionaries][]. + +[Dictionary Property]: {{< ref "#dictionary" >}} +[Key Property]: {{< ref "#key" >}} +[Items Property]: {{< ref "#items" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Keys]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Keys.MainDoc" >}} +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[Dictionary Literals]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.DictionaryLiteral" >}} +[Create a Dictionary<TKey, TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.Dictionary.CreateNew" >}} +[Dictionaries]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Dictionaries" >}} + +[TKey]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[KeyNotPresentException]: {{< url path="Cortex.Reference.Exceptions.Dictionaries.KeyNotPresentException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-key/_index.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-key/_index.md new file mode 100644 index 000000000..d0504c442 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-key/_index.md @@ -0,0 +1,5 @@ +--- +title: "Get Key(s)" +linkTitle: "Get Key(s)" +description: "Get a key or multiple keys from a dictionary." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-key/get-all-keys-block-3.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-key/get-all-keys-block-3.md new file mode 100644 index 000000000..eef70a953 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/get-key/get-all-keys-block-3.md @@ -0,0 +1,116 @@ +--- +title: "Get All Keys" +linkTitle: "Get All Keys" +description: "Gets all keys from a Dictionary." +--- + +{{< figure src="/blocks/dictionaries-get-all-keys-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Dictionaries.GetKey.GetAllKeysBlock`3)
+ +## Description + +Get all [Keys][Keys Property] from a [Dictionary][Dictionary Property]. + +## Examples + +### Get all keys from a Dictionary + +This example will get all keys in `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Keys][Keys Property] | `($)Keys`, with no value | `($)Keys` is a variable that will be set to an [IList][]<[String][]> | + +#### Result + +Getting all keys from `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` results in the variable `($)Keys` being updated to the following: + +```json +["Key1", "Key2", "Key3", "Key4", "Key5", "Key6"] +``` + +*** + +## Properties + +### Dictionary + +The [Dictionary][Dictionary Property] to get all [Keys][Keys Property] from. + +[Dictionary][Dictionary Property] can be any [IDictionary][]<[TKey][], [TItem][]>, where [TKey][] represents the type of keys used to lookup items in the [Dictionary][Dictionary Property], and [TItem][] represents the type of items in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[TKey][], [TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Dictionary` with no value | + +### Keys + +The [Keys][Keys Property] in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TKey][]> | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Keys` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyNullException][] | Thrown when [Dictionary][Dictionary Property] is `null`. | + +## Remarks + +### Empty Dictionary + +If [Dictionary][Dictionary Property] is empty (i.e. `{}`) the variable specified in the [Keys][Keys Property] property is set to an empty [IList][]<[TKey][]> (i.e. `[]`). + +### Defining dictionaries using literal syntax + +For information about how to define dictionaries using literal syntax, see [Dictionary Literals][]. + +### Defining dictionaries using expression syntax + +For information about how to define dictionaries using expression syntax, see [Create a Dictionary<TKey, TItem>][]. + +### Dictionaries containing items with same data types vs different data types + +For information about the different types of dictionaries, including those that can contain only the same type of item, and those that can contain different types of item, see [Dictionaries][]. + +[Dictionary Property]: {{< ref "#dictionary" >}} +[Keys Property]: {{< ref "#keys" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Dictionary Literals]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.DictionaryLiteral" >}} +[Create a Dictionary<TKey, TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.Dictionary.CreateNew" >}} +[Dictionaries]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Dictionaries" >}} + +[TKey]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/_index.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/_index.md new file mode 100644 index 000000000..a516b96dd --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/_index.md @@ -0,0 +1,5 @@ +--- +title: "Remove Item(s)" +linkTitle: "Remove Item(s)" +description: "Remove an item or multiple items from a dictionary." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-all-items-block-3.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-all-items-block-3.md new file mode 100644 index 000000000..2311ef94d --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-all-items-block-3.md @@ -0,0 +1,121 @@ +--- +title: "Remove All Items" +linkTitle: "Remove All Items" +description: "Removes all items from a Dictionary." +--- + +{{< figure src="/blocks/dictionaries-remove-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Dictionaries.RemoveItem.RemoveAllItemsBlock`3)
+ +## Description + +Removes all items from a [Dictionary][Dictionary Property]. + +## Examples + +### Remove all items from an empty Dictionary + +This example will attempt to remove all items from `{}`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{}` | `($)Dictionary` is a variable of type [IDictionary][]<[dynamic][], [dynamic][]> | + +#### Result + +Attempting to remove all items from `{}` results in no operation, as there is nothing to remove. Therefore, the variable `($)Dictionary` remains: + +```json +{} +``` + +*** + +### Remove all items from a Dictionary + +This example will remove all items from `{"Key1" : 1, "Key2" : 2}`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 2}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | + +#### Result + +Removing all items from `{"Key1" : 1, "Key2" : 2}` results in the variable `($)Dictionary` being updated to the following: + +```json +{} +``` + +*** + +## Properties + +### Dictionary + +The [Dictionary][Dictionary Property] where all items are removed from. + +[Dictionary][Dictionary Property] can be any [IDictionary][]<[TKey][], [TItem][]>, where [TKey][] represents the type of keys used to lookup items in the [Dictionary][Dictionary Property], and [TItem][] represents the type of items in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[TKey][], [TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Dictionary` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyDictionaryException][] | Thrown when [Dictionary][Dictionary Property] is read-only. | +| [PropertyNullException][] | Thrown when [Dictionary][Dictionary Property] is `null`. | + +## Remarks + +### Empty Dictionary + +If [Dictionary][Dictionary Property] is empty (i.e. `{}`) there is nothing to remove, so no operation is performed. + +### Defining dictionaries using literal syntax + +For information about how to define dictionaries using literal syntax, see [Dictionary Literals][]. + +### Defining dictionaries using expression syntax + +For information about how to define dictionaries using expression syntax, see [Create a Dictionary<TKey, TItem>][]. + +### Dictionaries containing items with same data types vs different data types + +For information about the different types of dictionaries, including those that can contain only the same type of item, and those that can contain different types of item, see [Dictionaries][]. + +[Dictionary Property]: {{< ref "#dictionary" >}} + +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Dictionary Literals]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.DictionaryLiteral" >}} +[Create a Dictionary<TKey, TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.Dictionary.CreateNew" >}} +[Dictionaries]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Dictionaries" >}} + +[TKey]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyDictionaryException]: {{< url path="Cortex.Reference.Exceptions.Dictionaries.CannotModifyReadOnlyDictionaryException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-item-with-key-block-3.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-item-with-key-block-3.md new file mode 100644 index 000000000..7deff3b7f --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-item-with-key-block-3.md @@ -0,0 +1,216 @@ +--- +title: "Remove Item With Key" +linkTitle: "Remove Item With Key" +description: "Removes the specified occurrence of an item with the given key from a Dictionary." +--- + +{{< figure src="/blocks/dictionaries-remove-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Dictionaries.RemoveItem.RemoveItemWithKeyBlock`3)
+ +## Description + +Removes the specified [Occurrence][Occurrence Property] of an item with the given [Key][Key Property] from a [Dictionary][Dictionary Property]. + +## Examples + +### Remove the first Occurrence of an item with a Key from an empty Dictionary + +This example will attempt to remove the first occurrence of an item with the key `"Key1"` from `{}`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{}` | `($)Dictionary` is a variable of type [IDictionary][]<[dynamic][], [dynamic][]> | +| [Key][Key Property] | `($)Key`, with value `"Key1"` | `($)Key` is a variable of type [String][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | + +#### Result + +Attempting to remove the first occurrence of an item with the key `"Key1"` from `{}` results in no operation, as there is nothing to remove. Therefore, the variable `($)Dictionary` remains: + +```json +{} +``` + +*** + +### Remove the first Occurrence of an item with a Key from a Dictionary + +This example will attempt to remove the first occurrence of an item with the key `"Key1"` from `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Key][Key Property] | `($)Key`, with value `"Key1"` | `($)Key` is a variable of type [String][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | + +#### Result + +An [Occurrence][Occurrence Property] of `1` means remove the first occurrence; `2` means second etc. + +Attempting to remove the first occurrence of an item with the key `"Key1"` from `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` results in the variable `($)Dictionary` being updated to the following: + +```json +{"Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1} +``` + +*** + +### Remove the last Occurrence of an item with a Key from a Dictionary + +Typically keys are simple data types such as [String][], [Int32][], [Boolean][], and for these a dictionary cannot the same key value more than once. This is due to how the data type's object equality is implemented (two items are considered equal if they have the same value rather than being the same object reference). + +However, other data types such as [IList][]<[Int32][]> can also be used as keys. For these data types, object equality only considers two items equal if they are the same reference; it does not care about whether they have the same value. Therefore, it is possible to have the same key value more than once, and as a result you should be able to remove any occurrence of item with that key. + +This example will illustrate this, by attempting to remove the last occurrence of an item with the key `[1]` from `{[1] : 1, [2] : 2, [3] : 3, [3] : 3, [2] : 2, [1] : 1}`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{[1] : 1, [2] : 2, [3] : 3, [3] : 3, [2] : 2, [1] : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[IList][]<[Int32][]>, [Int32][]> | +| [Key][Key Property] | `($)Key`, with value `[1]` | `($)Key` is a variable of type [IList][]<[Int32][]> | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `-1` | `($)Occurrence` is a variable of type [Int32][] | + +#### Result + +An [Occurrence][Occurrence Property] of `-1` means remove the last occurrence; `-2` means second last etc. + +Attempting to remove the last occurrence of an item with the key `[1]` from `{[1] : 1, [2] : 2, [3] : 3, [3] : 3, [2] : 2, [1] : 1}` results in the variable `($)Dictionary` being updated to the following: + +```csharp +{[1] : 1, [2] : 2, [3] : 3, [3] : 3, [2] : 2} +``` + +*** + +## Properties + +### Dictionary + +The [Dictionary][Dictionary Property] to remove the specified [Occurrence][Occurrence Property] of item with the given [Key][Key Property] from. + +[Dictionary][Dictionary Property] can be any [IDictionary][]<[TKey][], [TItem][]>, where [TKey][] represents the type of keys used to lookup items in the [Dictionary][Dictionary Property], and [TItem][] represents the type of items in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[TKey][], [TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Dictionary` with no value | + +### Key + +The [Key][Key Property] the item to remove must have. + +For information and examples of how it is determined whether an item has a specified key, please see [Object Equality][]. + +For information about what a key is, please see [Keys][]. + +| | | +|--------------------|---------------------------| +| Data Type | [TKey][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Occurrence + +The [Occurrence][Occurrence Property] of matching item to remove from the [Dictionary][Dictionary Property]. + +Items are considered matching if they have the specified [Key][Key Property]. + +Unlike lists, dictionaries do not have a defined order. This means the nth occurrence is determined by the underlying Microsoft .Net implementation; this is not published and could change if the algorithm were to change. + +For information about [supported values][Occurrences] for the [Occurrence][Occurrence Property] property and examples of how it can be used, please see [Occurrences][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `1` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyDictionaryException][] | Thrown when [Dictionary][Dictionary Property] is read-only. | +| [PropertyNullException][] | Thrown when [Dictionary][Dictionary Property] or [Key][Key Property] are `null`. | + +## Remarks + +### Key Equality + +For information and examples of how it is determined whether a key is already present, please see [Object Equality][]. + +### Occurrences + +Unlike lists, dictionaries do not have a defined order. This means the nth occurrence is determined by the underlying Microsoft .Net implementation; this is not published and could change if the algorithm were to change. + +For information about [supported values][Occurrences] for the [Occurrence][Occurrence Property] property and examples of how it can be used, please see [Occurrences][]. + +### Empty Dictionary + +If [Dictionary][Dictionary Property] is empty (i.e. `{}`) there is nothing to remove, so no operation is performed. + +### No items with given Key, or Occurrence is not present + +If [Dictionary][Dictionary Property] does not contain items with the given [Key][Key Property] or the specified [Occurrence][Occurrence Property] is not present, there is nothing to remove, so no operation is performed. + +### Defining dictionaries using literal syntax + +For information about how to define dictionaries using literal syntax, see [Dictionary Literals][]. + +### Defining dictionaries using expression syntax + +For information about how to define dictionaries using expression syntax, see [Create a Dictionary<TKey, TItem>][]. + +### Dictionaries containing items with same data types vs different data types + +For information about the different types of dictionaries, including those that can contain only the same type of item, and those that can contain different types of item, see [Dictionaries][]. + +[Dictionary Property]: {{< ref "#dictionary" >}} +[Key Property]: {{< ref "#key" >}} +[Occurrence Property]: {{< ref "#occurrence" >}} + +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[Keys]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Keys.MainDoc" >}} +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} +[Occurrences]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Occurrences.MainDoc" >}} + +[Dictionary Literals]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.DictionaryLiteral" >}} +[Create a Dictionary<TKey, TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.Dictionary.CreateNew" >}} +[Dictionaries]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Dictionaries" >}} + +[TKey]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyDictionaryException]: {{< url path="Cortex.Reference.Exceptions.Dictionaries.CannotModifyReadOnlyDictionaryException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-item-with-value-block-3.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-item-with-value-block-3.md new file mode 100644 index 000000000..395f8848e --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-item-with-value-block-3.md @@ -0,0 +1,213 @@ +--- +title: "Remove Item With Value" +linkTitle: "Remove Item With Value" +description: "Removes the specified occurrence of an item matching a value from a Dictionary." +--- + +{{< figure src="/blocks/dictionaries-remove-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Dictionaries.RemoveItem.RemoveItemWithValueBlock`3)
+ +## Description + +Removes the specified [Occurrence][Occurrence Property] of an item matching a [Value][Value Property] from a [Dictionary][Dictionary Property]. + +## Examples + +### Remove the first Occurrence of an item matching a Value from an empty Dictionary + +This example will attempt to remove the first occurrence of an item matching the value `1` from `{}`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{}` | `($)Dictionary` is a variable of type [IDictionary][]<[dynamic][], [dynamic][]> | +| [Value][Value Property] | `($)Value`, with value `1` | `($)Value` is a variable of type [Int32][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | + +#### Result + +Attempting to remove the first occurrence of an item matching the value `1` from `{}` results in no operation, as there is nothing to remove. Therefore, the variable `($)Dictionary` remains: + +```json +{} +``` + +*** + +### Remove the first Occurrence of an item matching a Value from a Dictionary + +This example will attempt to remove the first occurrence of an item matching the value `1` from `{"Key1" : 1, "Key2" : 1}`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Value][Value Property] | `($)Value`, with value `1` | `($)Value` is a variable of type [Int32][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | + +#### Result + +An [Occurrence][Occurrence Property] of `1` means remove the first occurrence; `2` means second etc. + +Attempting to remove the first occurrence of an item matching the value `1` from `{"Key1" : 1, "Key2" : 1}` results in the variable `($)Dictionary` being updated to the following: + +```json +{"Key2" : 1} +``` + +*** + +### Remove the last Occurrence of an item matching a Value from a Dictionary + +This example will attempt to remove the last occurrence of an item matching the value `1` from `{"Key1" : 1, "Key2" : 1}`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Value][Value Property] | `($)Value`, with value `1` | `($)Value` is a variable of type [Int32][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `-1` | `($)Occurrence` is a variable of type [Int32][] | + +#### Result + +An [Occurrence][Occurrence Property] of `-1`, means remove the last occurrence; `-2` means second last etc. + +Attempting to remove the last occurrence of an item matching the value `1` from `{"Key1" : 1, "Key2" : 1}` results in the variable `($)Dictionary` being updated to the following: + +```json +{"Key1" : 1} +``` + +*** + +## Properties + +### Dictionary + +The [Dictionary][Dictionary Property] to remove the specified [Occurrence][Occurrence Property] of matching item from. + +Items are considered matching if they have the specified [Value][Value Property]. + +[Dictionary][Dictionary Property] can be any [IDictionary][]<[TKey][], [TItem][]>, where [TKey][] represents the type of keys used to lookup items in the [Dictionary][Dictionary Property], and [TItem][] represents the type of items in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[TKey][], [TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Dictionary` with no value | + +### Value + +The [Value][Value Property] the item to remove must match. + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Occurrence + +The [Occurrence][Occurrence Property] of matching item to remove from the [Dictionary][Dictionary Property]. + +Items are considered matching if they have the specified [Value][Value Property]. + +Unlike lists, dictionaries do not have a defined order. This means the nth occurrence is determined by the underlying Microsoft .Net implementation; this is not published and could change if the algorithm were to change. + +For information about [supported values][Occurrences] for the [Occurrence][Occurrence Property] property and examples of how it can be used, please see [Occurrences][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `1` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyDictionaryException][] | Thrown when [Dictionary][Dictionary Property] is read-only. | +| [InvalidPropertyValueException][] | Thrown when [Value][Value Property] is `null` and [Dictionary][Dictionary Property] only accepts non-nullable value types. See [Value Is Invalid][]. | +| [PropertyNullException][] | Thrown when [Dictionary][Dictionary Property] is `null`. | + +## Remarks + +### Item Equality + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +### Occurrences + +Unlike lists, dictionaries do not have a defined order. This means the nth occurrence is determined by the underlying Microsoft .Net implementation; this is not published and could change if the algorithm were to change. + +For information about [supported values][Occurrences] for the [Occurrence][Occurrence Property] property and examples of how it can be used, please see [Occurrences][]. + +### Empty Dictionary + +If [Dictionary][Dictionary Property] is empty (i.e. `{}`) there is nothing to remove, so no operation is performed. + +### No items matching Value, or Occurrence is not present + +If [Dictionary][Dictionary Property] does not contain items matching the specified [Value][Value Property] or the specified [Occurrence][Occurrence Property] is not present, there is nothing to remove, so no operation is performed. + +### Defining dictionaries using literal syntax + +For information about how to define dictionaries using literal syntax, see [Dictionary Literals][]. + +### Defining dictionaries using expression syntax + +For information about how to define dictionaries using expression syntax, see [Create a Dictionary<TKey, TItem>][]. + +### Dictionaries containing items with same data types vs different data types + +For information about the different types of dictionaries, including those that can contain only the same type of item, and those that can contain different types of item, see [Dictionaries][]. + +[Dictionary Property]: {{< ref "#dictionary" >}} +[Value Property]: {{< ref "#value" >}} +[Occurrence Property]: {{< ref "#occurrence" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} +[Occurrences]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Occurrences.MainDoc" >}} + +[Dictionary Literals]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.DictionaryLiteral" >}} +[Create a Dictionary<TKey, TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.Dictionary.CreateNew" >}} +[Dictionaries]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Dictionaries" >}} + +[TKey]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyDictionaryException]: {{< url path="Cortex.Reference.Exceptions.Dictionaries.CannotModifyReadOnlyDictionaryException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-items-with-key-block-3.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-items-with-key-block-3.md new file mode 100644 index 000000000..2a901a429 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-items-with-key-block-3.md @@ -0,0 +1,162 @@ +--- +title: "Remove Items With Key" +linkTitle: "Remove Items With Key" +description: "Removes all items with the given key from a Dictionary." +--- + +{{< figure src="/blocks/dictionaries-remove-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Dictionaries.RemoveItem.RemoveItemsWithKeyBlock`3)
+ +## Description + +Removes all items with the given [Key][Key Property] from a [Dictionary][Dictionary Property]. + +## Examples + +### Remove all items with a Key from an empty Dictionary + +This example will attempt to remove all items with the key `"Key1"` from `{}`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{}` | `($)Dictionary` is a variable of type [IDictionary][]<[dynamic][], [dynamic][]> | +| [Key][Key Property] | `($)Key`, with value `"Key1"` | `($)Key` is a variable of type [String][] | + +#### Result + +Attempting to remove all items with the key `"Key1"` from `{}` results in no operation, as there is nothing to remove. Therefore, the variable `($)Dictionary` remains: + +```json +{} +``` + +*** + +### Remove all items with a Key from a Dictionary + +Typically keys are simple data types such as [String][], [Int32][], [Boolean][], and for these a dictionary cannot the same key value more than once. This is due to how the data type's object equality is implemented (two items are considered equal if they have the same value rather than being the same object reference). + +However, other data types such as [IList][]<[Int32][]> can also be used as keys. For these data types, object equality only considers two items equal if they are the same reference; it does not care about whether they have the same value. Therefore, it is possible to have the same key value more than once, and as a result you should be able to remove all items with that key. + +This example will illustrate this, by attempting to remove all items with the key `[1]` from `{[1] : 1, [2] : 2, [3] : 3, [3] : 3, [2] : 2, [1] : 1}`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{[1] : 1, [2] : 2, [3] : 3, [3] : 3, [2] : 2, [1] : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[IList][]<[Int32][]>, [Int32][]> | +| [Key][Key Property] | `($)Key`, with value `[1]` | `($)Key` is a variable of type [IList][]<[Int32][]> | + +#### Result + +Attempting to remove all items with the key `[1]` from `{[1] : 1, [2] : 2, [3] : 3, [3] : 3, [2] : 2, [1] : 1}` results in the variable `($)Dictionary` being updated to the following: + +```csharp +{[2] : 2, [3] : 3, [3] : 3, [2] : 2} +``` + +*** + +## Properties + +### Dictionary + +The [Dictionary][Dictionary Property] to remove all items with the given [Key][Key Property] from. + +[Dictionary][Dictionary Property] can be any [IDictionary][]<[TKey][], [TItem][]>, where [TKey][] represents the type of keys used to lookup items in the [Dictionary][Dictionary Property], and [TItem][] represents the type of items in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[TKey][], [TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Dictionary` with no value | + +### Key + +The [Key][Key Property] the items to remove must have. + +For information and examples of how it is determined whether an item has a specified key, please see [Object Equality][]. + +For information about what a key is, please see [Keys][]. + +| | | +|--------------------|---------------------------| +| Data Type | [TKey][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyDictionaryException][] | Thrown when [Dictionary][Dictionary Property] is read-only. | +| [PropertyNullException][] | Thrown when [Dictionary][Dictionary Property] or [Key][Key Property] are `null`. | + +## Remarks + +### Key Equality + +For information and examples of how it is determined whether a key is already present, please see [Object Equality][]. + +### Empty Dictionary + +If [Dictionary][Dictionary Property] is empty (i.e. `{}`) there is nothing to remove, so no operation is performed. + +### No items with given Key + +If [Dictionary][Dictionary Property] does not contain items with the given [Key][Key Property] there is nothing to remove, so no operation is performed. + +### Defining dictionaries using literal syntax + +For information about how to define dictionaries using literal syntax, see [Dictionary Literals][]. + +### Defining dictionaries using expression syntax + +For information about how to define dictionaries using expression syntax, see [Create a Dictionary<TKey, TItem>][]. + +### Dictionaries containing items with same data types vs different data types + +For information about the different types of dictionaries, including those that can contain only the same type of item, and those that can contain different types of item, see [Dictionaries][]. + +[Dictionary Property]: {{< ref "#dictionary" >}} +[Key Property]: {{< ref "#key" >}} + +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[Keys]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Keys.MainDoc" >}} +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[Dictionary Literals]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.DictionaryLiteral" >}} +[Create a Dictionary<TKey, TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.Dictionary.CreateNew" >}} +[Dictionaries]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Dictionaries" >}} + +[TKey]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyDictionaryException]: {{< url path="Cortex.Reference.Exceptions.Dictionaries.CannotModifyReadOnlyDictionaryException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-items-with-keys-block-3.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-items-with-keys-block-3.md new file mode 100644 index 000000000..e0404792d --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-items-with-keys-block-3.md @@ -0,0 +1,167 @@ +--- +title: "Remove Items With Keys" +linkTitle: "Remove Items With Keys" +description: "Removes all items with any of the given keys from a Dictionary." +--- + +{{< figure src="/blocks/dictionaries-remove-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Dictionaries.RemoveItem.RemoveItemsWithKeysBlock`3)
+ +## Description + +Removes all items with any of the given [Keys][Keys Property] from a [Dictionary][Dictionary Property]. + +## Examples + +### Remove all items with any of the given Keys from an empty Dictionary + +This example will attempt to remove all items with any of the given keys in `["Key1", "Key2"]` from `{}`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{}` | `($)Dictionary` is a variable of type [IDictionary][]<[dynamic][], [dynamic][]> | +| [Keys][Keys Property] | `($)Keys`, with value `["Key1", "Key2"]` | `($)Keys` is a variable of type [IDictionary][]<[String][]> | + +#### Result + +Attempting to remove all items with any of the given keys in `["Key1", "Key2"]` from `{}` results in no operation, as there is nothing to remove. Therefore, the variable `($)Dictionary` remains: + +```json +{} +``` + +*** + +### Remove all items with any of the given Keys from a Dictionary + +This example will attempt to remove all items with any of the given keys in `["Key1", "Key2"]` from `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Keys][Keys Property] | `($)Keys`, with value `["Key1", "Key2"]` | `($)Keys` is a variable of type [IDictionary][]<[String][]> | + +#### Result + +Attempting to remove all items with any of the given keys in `["Key1", "Key2"]` from `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` results in the variable `($)Dictionary` being updated to the following: + +```json +{"Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1} +``` + +*** + +## Properties + +### Dictionary + +The [Dictionary][Dictionary Property] to remove all items with any of the given [Keys][Keys Property] from. + +[Dictionary][Dictionary Property] can be any [IDictionary][]<[TKey][], [TItem][]>, where [TKey][] represents the type of keys used to lookup items in the [Dictionary][Dictionary Property], and [TItem][] represents the type of items in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[TKey][], [TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Dictionary` with no value | + +### Keys + +The [Keys][Keys Property] the items to remove must have one of. + +For information and examples of how it is determined whether an item has a specified key, please see [Object Equality][]. + +For information about what a key is, please see [Keys][]. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[TKey][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [ArgumentNullException][] | Thrown when any key in [Keys][Keys Property] is `null`| +| [CannotModifyReadOnlyDictionaryException][] | Thrown when [Dictionary][Dictionary Property] is read-only. | +| [PropertyNullException][] | Thrown when [Dictionary][Dictionary Property] or [Keys][Keys Property] are `null`. | + +## Remarks + +### Key Equality + +For information and examples of how it is determined whether a key is already present, please see [Object Equality][]. + +### Empty Dictionary + +If [Dictionary][Dictionary Property] is empty (i.e. `{}`) there is nothing to remove, so no operation is performed. + +### Empty Keys + +If [Keys][Keys Property] is empty (i.e. `[]`) there are no keys to match, therefore nothing can be removed and no operation is performed. + +### No items with one of the given Keys + +If [Dictionary][Dictionary Property] does not contain items with one of the given [Keys][Keys Property], there is nothing to remove for that key. + +### No items with any of the given Keys + +If [Dictionary][Dictionary Property] does not contain items with any of the given [Keys][Keys Property] there is nothing to remove, so no operation is performed. + +### Defining dictionaries using literal syntax + +For information about how to define dictionaries using literal syntax, see [Dictionary Literals][]. + +### Defining dictionaries using expression syntax + +For information about how to define dictionaries using expression syntax, see [Create a Dictionary<TKey, TItem>][]. + +### Dictionaries containing items with same data types vs different data types + +For information about the different types of dictionaries, including those that can contain only the same type of item, and those that can contain different types of item, see [Dictionaries][]. + +[Dictionary Property]: {{< ref "#dictionary" >}} +[Keys Property]: {{< ref "#keys" >}} + +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[Keys]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Keys.MainDoc" >}} +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[Dictionary Literals]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.DictionaryLiteral" >}} +[Create a Dictionary<TKey, TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.Dictionary.CreateNew" >}} +[Dictionaries]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Dictionaries" >}} + +[TKey]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[ArgumentNullException]: {{< url path="MSDocs.DotNet.Api.System.ArgumentNullException" >}} +[CannotModifyReadOnlyDictionaryException]: {{< url path="Cortex.Reference.Exceptions.Dictionaries.CannotModifyReadOnlyDictionaryException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-items-with-value-block-3.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-items-with-value-block-3.md new file mode 100644 index 000000000..b5df28e3d --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-items-with-value-block-3.md @@ -0,0 +1,161 @@ +--- +title: "Remove Items With Value" +linkTitle: "Remove Items With Value" +description: "Removes all items matching a value from a Dictionary." +--- + +{{< figure src="/blocks/dictionaries-remove-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Dictionaries.RemoveItem.RemoveItemsWithValueBlock`3)
+ +## Description + +Removes all items matching a [Value][Value Property] from a [Dictionary][Dictionary Property]. + +## Examples + +### Remove all items matching a Value from an empty Dictionary + +This example will attempt to remove all items matching the value `1` from `{}`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{}` | `($)Dictionary` is a variable of type [IDictionary][]<[dynamic][], [dynamic][]> | +| [Value][Value Property] | `($)Value`, with value `1` | `($)Value` is a variable of type [Int32][] | + +#### Result + +Attempting to remove all items matching the value `1` from `{}` results in no operation, as there is nothing to remove. Therefore, the variable `($)Dictionary` remains: + +```json +{} +``` + +*** + +### Remove all items matching a Value from a Dictionary + +This example will attempt to remove all items matching the value `1` from `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Value][Value Property] | `($)Value`, with value `1` | `($)Value` is a variable of type [Int32][] | + +#### Result + +Attempting to remove all items matching the value `1` from `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` results in the variable `($)Dictionary` being updated to the following: + +```json +{"Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2} +``` + +*** + +## Properties + +### Dictionary + +The [Dictionary][Dictionary Property] to remove all matching items from. + +Items are considered matching if they have the specified [Value][Value Property]. + +[Dictionary][Dictionary Property] can be any [IDictionary][]<[TKey][], [TItem][]>, where [TKey][] represents the type of keys used to lookup items in the [Dictionary][Dictionary Property], and [TItem][] represents the type of items in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[TKey][], [TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Dictionary` with no value | + +### Value + +The [Value][Value Property] the items to remove must match. + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyDictionaryException][] | Thrown when [Dictionary][Dictionary Property] is read-only. | +| [InvalidPropertyValueException][] | Thrown when [Value][Value Property] is `null` and [Dictionary][Dictionary Property] only accepts non-nullable value types. See [Value Is Invalid][]. | +| [PropertyNullException][] | Thrown when [Dictionary][Dictionary Property] is `null`. | + +## Remarks + +### Item Equality + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +### Empty Dictionary + +If [Dictionary][Dictionary Property] is empty (i.e. `{}`) there is nothing to remove, so no operation is performed. + +### No items matching Value + +If [Dictionary][Dictionary Property] does not contain items matching the specified [Value][Value Property], there is nothing to remove, so no operation is performed. + +### Defining dictionaries using literal syntax + +For information about how to define dictionaries using literal syntax, see [Dictionary Literals][]. + +### Defining dictionaries using expression syntax + +For information about how to define dictionaries using expression syntax, see [Create a Dictionary<TKey, TItem>][]. + +### Dictionaries containing items with same data types vs different data types + +For information about the different types of dictionaries, including those that can contain only the same type of item, and those that can contain different types of item, see [Dictionaries][]. + +[Dictionary Property]: {{< ref "#dictionary" >}} +[Value Property]: {{< ref "#value" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[Dictionary Literals]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.DictionaryLiteral" >}} +[Create a Dictionary<TKey, TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.Dictionary.CreateNew" >}} +[Dictionaries]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Dictionaries" >}} + +[TKey]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyDictionaryException]: {{< url path="Cortex.Reference.Exceptions.Dictionaries.CannotModifyReadOnlyDictionaryException.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-items-with-values-block-3.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-items-with-values-block-3.md new file mode 100644 index 000000000..bfdf294cc --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/remove-item/remove-items-with-values-block-3.md @@ -0,0 +1,164 @@ +--- +title: "Remove Items With Values" +linkTitle: "Remove Items With Values" +description: "Removes all items matching one of the specified values from a Dictionary." +--- + +{{< figure src="/blocks/dictionaries-remove-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Dictionaries.RemoveItem.RemoveItemsWithValuesBlock`3)
+ +## Description + +Removes all items matching one of the specified [Values][Values Property] from a [Dictionary][Dictionary Property]. + +## Examples + +### Remove all items matching one of the specified Values from an empty Dictionary + +This example will attempt to remove all items matching one of the values `[1, 2]` from `{}`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{}` | `($)Dictionary` is a variable of type [IDictionary][]<[dynamic][], [dynamic][]> | +| [Values][Values Property] | `($)Values`, with value `[1, 2]` | `($)Values` is a variable of type [IEnumerable][]<[Int32][]> | + +#### Result + +Attempting to remove all items matching one of the values `[1, 2]` from `{}` results in no operation, as there is nothing to remove. Therefore, the variable `($)Dictionary` remains: + +```json +{} +``` + +*** + +### Remove all items matching one of the specified Values from a Dictionary + +This example will attempt to remove all items matching one of the values `[1, 2]` from `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Values][Values Property] | `($)Values`, with value `[1, 2]` | `($)Values` is a variable of type [IEnumerable][]<[Int32][]> | + +#### Result + +Attempting to remove all items matching one of the values `[1, 2]` from `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` results in the variable `($)Dictionary` being updated to the following: + +```json +{"Key3" : 3, "Key4" : 3} +``` + +*** + +## Properties + +### Dictionary + +The [Dictionary][Dictionary Property] to remove all matching items from. + +Items are considered matching if they have one of the specified [Values][Values Property]. + +[Dictionary][Dictionary Property] can be any [IDictionary][]<[TKey][], [TItem][]>, where [TKey][] represents the type of keys used to lookup items in the [Dictionary][Dictionary Property], and [TItem][] represents the type of items in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[TKey][], [TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Dictionary` with no value | + +### Values + +The [Values][Values Property] the items to remove must match one of. + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyDictionaryException][] | Thrown when [Dictionary][Dictionary Property] is read-only. | +| [PropertyNullException][] | Thrown when [Dictionary][Dictionary Property] or [Values][Values Property] is `null`. | + +## Remarks + +### Item Equality + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +### Empty Dictionary + +If [Dictionary][Dictionary Property] is empty (i.e. `{}`) there is nothing to remove, so no operation is performed. + +### Empty Values + +If [Values][Values Property] is empty (i.e. `[]`) there are no values to match, therefore nothing can be removed and no operation is performed. + +### No items matching a specified value in Values + +If [Dictionary][Dictionary Property] does not contain items matching one of the specified [Values][Values Property], there is nothing to remove for that value. + +### No items matching Values + +If [Dictionary][Dictionary Property] does not contain items matching any of the specified [Values][Values Property], there is nothing to remove, so no operation is performed. + +### Defining dictionaries using literal syntax + +For information about how to define dictionaries using literal syntax, see [Dictionary Literals][]. + +### Defining dictionaries using expression syntax + +For information about how to define dictionaries using expression syntax, see [Create a Dictionary<TKey, TItem>][]. + +### Dictionaries containing items with same data types vs different data types + +For information about the different types of dictionaries, including those that can contain only the same type of item, and those that can contain different types of item, see [Dictionaries][]. + +[Dictionary Property]: {{< ref "#dictionary" >}} +[Values Property]: {{< ref "#values" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[Dictionary Literals]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.DictionaryLiteral" >}} +[Create a Dictionary<TKey, TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.Dictionary.CreateNew" >}} +[Dictionaries]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Dictionaries" >}} + +[TKey]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyDictionaryException]: {{< url path="Cortex.Reference.Exceptions.Dictionaries.CannotModifyReadOnlyDictionaryException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/_index.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/_index.md new file mode 100644 index 000000000..56379859a --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/_index.md @@ -0,0 +1,5 @@ +--- +title: "Set Item(s)" +linkTitle: "Set Item(s)" +description: "Set an item or multiple items in a dictionary to a new value." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-all-items-block-3.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-all-items-block-3.md new file mode 100644 index 000000000..5c50db8a6 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-all-items-block-3.md @@ -0,0 +1,123 @@ +--- +title: "Set All Items" +linkTitle: "Set All Items" +description: "Sets all items in a Dictionary to a new value." +--- + +{{< figure src="/blocks/dictionaries-set-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Dictionaries.SetItem.SetAllItemsBlock`3)
+ +## Description + +Sets all items in a [Dictionary][Dictionary Property] to a [New Value][NewValue Property]. + +## Examples + +### Set all items in a Dictionary to a New Value + +This example will set all items in `{"Key1" : 1, "Key2" : 2}` to `10`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 2}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [New Value][NewValue Property] | `($)NewValue`, with value `10` | `($)NewValue` is a variable of type [Int32][] | + +#### Result + +Setting all items in `{"Key1" : 1, "Key2" : 2}` to `10` results in the variable `($)Dictionary` being updated to the following: + +```json +{"Key1" : 10, "Key2" : 10} +``` + +*** + +## Properties + +### Dictionary + +The [Dictionary][Dictionary Property] to set all items in. + +[Dictionary][Dictionary Property] can be any [IDictionary][]<[TKey][], [TItem][]>, where [TKey][] represents the type of keys used to lookup items in the [Dictionary][Dictionary Property], and [TItem][] represents the type of items in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[TKey][], [TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Dictionary` with no value | + +### New Value + +The [New Value][NewValue Property] to set all items in [Dictionary][Dictionary Property] to. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|-------------| +| [CannotModifyReadOnlyDictionaryException][] | Thrown when [Dictionary][Dictionary Property] is read-only. | +| [InvalidPropertyValueException][] | Thrown when [New Value][NewValue Property] is `null` and [Dictionary][Dictionary Property] only accepts non-nullable value types. See [Value Is Invalid][]. | +| [PropertyNullException][] | Thrown when [Dictionary][Dictionary Property] is `null`. | + +## Remarks + +### Empty Dictionary + +If [Dictionary][Dictionary Property] is empty (i.e. `{}`) there is nothing to set, so no operation is performed. + +### Defining dictionaries using literal syntax + +For information about how to define dictionaries using literal syntax, see [Dictionary Literals][]. + +### Defining dictionaries using expression syntax + +For information about how to define dictionaries using expression syntax, see [Create a Dictionary<TKey, TItem>][]. + +### Dictionaries containing items with same data types vs different data types + +For information about the different types of dictionaries, including those that can contain only the same type of item, and those that can contain different types of item, see [Dictionaries][]. + +[Dictionary Property]: {{< ref "#dictionary" >}} +[NewValue Property]: {{< ref "#new-value" >}} + +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[Dictionary Literals]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.DictionaryLiteral" >}} +[Create a Dictionary<TKey, TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.Dictionary.CreateNew" >}} +[Dictionaries]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Dictionaries" >}} + +[TKey]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyDictionaryException]: {{< url path="Cortex.Reference.Exceptions.Dictionaries.CannotModifyReadOnlyDictionaryException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-item-with-key-block-3.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-item-with-key-block-3.md new file mode 100644 index 000000000..87d635b1c --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-item-with-key-block-3.md @@ -0,0 +1,211 @@ +--- +title: "Set Item With Key" +linkTitle: "Set Item With Key" +description: "Sets the specified occurrence of an item with the given key in a Dictionary to a new value." +--- + +{{< figure src="/blocks/dictionaries-set-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Dictionaries.SetItem.SetItemWithKeyBlock`3)
+ +## Description + +Sets the specified [Occurrence][Occurrence Property] of an item with the given [Key][Key Property] in a [Dictionary][Dictionary Property] to a [New Value][NewValue Property]. + +## Examples + +### Set the first Occurrence of an item with a Key in a Dictionary to a New Value + +This example will attempt to set the first occurrence of an item with the key `"Key1"` in `{"Key1" : 1, "Key2" : 2}` to `10`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 2}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Key][Key Property] | `($)Key`, with value `"Key1"` | `($)Key` is a variable of type [String][] | +| [New Value][NewValue Property] | `($)NewValue`, with value `10` | `($)NewValue` is a variable of type [Int32][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | + +#### Result + +An [Occurrence][Occurrence Property] of `1` means set the first occurrence; `2` means second etc. + +Attempting to set the first occurrence of an item with the key `"Key1"` in `{"Key1" : 1, "Key2" : 2}` to `10` results in the variable `($)Dictionary` being updated to the following: + +```json +{"Key1" : 10, "Key2" : 1} +``` + +*** + +### Set the last Occurrence of an item with a Key in a Dictionary to a New Value + +Typically keys are simple data types such as [String][], [Int32][], [Boolean][], and for these a dictionary cannot the same key value more than once. This is due to how the data type's object equality is implemented (two items are considered equal if they have the same value rather than being the same object reference). + +However, other data types such as [IList][]<[Int32][]> can also be used as keys. For these data types, object equality only considers two items equal if they are the same reference; it does not care about whether they have the same value. Therefore, it is possible to have the same key value more than once, and as a result you should be able to set an occurrence of item with that key. + +This example will illustrate this, by attempting to set the last occurrence of an item with the key `[1]` in `{[1] : 1, [2] : 2, [3] : 3, [3] : 3, [2] : 2, [1] : 1}` to `10`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{[1] : 1, [2] : 2, [3] : 3, [3] : 3, [2] : 2, [1] : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[IList][]<[Int32][]>, [Int32][]> | +| [Key][Key Property] | `($)Key`, with value `[1]` | `($)Key` is a variable of type [IList][]<[Int32][]> | +| [New Value][NewValue Property] | `($)NewValue`, with value `10` | `($)NewValue` is a variable of type [Int32][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `-1` | `($)Occurrence` is a variable of type [Int32][] | + +#### Result + +An [Occurrence][Occurrence Property] of `-1`, means set the last occurrence; `-2` means second last etc. + +Attempting to set the last occurrence of an item with the key `[1]` in `{[1] : 1, [2] : 2, [3] : 3, [3] : 3, [2] : 2, [1] : 1}` to `10` results in the variable `($)Dictionary` being updated to the following: + +```csharp +{[1] : 1, [2] : 2, [3] : 3, [3] : 3, [2] : 2, [1] : 10} +``` + +*** + +## Properties + +### Dictionary + +The [Dictionary][Dictionary Property] to set the specified [Occurrence][Occurrence Property] of item with the given [Key][Key Property] in. + +Items are considered matching if they have the specified [Key][Key Property]. + +[Dictionary][Dictionary Property] can be any [IDictionary][]<[TKey][], [TItem][]>, where [TKey][] represents the type of keys used to lookup items in the [Dictionary][Dictionary Property], and [TItem][] represents the type of items in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[TKey][], [TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Dictionary` with no value | + +### Key + +The [Key][Key Property] the item to set must have. + +For information and examples of how it is determined whether an item has a specified key, please see [Object Equality][]. + +For information about what a key is, please see [Keys][]. + +| | | +|--------------------|---------------------------| +| Data Type | [TKey][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### New Value + +The [New Value][NewValue Property] to set the specified [Occurrence][Occurrence Property] of item with the given [Key][Key Property] in [Dictionary][Dictionary Property] to. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Occurrence + +The [Occurrence][Occurrence Property] of item with the given [Key][Key Property] to set in the [Dictionary][Dictionary Property]. + +Items are considered matching if they have the specified [Key][Key Property]. + +Unlike lists, dictionaries do not have a defined order. This means the nth occurrence is determined by the underlying Microsoft .Net implementation; this is not published and could change if the algorithm were to change. + +For information about [supported values][Occurrences] for the [Occurrence][Occurrence Property] property and examples of how it can be used, please see [Occurrences][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `1` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyDictionaryException][] | Thrown when [Dictionary][Dictionary Property] is read-only. | +| [InvalidPropertyValueException][] | Thrown when [New Value][NewValue Property] is `null` and [Dictionary][Dictionary Property] only accepts non-nullable value types. See [Value Is Invalid][]. | +| [KeyNotPresentException][] | Thrown when the [Key][Key Property] is not present in the [Dictionary][Dictionary Property]. | +| [OccurrenceNotPresentException][] | Thrown when the specified [Occurrence][Occurrence Property] of item with the given [Key][Key Property] is not present in the [Dictionary][Dictionary Property]. | +| [PropertyNullException][] | Thrown when [Dictionary][Dictionary Property] or [Key][Key Property] are `null`. | + +## Remarks + +### Key Equality + +For information and examples of how it is determined whether a key is already present, please see [Object Equality][]. + +### Occurrences + +Unlike lists, dictionaries do not have a defined order. This means the nth occurrence is determined by the underlying Microsoft .Net implementation; this is not published and could change if the algorithm were to change. + +For information about [supported values][Occurrences] for the [Occurrence][Occurrence Property] property and examples of how it can be used, please see [Occurrences][]. + +### Defining dictionaries using literal syntax + +For information about how to define dictionaries using literal syntax, see [Dictionary Literals][]. + +### Defining dictionaries using expression syntax + +For information about how to define dictionaries using expression syntax, see [Create a Dictionary<TKey, TItem>][]. + +### Dictionaries containing items with same data types vs different data types + +For information about the different types of dictionaries, including those that can contain only the same type of item, and those that can contain different types of item, see [Dictionaries][]. + +[Dictionary Property]: {{< ref "#dictionary" >}} +[Key Property]: {{< ref "#key" >}} +[NewValue Property]: {{< ref "#new-value" >}} +[Occurrence Property]: {{< ref "#occurrence" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Keys]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Keys.MainDoc" >}} +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} +[Occurrences]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Occurrences.MainDoc" >}} + +[Dictionary Literals]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.DictionaryLiteral" >}} +[Create a Dictionary<TKey, TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.Dictionary.CreateNew" >}} +[Dictionaries]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Dictionaries" >}} + +[TKey]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyDictionaryException]: {{< url path="Cortex.Reference.Exceptions.Dictionaries.CannotModifyReadOnlyDictionaryException.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[KeyNotPresentException]: {{< url path="Cortex.Reference.Exceptions.Dictionaries.KeyNotPresentException.MainDoc" >}} +[OccurrenceNotPresentException]: {{< url path="Cortex.Reference.Exceptions.Collections.OccurrenceNotPresentException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-item-with-value-block-3.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-item-with-value-block-3.md new file mode 100644 index 000000000..c665ff4f7 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-item-with-value-block-3.md @@ -0,0 +1,206 @@ +--- +title: "Set Item With Value" +linkTitle: "Set Item With Value" +description: "Sets the specified occurrence of an item matching a value in a Dictionary to a new value." +--- + +{{< figure src="/blocks/dictionaries-set-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Dictionaries.SetItem.SetItemWithValueBlock`3)
+ +## Description + +Sets the specified [Occurrence][Occurrence Property] of an item matching a [Value][Value Property] in a [Dictionary][Dictionary Property] to a [New Value][NewValue Property]. + +## Examples + +### Set the first Occurrence of an item matching a Value in a Dictionary to a New Value + +This example will attempt to set the first occurrence of an item matching the value `1` in `{"Key1" : 1, "Key2" : 1}` to `10`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Value][Value Property] | `($)Value`, with value `1` | `($)Value` is a variable of type [Int32][] | +| [New Value][NewValue Property] | `($)NewValue`, with value `10` | `($)NewValue` is a variable of type [Int32][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | + +#### Result + +An [Occurrence][Occurrence Property] of `1` means set the first occurrence; `2` means second etc. + +Attempting to set the first occurrence of an item matching the value `1` in `{"Key1" : 1, "Key2" : 1}` to `10` results in the variable `($)Dictionary` being updated to the following: + +```json +{"Key1" : 10, "Key2" : 1} +``` + +*** + +### Set the last Occurrence of an item matching a Value in a Dictionary to a New Value + +This example will attempt to set the last occurrence of an item matching the value `1` in `{"Key1" : 1, "Key2" : 1}` to `10`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Value][Value Property] | `($)Value`, with value `1` | `($)Value` is a variable of type [Int32][] | +| [New Value][NewValue Property] | `($)NewValue`, with value `10` | `($)NewValue` is a variable of type [Int32][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `-1` | `($)Occurrence` is a variable of type [Int32][] | + +#### Result + +An [Occurrence][Occurrence Property] of `-1`, means set the last occurrence; `-2` means second last etc. + +Attempting to set the last occurrence of an item matching the value `1` in `{"Key1" : 1, "Key2" : 1}` to `10` results in the variable `($)Dictionary` being updated to the following: + +```json +{"Key1" : 1, "Key2" : 10} +``` + +*** + +## Properties + +### Dictionary + +The [Dictionary][Dictionary Property] to set the specified [Occurrence][Occurrence Property] of matching item in. + +Items are considered matching if they have the specified [Value][Value Property]. + +[Dictionary][Dictionary Property] can be any [IDictionary][]<[TKey][], [TItem][]>, where [TKey][] represents the type of keys used to lookup items in the [Dictionary][Dictionary Property], and [TItem][] represents the type of items in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[TKey][], [TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Dictionary` with no value | + +### Value + +The [Value][Value Property] the item to set must match. + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### New Value + +The [New Value][NewValue Property] to set the specified [Occurrence][Occurrence Property] of matching item in [Dictionary][Dictionary Property] to. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Occurrence + +The [Occurrence][Occurrence Property] of matching item to set in the [Dictionary][Dictionary Property]. + +Items are considered matching if they have the specified [Value][Value Property]. + +Unlike lists, dictionaries do not have a defined order. This means the nth occurrence is determined by the underlying Microsoft .Net implementation; this is not published and could change if the algorithm were to change. + +For information about [supported values][Occurrences] for the [Occurrence][Occurrence Property] property and examples of how it can be used, please see [Occurrences][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `1` | + + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyDictionaryException][] | Thrown when [Dictionary][Dictionary Property] is read-only. | +| [InvalidPropertyValueException][] | Thrown when [Value][Value Property] or [New Value][NewValue Property] are `null` and [Dictionary][Dictionary Property] only accepts non-nullable value types. See [Value Is Invalid][]. | +| [PropertyNullException][] | Thrown when [Dictionary][Dictionary Property] is `null`. | + +## Remarks + +### Item Equality + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +### Occurrences + +Unlike lists, dictionaries do not have a defined order. This means the nth occurrence is determined by the underlying Microsoft .Net implementation; this is not published and could change if the algorithm were to change. + +For information about [supported values][Occurrences] for the [Occurrence][Occurrence Property] property and examples of how it can be used, please see [Occurrences][]. + +### Empty Dictionary + +If [Dictionary][Dictionary Property] is empty (i.e. `{}`) there is nothing to set, so no operation is performed. + +### No items matching Value, or Occurrence is not present + +If [Dictionary][Dictionary Property] does not contain items matching the specified [Value][Value Property] or the specified [Occurrence][Occurrence Property] is not present, there is nothing to set, so no operation is performed. + +### Defining dictionaries using literal syntax + +For information about how to define dictionaries using literal syntax, see [Dictionary Literals][]. + +### Defining dictionaries using expression syntax + +For information about how to define dictionaries using expression syntax, see [Create a Dictionary<TKey, TItem>][]. + +### Dictionaries containing items with same data types vs different data types + +For information about the different types of dictionaries, including those that can contain only the same type of item, and those that can contain different types of item, see [Dictionaries][]. + +[Dictionary Property]: {{< ref "#dictionary" >}} +[Value Property]: {{< ref "#value" >}} +[NewValue Property]: {{< ref "#new-value" >}} +[Occurrence Property]: {{< ref "#occurrence" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} +[Occurrences]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Occurrences.MainDoc" >}} + +[Dictionary Literals]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.DictionaryLiteral" >}} +[Create a Dictionary<TKey, TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.Dictionary.CreateNew" >}} +[Dictionaries]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Dictionaries" >}} + +[TKey]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyDictionaryException]: {{< url path="Cortex.Reference.Exceptions.Dictionaries.CannotModifyReadOnlyDictionaryException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-items-with-key-block-3.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-items-with-key-block-3.md new file mode 100644 index 000000000..8ec4ef0e0 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-items-with-key-block-3.md @@ -0,0 +1,155 @@ +--- +title: "Set Items With Key" +linkTitle: "Set Items With Key" +description: "Sets all items with the given key in a Dictionary to a new value." +--- + +{{< figure src="/blocks/dictionaries-set-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Dictionaries.SetItem.SetItemsWithKeyBlock`3)
+ +## Description + +Sets all items with the given [Key][Key Property] in a [Dictionary][Dictionary Property] to a [New Value][NewValue Property]. + +## Examples + +### Sets all items with a Key in a Dictionary to a New Value + +Typically keys are simple data types such as [String][], [Int32][], [Boolean][], and for these a dictionary cannot the same key value more than once. This is due to how the data type's object equality is implemented (two items are considered equal if they have the same value rather than being the same object reference). + +However, other data types such as [IList][]<[Int32][]> can also be used as keys. For these data types, object equality only considers two items equal if they are the same reference; it does not care about whether they have the same value. Therefore, it is possible to have the same key value more than once, and as a result you should be able to set all items with that key. + +This example will illustrate this, by attempting to set all items with the key `[1]` in `{[1] : 1, [2] : 2, [3] : 3, [3] : 3, [2] : 2, [1] : 1}` to `10`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{[1] : 1, [2] : 2, [3] : 3, [3] : 3, [2] : 2, [1] : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[IList][]<[Int32][]>, [Int32][]> | +| [Key][Key Property] | `($)Key`, with value `[1]` | `($)Key` is a variable of type [IList][]<[Int32][]> | +| [New Value][NewValue Property] | `($)NewValue`, with value `10` | `($)NewValue` is a variable of type [Int32][] | + +#### Result + +Attempting to set all items with the key `[1]` in `{[1] : 1, [2] : 2, [3] : 3, [3] : 3, [2] : 2, [1] : 1}` to `10` results in the variable `($)Dictionary` being updated to the following: + +```csharp +{[1] : 10, [2] : 2, [3] : 3, [3] : 3, [2] : 2, [1] : 10} +``` + +*** + +## Properties + +### Dictionary + +The [Dictionary][Dictionary Property] to set all items with the given [Key][Key Property] in. + +Items are considered matching if they have the specified [Key][Key Property]. + +[Dictionary][Dictionary Property] can be any [IDictionary][]<[TKey][], [TItem][]>, where [TKey][] represents the type of keys used to lookup items in the [Dictionary][Dictionary Property], and [TItem][] represents the type of items in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[TKey][], [TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Dictionary` with no value | + +### Key + +The [Key][Key Property] the items to set must have. + +For information and examples of how it is determined whether an item has a specified key, please see [Object Equality][]. + +For information about what a key is, please see [Keys][]. + +| | | +|--------------------|---------------------------| +| Data Type | [TKey][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### New Value + +The [New Value][NewValue Property] to set all items with the given [Key][Key Property] in [Dictionary][Dictionary Property] to. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyDictionaryException][] | Thrown when [Dictionary][Dictionary Property] is read-only. | +| [InvalidPropertyValueException][] | Thrown when [New Value][NewValue Property] is `null` and [Dictionary][Dictionary Property] only accepts non-nullable value types. See [Value Is Invalid][]. | +| [KeyNotPresentException][] | Thrown when the [Key][Key Property] is not present in the [Dictionary][Dictionary Property]. | +| [PropertyNullException][] | Thrown when [Dictionary][Dictionary Property] or [Key][Key Property] are `null`. | + +## Remarks + +### Key Equality + +For information and examples of how it is determined whether a key is already present, please see [Object Equality][]. + +### Defining dictionaries using literal syntax + +For information about how to define dictionaries using literal syntax, see [Dictionary Literals][]. + +### Defining dictionaries using expression syntax + +For information about how to define dictionaries using expression syntax, see [Create a Dictionary<TKey, TItem>][]. + +### Dictionaries containing items with same data types vs different data types + +For information about the different types of dictionaries, including those that can contain only the same type of item, and those that can contain different types of item, see [Dictionaries][]. + +[Dictionary Property]: {{< ref "#dictionary" >}} +[Key Property]: {{< ref "#key" >}} +[NewValue Property]: {{< ref "#new-value" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Keys]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Keys.MainDoc" >}} +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[Dictionary Literals]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.DictionaryLiteral" >}} +[Create a Dictionary<TKey, TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.Dictionary.CreateNew" >}} +[Dictionaries]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Dictionaries" >}} + +[TKey]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyDictionaryException]: {{< url path="Cortex.Reference.Exceptions.Dictionaries.CannotModifyReadOnlyDictionaryException.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[KeyNotPresentException]: {{< url path="Cortex.Reference.Exceptions.Dictionaries.KeyNotPresentException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-items-with-keys-block-3.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-items-with-keys-block-3.md new file mode 100644 index 000000000..db087c543 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-items-with-keys-block-3.md @@ -0,0 +1,150 @@ +--- +title: "Set Items With Keys" +linkTitle: "Set Items With Keys" +description: "Sets all items with any of the given keys in a Dictionary to new values." +--- + +{{< figure src="/blocks/dictionaries-set-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Dictionaries.SetItem.SetItemsWithKeysBlock`3)
+ +## Description + +Sets all items with any of the given [Keys][Keys Property] in a [Dictionary][Dictionary Property] to [New Values][NewValues Property]. + +## Examples + +### Set all items with any of the given Keys in a Dictionary to New Values + +This example will attempt to set all items with any of the keys `["Key1", "Key2"]` in `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` to `[10, 20]` respectively. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Keys][Keys Property] | `($)Keys`, with value `["Key1", "Key2"]` | `($)Keys` is a variable of type [IEnumerable][]<[String][]> | +| [NewValues][NewValues Property] | `($)NewValues`, with value `[10, 20]` | `($)NewValues` is a variable of type [IEnumerable][]<[Int32][]> | + +#### Result + +Attempting to set all items with any of the keys `["Key1", "Key2"]` in `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` to `[10, 20]` respectively, results in the variable `($)Dictionary` being updated to the following: + +```json +{"Key1" : 10, "Key2" : 20, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1} +``` + +*** + +## Properties + +### Dictionary + +The [Dictionary][Dictionary Property] to set all matching items in. + +Items are considered matching if they have any of the specified [Keys][Keys Property]. + +[Dictionary][Dictionary Property] can be any [IDictionary][]<[TKey][], [TItem][]>, where [TKey][] represents the type of keys used to lookup items in the [Dictionary][Dictionary Property], and [TItem][] represents the type of items in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[TKey][], [TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Dictionary` with no value | +### Keys + +The [Keys][Keys Property] the items to set must have one of. + +For information and examples of how it is determined whether an item has a specified key, please see [Object Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[TKey][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### New Values + +The [New Values][NewValues Property] to set the items with the corresponding [Keys][Keys Property] in [Dictionary][Dictionary Property] to. + +The number of items in [New Values][NewValues Property] must match the number of items in [Keys][Keys Property]. + +[Dictionary][Dictionary Property] items with the first key in [Keys][Keys Property] will be set to the first value in [New Values][NewValues Property]; [Dictionary][Dictionary Property] items with the second key in [Keys][Keys Property] will be set to the second value in [New Values][NewValues Property] etc. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [ArgumentNullException][] | Thrown when any key in [Keys][Keys Property] is `null`| +| [CannotModifyReadOnlyDictionaryException][] | Thrown when [Dictionary][Dictionary Property] is read-only. | +| [KeysNotPresentException][] | Thrown when any key in the [Keys][Keys Property] is not present in the [Dictionary][Dictionary Property]. | +| [PropertyItemCountException][] | Thrown when the count of items in [Keys][Keys Property] and the count of items in [New Values][NewValues Property] are not the same, or neither contain any items. | +| [PropertyNullException][] | Thrown when [Dictionary][Dictionary Property] or [Keys][Keys Property] or [New Values][NewValues Property] are `null`. | + +## Remarks + +### Key Equality + +For information and examples of how it is determined whether an item has a specified key, please see [Object Equality][]. + +### Defining dictionaries using literal syntax + +For information about how to define dictionaries using literal syntax, see [Dictionary Literals][]. + +### Defining dictionaries using expression syntax + +For information about how to define dictionaries using expression syntax, see [Create a Dictionary<TKey, TItem>][]. + +### Dictionaries containing items with same data types vs different data types + +For information about the different types of dictionaries, including those that can contain only the same type of item, and those that can contain different types of item, see [Dictionaries][]. + +[Dictionary Property]: {{< ref "#dictionary" >}} +[Keys Property]: {{< ref "#keys" >}} +[NewValues Property]: {{< ref "#new-values" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Keys]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Keys.MainDoc" >}} +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[Dictionary Literals]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.DictionaryLiteral" >}} +[Create a Dictionary<TKey, TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.Dictionary.CreateNew" >}} +[Dictionaries]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Dictionaries" >}} + +[TKey]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[ArgumentNullException]: {{< url path="MSDocs.DotNet.Api.System.ArgumentNullException" >}} +[CannotModifyReadOnlyDictionaryException]: {{< url path="Cortex.Reference.Exceptions.Dictionaries.CannotModifyReadOnlyDictionaryException.MainDoc" >}} +[KeysNotPresentException]: {{< url path="Cortex.Reference.Exceptions.Dictionaries.KeysNotPresentException.MainDoc" >}} +[PropertyItemCountException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyItemCountException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-items-with-value-block-3.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-items-with-value-block-3.md new file mode 100644 index 000000000..e75267cff --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-items-with-value-block-3.md @@ -0,0 +1,152 @@ +--- +title: "Set Items With Value" +linkTitle: "Set Items With Value" +description: "Sets all items matching a value in a Dictionary to a new value." +--- + +{{< figure src="/blocks/dictionaries-set-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Dictionaries.SetItem.SetItemsWithValueBlock`3)
+ +## Description + +Sets all items matching a [Value][Value Property] in a [Dictionary][Dictionary Property] to a [New Value][NewValue Property]. + +## Examples + +### Set all items matching a Value in a Dictionary to a New Value + +This example will attempt to set all items matching the value `1` in `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` to `10`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Value][Value Property] | `($)Value`, with value `1` | `($)Value` is a variable of type [Int32][] | +| [New Value][NewValue Property] | `($)NewValue`, with value `10` | `($)NewValue` is a variable of type [Int32][] | + +#### Result + +Attempting to set all items matching the value `1` in `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` to `10` results in the variable `($)Dictionary` being updated to the following: + +```json +{"Key1" : 10, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 10} +``` + +*** + +## Properties + +### Dictionary + +The [Dictionary][Dictionary Property] to set all matching items in. + +Items are considered matching if they have the specified [Value][Value Property]. + +[Dictionary][Dictionary Property] can be any [IDictionary][]<[TKey][], [TItem][]>, where [TKey][] represents the type of keys used to lookup items in the [Dictionary][Dictionary Property], and [TItem][] represents the type of items in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[TKey][], [TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Dictionary` with no value | + +### Value + +The [Value][Value Property] the items to set must match. + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### New Value + +The [New Value][NewValue Property] to set all matching items in [Dictionary][Dictionary Property] to. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyDictionaryException][] | Thrown when [Dictionary][Dictionary Property] is read-only. | +| [InvalidPropertyValueException][] | Thrown when [Value][Value Property] or [New Value][NewValue Property] are `null` and [Dictionary][Dictionary Property] only accepts non-nullable value types. See [Value Is Invalid][]. | +| [PropertyNullException][] | Thrown when [Dictionary][Dictionary Property] is `null`. | + +## Remarks + +### Item Equality + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +### Empty Dictionary + +If [Dictionary][Dictionary Property] is empty (i.e. `{}`) there is nothing to set, so no operation is performed. + +### No items matching Value + +If [Dictionary][Dictionary Property] does not contain items matching the specified [Value][Value Property], there is nothing to set, so no operation is performed. + +### Defining dictionaries using literal syntax + +For information about how to define dictionaries using literal syntax, see [Dictionary Literals][]. + +### Defining dictionaries using expression syntax + +For information about how to define dictionaries using expression syntax, see [Create a Dictionary<TKey, TItem>][]. + +### Dictionaries containing items with same data types vs different data types + +For information about the different types of dictionaries, including those that can contain only the same type of item, and those that can contain different types of item, see [Dictionaries][]. + +[Dictionary Property]: {{< ref "#dictionary" >}} +[Value Property]: {{< ref "#value" >}} +[NewValue Property]: {{< ref "#new-value" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[Dictionary Literals]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.DictionaryLiteral" >}} +[Create a Dictionary<TKey, TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.Dictionary.CreateNew" >}} +[Dictionaries]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Dictionaries" >}} + +[TKey]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyDictionaryException]: {{< url path="Cortex.Reference.Exceptions.Dictionaries.CannotModifyReadOnlyDictionaryException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-items-with-values-block-3.md b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-items-with-values-block-3.md new file mode 100644 index 000000000..2162102a8 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Dictionaries/set-item/set-items-with-values-block-3.md @@ -0,0 +1,160 @@ +--- +title: "Set Items With Values" +linkTitle: "Set Items With Values" +description: "Sets all items matching one of the specified values in a Dictionary to new values." +--- + +{{< figure src="/blocks/dictionaries-set-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Dictionaries.SetItem.SetItemsWithValuesBlock`3)
+ +## Description + +Set all items matching one of the specified [Values][Values Property] in a [Dictionary][Dictionary Property] to [New Values][NewValues Property]. + +## Examples + +### Set all items matching one of the specified Values in a Dictionary to New Values + +This example will attempt to set all items matching one of the values `[1, 2]` in `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` to `[10, 20]` respectively. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Dictionary][Dictionary Property] | `($)Dictionary`, with value `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` | `($)Dictionary` is a variable of type [IDictionary][]<[String][], [Int32][]> | +| [Values][Values Property] | `($)Values`, with value `[1, 2]` | `($)Values` is a variable of type [IEnumerable][]<[Int32][]> | +| [NewValues][NewValues Property] | `($)NewValues`, with value `[10, 20]` | `($)NewValues` is a variable of type [IEnumerable][]<[Int32][]> | + +#### Result + +Attempting to set all items matching one of the values `[1, 2]` in `{"Key1" : 1, "Key2" : 2, "Key3" : 3, "Key4" : 3, "Key5" : 2, "Key6" : 1}` to `[10, 20]` respectively, results in the variable `($)Dictionary` being updated to the following: + +```json +{"Key1" : 10, "Key2" : 20, "Key3" : 3, "Key4" : 3, "Key5" : 20, "Key6" : 10} +``` + +*** + +## Properties + +### Dictionary + +The [Dictionary][Dictionary Property] to set all matching items in. + +Items are considered matching if they have one of the specified [Values][Values Property]. + +[Dictionary][Dictionary Property] can be any [IDictionary][]<[TKey][], [TItem][]>, where [TKey][] represents the type of keys used to lookup items in the [Dictionary][Dictionary Property], and [TItem][] represents the type of items in the [Dictionary][Dictionary Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[TKey][], [TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Dictionary` with no value | + +### Values + +The [Values][Values Property] the items to set must match one of. + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### New Values + +The [New Values][NewValues Property] to set the items matching the corresponding [Values][Values Property] in [Dictionary][Dictionary Property] to. + +The number of items in [New Values][NewValues Property] must match the number of items in [Values][Values Property]. + +[Dictionary][Dictionary Property] items matching the first value in [Values][Values Property] will be set to the first value in [New Values][NewValues Property]; [Dictionary][Dictionary Property] items matching the second value in [Values][Values Property] will be set to the second value in [New Values][NewValues Property] etc. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyDictionaryException][] | Thrown when [Dictionary][Dictionary Property] is read-only. | +| [DuplicateValueException][] | Thrown when [Values][Values Property] contains duplicate values. | +| [PropertyItemCountException][] | Thrown when the count of items in [Values][Values Property] and the count of items in [New Values][NewValues Property] are not the same, or neither contain any items. | +| [PropertyNullException][] | Thrown when [Dictionary][Dictionary Property] or [Values][Values Property] or [New Values][NewValues Property] are `null`. | + +## Remarks + +### Item Equality + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +### Empty Dictionary + +If [Dictionary][Dictionary Property] is empty (i.e. `{}`) there is nothing to set, so no operation is performed. + +### No items matching a specified value in Values + +If [Dictionary][Dictionary Property] does not contain items matching one of the specified [Values][Values Property], there is nothing to set for that value. + +### No items matching Values + +If [Dictionary][Dictionary Property] does not contain items matching any of the specified [Values][Values Property], there is nothing to set, so no operation is performed. + +### Defining dictionaries using literal syntax + +For information about how to define dictionaries using literal syntax, see [Dictionary Literals][]. + +### Defining dictionaries using expression syntax + +For information about how to define dictionaries using expression syntax, see [Create a Dictionary<TKey, TItem>][]. + +### Dictionaries containing items with same data types vs different data types + +For information about the different types of dictionaries, including those that can contain only the same type of item, and those that can contain different types of item, see [Dictionaries][]. + +[Dictionary Property]: {{< ref "#dictionary" >}} +[Values Property]: {{< ref "#values" >}} +[NewValues Property]: {{< ref "#new-values" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[Dictionary Literals]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.DictionaryLiteral" >}} +[Create a Dictionary<TKey, TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.Dictionary.CreateNew" >}} +[Dictionaries]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Dictionaries" >}} + +[TKey]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyDictionaryException]: {{< url path="Cortex.Reference.Exceptions.Dictionaries.CannotModifyReadOnlyDictionaryException.MainDoc" >}} +[DuplicateValueException]: {{< url path="Cortex.Reference.Exceptions.Lists.DuplicateValueException.MainDoc" >}} +[PropertyItemCountException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyItemCountException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Exceptions/_index.md b/content/en/docs/2023.9/Reference/Blocks/Exceptions/_index.md new file mode 100644 index 000000000..517a2760b --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Exceptions/_index.md @@ -0,0 +1,5 @@ +--- +title: "Exceptions" +linkTitle: "Exceptions" +description: "Blocks related to handling and throwing Exceptions." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-block-exception/_index.md b/content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-block-exception/_index.md new file mode 100644 index 000000000..0b363a866 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-block-exception/_index.md @@ -0,0 +1,5 @@ +--- +title: "Handle Block Exception(s)" +linkTitle: "Handle Block Exception(s)" +description: "Handle exceptions that occur during block execution." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-block-exception/handle-block-exception-block.md b/content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-block-exception/handle-block-exception-block.md new file mode 100644 index 000000000..8fc45900c --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-block-exception/handle-block-exception-block.md @@ -0,0 +1,132 @@ +--- +title: "Handle Block Exception" +linkTitle: "Handle Block Exception" +description: "Handles any exception thrown by the block it is connected to." +--- + +{{< figure src="/blocks/exceptions-handle-block-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Exceptions.HandleBlockException.HandleBlockExceptionBlock)
+ +## Description + +Handles any [Exception][Exception Property] thrown by the block it is connected to. + +## Examples + +### Handle and save the Exception + +This example will handle any exception thrown by the block it is connected to; saving the exception to a variable, so the flow execution can use it to make decisions or take further action. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Exception][Exception Property] | `($)Exception`, with no value | `($)Exception` is a variable that will be set to a [dynamic][] value | + +#### Result + +The block will handle any exception and save the exception to the `($)Exception` variable for use later in the flow execution. + +*** + +### Handle and discard the Exception from being saved + +This example will handle any exception thrown by the block it is connected to; not saving the exception to a variable, as the flow execution does not need it to make decisions or take further action. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Exception][Exception Property] | `($)_`, with no value | `($)_` is a built-in variable that indicates the flow execution does not need to save the exception, so it can be discarded | + +#### Result + +The block will handle any exception, but will not save the exception as the `($)_` variable indicates it is not needed and can be discarded. + +For more infomation about using the built-in `($)_` variable, please see [Discarding Output Properties][]. + +*** + +## Properties + +### Exception + +The [Exception][Exception Property] that is handled. + +[Exception][Exception Property] can be any [Exception data type][Exception]. + +If the flow execution does not need the exception, it can be discarded by assigning the built-in `($)_` variable. + +For more infomation about using the built-in `($)_` variable, please see [Discarding Output Properties][]. + +| | | +|--------------------|---------------------------| +| Data Type | [dynamic][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)_` to [discard][] | + +## Exceptions + +No exceptions are thrown by the block. + +## Remarks + +### Chaining Exception handling blocks + +Blocks that handle block exceptions can be chained together so different exceptions can be handled separately. The blocks are listed below: + +* [Handle Block Exception Matching Message][] +* [Handle Block Exception Matching Messages][] +* [Handle Block Exception Matching Type Name][] +* [Handle Block Exception Matching Type Names][] +* [Handle Block Exception][] + +{{< figure src="/images/chaining-handle-block-exception-blocks.png" >}} + +Each block has an input port on its left-hand side and, with the exception of this block, also have an output port on their right-hand side; this is so they can pass any exception they do not handle to the next block. + +As this block handles any exception, it does not require the output port. + +For more information about chaining of exception handling blocks and passing of exceptions, please see [Exception Handling][]. + +### Why does the Exception property return a dynamic data type? + +The decision for the [Exception][Exception Property] to return a [dynamic data type][dynamic] rather than an [Exception data type][Exception], was to avoid users having to [cast][Object Casting] the exception to its correct type to be able to use all of its properties. + +As a result, any issues with using the [Exception data type][Exception] (i.e. trying to access a property it does not have) will not be reported as messages when trying to debug the flow; they will only be discovered when the flow execution reaches the part of the flow with the issue. + +If it is desirable to have any issues reported as messages when trying to debug the flow, the user can [cast][Object Casting] the exception to its correct type. + +### Using the built-in ($)_ variable to discard the Exception from being saved + +Sometimes when an exception occurs the flow execution wants to use the exception to make decisions or take further action. However, there are occasions when the exception is not needed, and being forced to create another variable to save the exception is extra work for no benefit. In these circumstances it is possible to use the built-in `($)_` variable to indicate the exception does not need to be saved. + +For more information about using the built-in `($)_` variable, please see [Discarding Output Properties][]. + +[Exception Property]: {{< ref "#exception" >}} +[discard]: {{< ref "#using-the-built-in-_-variable-to-discard-the-exception-from-being-saved" >}} + +[Handle Block Exception]: {{< url path="Cortex.Reference.Blocks.Exceptions.HandleBlock.HandleBlockException.MainDoc" >}} +[Handle Block Exception Matching Message]: {{< url path="Cortex.Reference.Blocks.Exceptions.HandleBlock.HandleBlockExceptionMatchingMessage.MainDoc" >}} +[Handle Block Exception Matching Messages]: {{< url path="Cortex.Reference.Blocks.Exceptions.HandleBlock.HandleBlockExceptionMatchingMessages.MainDoc" >}} +[Handle Block Exception Matching Type Name]: {{< url path="Cortex.Reference.Blocks.Exceptions.HandleBlock.HandleBlockExceptionMatchingTypeName.MainDoc" >}} +[Handle Block Exception Matching Type Names]: {{< url path="Cortex.Reference.Blocks.Exceptions.HandleBlock.HandleBlockExceptionMatchingTypeNames.MainDoc" >}} +[Discarding Output Properties]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.DiscardingOutputs" >}} +[Exception Handling]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Exceptions.HandlingExceptions.MainDoc" >}} +[Object Casting]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectCasting.MainDoc" >}} + +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[Exception]: {{< url path="Cortex.Reference.DataTypes.Exceptions.Exception.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-block-exception/handle-block-exception-matching-message-block.md b/content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-block-exception/handle-block-exception-matching-message-block.md new file mode 100644 index 000000000..042d52362 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-block-exception/handle-block-exception-matching-message-block.md @@ -0,0 +1,229 @@ +--- +title: "Handle Block Exception Matching Message" +linkTitle: "Handle Block Exception Matching Message" +description: "Handles any exception thrown by the block it is connected to that matches a specified message." +--- + +{{< figure src="/blocks/exceptions-handle-block-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Exceptions.HandleBlockException.HandleBlockExceptionMatchingMessageBlock)
+ +## Description + +Handles any [Exception][Exception Property] thrown by the block it is connected to that matches a specified [Message][Message Property]. + +## Examples + +### Handle Exception containing Message and save the Exception + +This example will handle any exception thrown by the block it is connected to that contains `"'List' is null"` in its `Message` property; saving the exception to a variable, so the flow execution can use it to make decisions or take further action. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of messages. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Message][Message Property] | `($)Message`, with value `"'List' is null"` | `($)Message` is a variable of type [String][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Exception][Exception Property] | `($)Exception`, with no value | `($)Exception` is a variable that will be set to a [dynamic][] value | + +#### Result + +The block will handle any exception containing `"'List' is null"` in its `Message` property and save the exception to the `($)Exception` variable for use later in the flow execution. + +E.g. + +If the List property of the Add Item At Beginning list block was set to null, it would throw a [PropertyNullException][] when executed. + +This exception's `Message` property would be `"'List' is null; it must be provided with a non-null value.\r\nPlease click the HelpLink for more information on how to fix this."`; therefore as we are checking for exceptions containing `"'List' is null"` in their `Message`, this exception would be handled and saved to the `($)Exception` variable. + +*** + +### Handle Exception containing Message and discard the Exception + +This example is the same as the example above, except it does not save the exception to a variable, as the flow execution does not need it to make decisions or take further action. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of messages. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Message][Message Property] | `($)Message`, with value `"'List' is null"` | `($)Message` is a variable of type [String][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Exception][Exception Property] | `($)_`, with no value | `($)_` is a built-in variable that indicates the flow execution does not need to save the exception, so it can be discarded | + +#### Result + +The block will handle any exception containing `"'List' is null"` in its `Message` property, but will not save the exception as the `($)_` variable indicates it is not needed and can be discarded. + +E.g. + +If the List property of the Add Item At Beginning list block was set to null, it would throw a [PropertyNullException][] when executed. + +This exception's `Message` property would be `"'List' is null; it must be provided with a non-null value.\r\nPlease click the HelpLink for more information on how to fix this."`; therefore as we are checking for exceptions containing `"'List' is null"` in their `Message`, this exception would be handled, but because the `($)_` variable is used it will not be saved to the `($)Exception` variable. + +For more infomation about using the built-in `($)_` variable, please see [Discarding Output Properties][]. + +*** + +### Exception does not contain Message + +This example will not handle an exception thrown by the block it is connected to that does not contain `"'List' is null"` in its `Message` property; the exception will be passed to the next exception handling block. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of messages. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Message][Message Property] | `($)Message`, with value `"'List' is null"` | `($)Message` is a variable of type [String][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Exception][Exception Property] | `($)Exception`, with no value | `($)Exception` is a variable that won't be set | + +#### Result + +The block will not handle any exception that does not contain `"'List' is null"` in its `Message` property; instead the exception will be passed to the next exception handling block. + +E.g. + +If the List property of the Add Item At Beginning list block was set to a read-only List, it would throw a [CannotModifyReadOnlyListException][] when executed. + +This exception's `Message` property would be `"'List' cannot be modified because it's read-only.\r\nPlease click the HelpLink for more information on how to fix this."`; therefore as we are checking for exceptions containing `"'List' is null"` in their `Message`, this exception would not be handled. + +*** + +## Properties + +### Message + +The [Message][Message Property] the [Exception's][Exception Property] `Message` property must contain for this block to handle the [Exception][Exception Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | `$@""` | + +### Comparison Type + +The [Comparison Type][ComparisonType Property] specifying the rules used to determine whether [Message][Message Property] is contained in the [Exception's][Exception Property] `Message` property. + +For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [StringComparison][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Literal][] | +| Default Value | `Ordinal` | + +### Exception + +The [Exception][Exception Property] if it is handled by the block. + +[Exception][Exception Property] can be any [Exception data type][Exception]. + +If the flow execution does not need the exception, it can be discarded by assigning the built-in `($)_` variable. + +For more infomation about using the built-in `($)_` variable, please see [Discarding Output Properties][]. + +| | | +|--------------------|---------------------------| +| Data Type | [dynamic][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)_` to [discard][] | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [ArgumentException][] | Thrown when [Comparison Type][ComparisonType Property] is not one of the specified [StringComparison][] types (e.g. `(StringComparison)10`). | + +## Remarks + +### Comparison Types + +For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. + +### Null or empty Message + +If [Message][Message Property] is `null` or empty (i.e. `""`), and the thrown exception's `Message` property is also `null` or empty (i.e. `""`), the exception will be handled and saved to the variable specified in the [Exception][Exception Property] property. + +### Chaining Exception handling blocks + +Blocks that handle block exceptions can be chained together so different exceptions can be handled separately. The blocks are listed below: + +* [Handle Block Exception Matching Message][] +* [Handle Block Exception Matching Messages][] +* [Handle Block Exception Matching Type Name][] +* [Handle Block Exception Matching Type Names][] +* [Handle Block Exception][] + +{{< figure src="/images/chaining-handle-block-exception-blocks.png" >}} + +Each block has an input port on its left-hand side and, with the exception of the [Handle Block Exception][] block, also have an output port on their right-hand side; this is so they can pass any exception they do not handle to the next block. + +As the [Handle Block Exception][] block handles any exception, it does not require the output port. + +For more information about chaining of exception handling blocks and passing of exceptions, please see [Exception Handling][]. + +### Why does the Exception property return a dynamic data type? + +The decision for the [Exception][Exception Property] to return a [dynamic data type][dynamic] rather than an [Exception data type][Exception], was to avoid users having to [cast][Object Casting] the exception to its correct type to be able to use all of its properties. + +As a result, any issues with using the [Exception data type][Exception] (i.e. trying to access a property it does not have) will not be reported as messages when trying to debug the flow; they will only be discovered when the flow execution reaches the part of the flow with the issue. + +If it is desirable to have any issues reported as messages when trying to debug the flow, the user can [cast][Object Casting] the exception to its correct type. + +### Using the built-in ($)_ variable to discard the Exception from being saved + +Sometimes when an exception occurs the flow execution wants to use the exception to make decisions or take further action. However, there are occasions when the exception is not needed, and being forced to create another variable to save the exception is extra work for no benefit. In these circumstances it is possible to use the built-in `($)_` variable to indicate the exception does not need to be saved. + +For more infomation about using the built-in `($)_` variable, please see [Discarding Output Properties][]. + +[Message Property]: {{< ref "#message" >}} +[ComparisonType Property]: {{< ref "#comparison-type" >}} +[Exception Property]: {{< ref "#exception" >}} +[discard]: {{< ref "#using-the-built-in-_-variable-to-discard-the-exception-from-being-saved" >}} + +[Handle Block Exception]: {{< url path="Cortex.Reference.Blocks.Exceptions.HandleBlock.HandleBlockException.MainDoc" >}} +[Handle Block Exception Matching Message]: {{< url path="Cortex.Reference.Blocks.Exceptions.HandleBlock.HandleBlockExceptionMatchingMessage.MainDoc" >}} +[Handle Block Exception Matching Messages]: {{< url path="Cortex.Reference.Blocks.Exceptions.HandleBlock.HandleBlockExceptionMatchingMessages.MainDoc" >}} +[Handle Block Exception Matching Type Name]: {{< url path="Cortex.Reference.Blocks.Exceptions.HandleBlock.HandleBlockExceptionMatchingTypeName.MainDoc" >}} +[Handle Block Exception Matching Type Names]: {{< url path="Cortex.Reference.Blocks.Exceptions.HandleBlock.HandleBlockExceptionMatchingTypeNames.MainDoc" >}} +[Discarding Output Properties]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.DiscardingOutputs" >}} +[Exception Handling]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Exceptions.HandlingExceptions.MainDoc" >}} +[Object Casting]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectCasting.MainDoc" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.MainDoc" >}} +[ComparisonTypes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.MainDoc" >}} +[Ordinal]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.Ordinal" >}} + +[ArgumentException]: {{< url path="MSDocs.DotNet.Api.System.ArgumentException" >}} +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[StringComparison]: {{< url path="Cortex.Reference.DataTypes.Text.StringComparison.MainDoc" >}} +[Exception]: {{< url path="Cortex.Reference.DataTypes.Exceptions.Exception.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-block-exception/handle-block-exception-matching-messages-block.md b/content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-block-exception/handle-block-exception-matching-messages-block.md new file mode 100644 index 000000000..ee0d90231 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-block-exception/handle-block-exception-matching-messages-block.md @@ -0,0 +1,233 @@ +--- +title: "Handle Block Exception Matching Messages" +linkTitle: "Handle Block Exception Matching Messages" +description: "Handles any exception thrown by the block it is connected to that matches any message in a given set of messages." +--- + +{{< figure src="/blocks/exceptions-handle-block-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Exceptions.HandleBlockException.HandleBlockExceptionMatchingMessagesBlock)
+ +## Description + +Handles any [Exception][Exception Property] thrown by the block it is connected to that matches any message in a given set of [Messages][Messages Property]. + +## Examples + +### Handle Exception containing any of the Messages and save the Exception + +This example will handle any exception thrown by the block it is connected to that contains any of the messages in `["'List' is null", "'List' is empty"]` in its `Message` property; saving the exception to a variable, so the flow execution can use it to make decisions or take further action. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of messages. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Messages][Messages Property] | `($)Messages`, with value `["'List' is null", "'List' is empty"]` | `($)Messages` is a variable of type [IEnumerable][]<[String][]> | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Exception][Exception Property] | `($)Exception`, with no value | `($)Exception` is a variable that will be set to a [dynamic][] value | + +#### Result + +The block will handle any exception containing any of the messages in `["'List' is null", "'List' is empty"]` in its `Message` property and save the exception to the `($)Exception` variable for use later in the flow execution. + +E.g. + +If the List property of the Add Item At Beginning list block was set to null, it would throw a [PropertyNullException][] when executed. + +This exception's `Message` property would be `"'List' is null; it must be provided with a non-null value.\r\nPlease click the HelpLink for more information on how to fix this."`; therefore as we are checking for exceptions containing any of `["'List' is null", "'List' is empty"]` in their `Message`, this exception would be handled and saved to the `($)Exception` variable. + +*** + +### Handle Exception containing any of the Messages and discard the Exception + +This example is the same as the example above, except it does not save the exception to a variable, as the flow execution does not need it to make decisions or take further action. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of messages. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Messages][Messages Property] | `($)Messages`, with value `["'List' is null", "'List' is empty"]` | `($)Messages` is a variable of type [IEnumerable][]<[String][]> | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Exception][Exception Property] | `($)_`, with no value | `($)_` is a built-in variable that indicates the flow execution does not need to save the exception, so it can be discarded | + +#### Result + +The block will handle any exception containing any of the messages in `["'List' is null", "'List' is empty"]` in its `Message` property, but will not save the exception as the `($)_` variable indicates it is not needed and can be discarded. + +E.g. + +If the List property of the Add Item At Beginning list block was set to null, it would throw a [PropertyNullException][] when executed. + +This exception's `Message` property would be `"'List' is null; it must be provided with a non-null value.\r\nPlease click the HelpLink for more information on how to fix this."`; therefore as we are checking for exceptions containing any of `["'List' is null", "'List' is empty"]` in their `Message`, this exception would be handled, but because the `($)_` variable is used it will not be saved to the `($)Exception` variable. + +For more infomation about using the built-in `($)_` variable, please see [Discarding Output Properties][]. + +*** + +### Exception does not contain any of the Messages + +This example will not handle an exception thrown by the block it is connected to that does not contain any of `["'List' is null", "'List' is empty"]` in its `Message` property; the exception will be passed to the next exception handling block. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of messages. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Messages][Messages Property] | `($)Messages`, with value `["'List' is null", "'List' is empty"]` | `($)Messages` is a variable of type [IEnumerable][]<[String][]> | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Exception][Exception Property] | `($)Exception`, with no value | `($)Exception` is a variable that won't be set | + +#### Result + +The block will not handle any exception that does not contain any of `["'List' is null", "'List' is empty"]` in its `Message` property; instead the exception will be passed to the next exception handling block. + +E.g. + +If the List property of the Add Item At Beginning list block was set to a read-only List, it would throw a [CannotModifyReadOnlyListException][] when executed. + +This exception's `Message` property would be `"'List' cannot be modified because it's read-only.\r\nPlease click the HelpLink for more information on how to fix this."`; therefore as we are checking for exceptions containing any of `["'List' is null", "'List' is empty"]` in their `Message`, this exception would not be handled. + +*** + +## Properties + +### Messages + +The [Messages][Messages Property] the [Exception's][Exception Property] `Message` property must contain any of for this block to handle the [Exception][Exception Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[String][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | `new List(Cortex.Blocks.Exceptions.HandleBlockException.HandleBlockExceptionMatchingTypeNameBlock)
+ +## Description + +Handles any [Exception][Exception Property] thrown by the block it is connected to that matches a specified [Type Name][TypeName Property]. + +## Examples + +### Handle Exception matching Type Name and save the Exception + +This example will handle any exception thrown by the block it is connected to that contains `"PropertyNull"` in its fully qualified `TypeName`; saving the exception to a variable, so the flow execution can use it to make decisions or take further action. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of type names. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Type Name][TypeName Property] | `($)TypeName`, with value `"PropertyNull"` | `($)TypeName` is a variable of type [String][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Exception][Exception Property] | `($)Exception`, with no value | `($)Exception` is a variable that will be set to a [dynamic][] value | + +#### Result + +The block will handle any exception containing `"PropertyNull"` in its fully qualified `TypeName` and save the exception to the `($)Exception` variable for use later in the flow execution. + +E.g. + +If the List property of the Add Item At Beginning list block was set to null, it would throw a [PropertyNullException][] when executed. + +This exception's fully qualified `TypeName` is `"Cortex.Exceptions.Common.Property.PropertyNullException"`; therefore as we are checking for exceptions containing `"PropertyNull"` in their `TypeName`, this exception would be handled and saved to the `($)Exception` variable. + +*** + +### Handle Exception matching Type Name and discard the Exception + +This example is the same as the example above, except it does not save the exception to a variable, as the flow execution does not need it to make decisions or take further action. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of type names. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Type Name][TypeName Property] | `($)TypeName`, with value `"PropertyNull"` | `($)TypeName` is a variable of type [String][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Exception][Exception Property] | `($)_`, with no value | `($)_` is a built-in variable that indicates the flow execution does not need to save the exception, so it can be discarded | + +#### Result + +The block will handle any exception containing `"PropertyNull"` in its fully qualified `TypeName`, but will not save the exception as the `($)_` variable indicates it is not needed and can be discarded. + +E.g. + +If the List property of the Add Item At Beginning list block was set to null, it would throw a [PropertyNullException][] when executed. + +This exception's fully qualified `TypeName` is `"Cortex.Exceptions.Common.Property.PropertyNullException"`; therefore as we are checking for exceptions containing `"PropertyNull"` in their `TypeName`, this exception would be handled, but because the `($)_` variable is used it will not be saved to the `($)Exception` variable. + +For more infomation about using the built-in `($)_` variable, please see [Discarding Output Properties][]. + +*** + +### Exception does not match Type Name + +This example will not handle an exception thrown by the block it is connected to that does not contain `"PropertyNull"` in its fully qualified `TypeName`; the exception will be passed to the next exception handling block. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of type names. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Type Name][TypeName Property] | `($)TypeName`, with value `"PropertyNull"` | `($)TypeName` is a variable of type [String][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Exception][Exception Property] | `($)Exception`, with no value | `($)Exception` is a variable that won't be set | + +#### Result + +The block will not handle any exception that does not contain `"PropertyNull"` in its fully qualified `TypeName`; instead the exception will be passed to the next exception handling block. + +E.g. + +If the List property of the Add Item At Beginning list block was set to a read-only List, it would throw a [CannotModifyReadOnlyListException][] when executed. + +This exception's fully qualified `TypeName` is `"Cortex.Exceptions.Lists.CannotModifyReadOnlyListException"`; therefore as we are checking for exceptions containing `"PropertyNull"` in their `TypeName`, this exception would not be handled. + +*** + +## Properties + +### Type Name + +The [Type Name][TypeName Property] the [Exception's][Exception Property] fully qualified `TypeName` must contain for this block to handle the [Exception][Exception Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | No value (defaults to `null`) | + +### Comparison Type + +The [Comparison Type][ComparisonType Property] specifying the rules used to determine whether [Type Name][TypeName Property] is contained in the [Exception's][Exception Property] fully qualified `TypeName`. + +For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [StringComparison][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Literal][] | +| Default Value | `Ordinal` | + +### Exception + +The [Exception][Exception Property] if it is handled by the block. + +[Exception][Exception Property] can be any [Exception data type][Exception]. + +If the flow execution does not need the exception, it can be discarded by assigning the built-in `($)_` variable. + +For more infomation about using the built-in `($)_` variable, please see [Discarding Output Properties][]. + +| | | +|--------------------|---------------------------| +| Data Type | [dynamic][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)_` to [discard][] | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [ArgumentException][] | Thrown when [Comparison Type][ComparisonType Property] is not one of the specified [StringComparison][] types (e.g. `(StringComparison)10`). | +| [PropertyEmptyException][] | Thrown when [Type Name][TypeName Property] is empty (i.e. `""`). | +| [PropertyNullException][] | Thrown when [Type Name][TypeName Property] is `null`. | + +## Remarks + +### Comparison Types + +For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. + +### Chaining Exception handling blocks + +Blocks that handle block exceptions can be chained together so different exceptions can be handled separately. The blocks are listed below: + +* [Handle Block Exception Matching Message][] +* [Handle Block Exception Matching Messages][] +* [Handle Block Exception Matching Type Name][] +* [Handle Block Exception Matching Type Names][] +* [Handle Block Exception][] + +{{< figure src="/images/chaining-handle-block-exception-blocks.png" >}} + +Each block has an input port on its left-hand side and, with the exception of the [Handle Block Exception][] block, also have an output port on their right-hand side; this is so they can pass any exception they do not handle to the next block. + +As the [Handle Block Exception][] block handles any exception, it does not require the output port. + +For more information about chaining of exception handling blocks and passing of exceptions, please see [Exception Handling][]. + +### Why does the Exception property return a dynamic data type? + +The decision for the [Exception][Exception Property] to return a [dynamic data type][dynamic] rather than an [Exception data type][Exception], was to avoid users having to [cast][Object Casting] the exception to its correct type to be able to use all of its properties. + +As a result, any issues with using the [Exception data type][Exception] (i.e. trying to access a property it does not have) will not be reported as messages when trying to debug the flow; they will only be discovered when the flow execution reaches the part of the flow with the issue. + +If it is desirable to have any issues reported as messages when trying to debug the flow, the user can [cast][Object Casting] the exception to its correct type. + +### Using the built-in ($)_ variable to discard the Exception from being saved + +Sometimes when an exception occurs the flow execution wants to use the exception to make decisions or take further action. However, there are occasions when the exception is not needed, and being forced to create another variable to save the exception is extra work for no benefit. In these circumstances it is possible to use the built-in `($)_` variable to indicate the exception does not need to be saved. + +For more infomation about using the built-in `($)_` variable, please see [Discarding Output Properties][]. + +[TypeName Property]: {{< ref "#type-name" >}} +[ComparisonType Property]: {{< ref "#comparison-type" >}} +[Exception Property]: {{< ref "#exception" >}} +[discard]: {{< ref "#using-the-built-in-_-variable-to-discard-the-exception-from-being-saved" >}} + +[Handle Block Exception]: {{< url path="Cortex.Reference.Blocks.Exceptions.HandleBlock.HandleBlockException.MainDoc" >}} +[Handle Block Exception Matching Message]: {{< url path="Cortex.Reference.Blocks.Exceptions.HandleBlock.HandleBlockExceptionMatchingMessage.MainDoc" >}} +[Handle Block Exception Matching Messages]: {{< url path="Cortex.Reference.Blocks.Exceptions.HandleBlock.HandleBlockExceptionMatchingMessages.MainDoc" >}} +[Handle Block Exception Matching Type Name]: {{< url path="Cortex.Reference.Blocks.Exceptions.HandleBlock.HandleBlockExceptionMatchingTypeName.MainDoc" >}} +[Handle Block Exception Matching Type Names]: {{< url path="Cortex.Reference.Blocks.Exceptions.HandleBlock.HandleBlockExceptionMatchingTypeNames.MainDoc" >}} +[Discarding Output Properties]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.DiscardingOutputs" >}} +[Exception Handling]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Exceptions.HandlingExceptions.MainDoc" >}} +[Object Casting]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectCasting.MainDoc" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.MainDoc" >}} +[ComparisonTypes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.MainDoc" >}} +[Ordinal]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.Ordinal" >}} + +[ArgumentException]: {{< url path="MSDocs.DotNet.Api.System.ArgumentException" >}} +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[StringComparison]: {{< url path="Cortex.Reference.DataTypes.Text.StringComparison.MainDoc" >}} +[Exception]: {{< url path="Cortex.Reference.DataTypes.Exceptions.Exception.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-block-exception/handle-block-exception-matching-type-names-block.md b/content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-block-exception/handle-block-exception-matching-type-names-block.md new file mode 100644 index 000000000..bbdd7f642 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-block-exception/handle-block-exception-matching-type-names-block.md @@ -0,0 +1,232 @@ +--- +title: "Handle Block Exception Matching Type Names" +linkTitle: "Handle Block Exception Matching Type Names" +description: "Handles any exception thrown by the block it is connected to that matches any type name in a given set of type names." +--- + +{{< figure src="/blocks/exceptions-handle-block-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Exceptions.HandleBlockException.HandleBlockExceptionMatchingTypeNamesBlock)
+ +## Description + +Handles any [Exception][Exception Property] thrown by the block it is connected to that matches any type name in a given set of [Type Names][TypeNames Property]. + +## Examples + +### Handle Exception matching any of the Type Names and save the Exception + +This example will handle any exception thrown by the block it is connected to that contains any of the type names in `["PropertyNull", "PropertyEmpty"]` in its fully qualified `TypeName`; saving the exception to a variable, so the flow execution can use it to make decisions or take further action. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of messages. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Type Names][TypeNames Property] | `($)TypeNames`, with value `["PropertyNull", "PropertyEmpty"]` | `($)TypeNames` is a variable of type [IEnumerable][]<[String][]> | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Exception][Exception Property] | `($)Exception`, with no value | `($)Exception` is a variable that will be set to a [dynamic][] value | + +#### Result + +The block will handle any exception containing any of the type names in `["PropertyNull", "PropertyEmpty"]` in its fully qualified `TypeName` and save the exception to the `($)Exception` variable for use later in the flow execution. + +E.g. + +If the List property of the Add Item At Beginning list block was set to null, it would throw a [PropertyNullException][] when executed. + +This exception's fully qualified `TypeName` is `"Cortex.Exceptions.Common.Property.PropertyNullException"`; therefore as we are checking for exceptions containing any of `["PropertyNull", "PropertyEmpty"]` in their `TypeName`, this exception would be handled and saved to the `($)Exception` variable. + +*** + +### Handle Exception containing any of the Type Names and discard the Exception + +This example is the same as the example above, except it does not save the exception to a variable, as the flow execution does not need it to make decisions or take further action. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of messages. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Type Names][TypeNames Property] | `($)TypeNames`, with value `["PropertyNull", "PropertyEmpty"]` | `($)TypeNames` is a variable of type [IEnumerable][]<[String][]> | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Exception][Exception Property] | `($)_`, with no value | `($)_` is a built-in variable that indicates the flow execution does not need to save the exception, so it can be discarded | + +#### Result + +The block will handle any exception containing any of the type names in `["PropertyNull", "PropertyEmpty"]` in its fully qualified `TypeName`, but will not save the exception as the `($)_` variable indicates it is not needed and can be discarded. + +E.g. + +If the List property of the Add Item At Beginning list block was set to null, it would throw a [PropertyNullException][] when executed. + +This exception's fully qualified `TypeName` is `"Cortex.Exceptions.Common.Property.PropertyNullException"`; therefore as we are checking for exceptions containing any of `["PropertyNull", "PropertyEmpty"]` in their `TypeName`, this exception would be handled, but because the `($)_` variable is used it will not be saved to the `($)Exception` variable. + +For more infomation about using the built-in `($)_` variable, please see [Discarding Output Properties][]. + +*** + +### Exception does not contain any of the Type Names + +This example will not handle an exception thrown by the block it is connected to that does not contain any of `["PropertyNull", "PropertyEmpty"]` in its fully qualified `TypeName`; the exception will be passed to the next exception handling block. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of messages. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Type Names][TypeNames Property] | `($)TypeNames`, with value `["PropertyNull", "PropertyEmpty"]` | `($)TypeNames` is a variable of type [IEnumerable][]<[String][]> | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Exception][Exception Property] | `($)Exception`, with no value | `($)Exception` is a variable that won't be set | + +#### Result + +The block will not handle any exception that does not contain any of `["PropertyNull", "PropertyEmpty"]` in its fully qualified `TypeName`; instead the exception will be passed to the next exception handling block. + +E.g. + +If the List property of the Add Item At Beginning list block was set to a read-only List, it would throw a [CannotModifyReadOnlyListException][] when executed. + +This exception's fully qualified `TypeName` is `"Cortex.Exceptions.Lists.CannotModifyReadOnlyListException"`; therefore as we are checking for exceptions containing any of `["PropertyNull", "PropertyEmpty"]` in their `TypeName`, this exception would not be handled. + +*** + +## Properties + +### Type Names + +The [Type Names][TypeNames Property] the [Exception's][Exception Property] fully qualified `TypeName` must contain any of for this block to handle the [Exception][Exception Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[String][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | `new List(Cortex.Blocks.Exceptions.HandleFlowException.HandleFlowExceptionWorkspaceBlock)
+ +## Description + +Handles any unhandled [Exception][Exception Property] within the Flow. + +For more information, please see [Unhandled Exceptions][]. + +## Examples + +### Handle and save the Exception + +This example will handle any unhandled exception within the Flow; saving the exception to a variable, so the flow execution can use it to make decisions or take further action. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Exception][Exception Property] | `($)Exception`, with no value | `($)Exception` is a variable that will be set to a [dynamic][] value | + +#### Result + +The block will handle any unhandled exception within the Flow and save the exception to the `($)Exception` variable for use later in the flow execution. + +*** + +### Handle and discard the Exception from being saved + +This example will handle any unhandled exception within the Flow; not saving the exception to a variable, as the flow execution does not need it to make decisions or take further action. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Exception][Exception Property] | `($)_`, with no value | `($)_` is a built-in variable that indicates the flow execution does not need to save the exception, so it can be discarded | + +#### Result + +The block will handle any unhandled exception within the Flow, but will not save the exception as the `($)_` variable indicates it is not needed and can be discarded. + +For more infomation about using the built-in `($)_` variable, please see [Discarding Output Properties][]. + +*** + +## Properties + +### Exception + +The [Exception][Exception Property] that is handled. + +[Exception][Exception Property] can be any [Exception data type][Exception]. + +By default, this property is assigned the built-in `($)_` variable, so the exception will be discarded. If the flow execution does need the exception, a variable can be assigned to save it in. + +For more infomation about using the built-in `($)_` variable, please see [Discarding Output Properties][]. + +| | | +|--------------------|---------------------------| +| Data Type | [dynamic][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)_` to [discard][] | + +## Exceptions + +No exceptions are thrown by the block. + +## Remarks + +### Block Restrictions + +The following restrictions apply to this block: + +* A flow cannot contain more than one [Handle Flow Exception][] block. +* The [Handle Flow Exception][] block is not available on any palette. +* The [Handle Flow Exception][] block cannot be copied. +* The [Handle Flow Exception][] block cannot be deleted. + +### Unhandled Exceptions + +If an exception thrown by a block is not handled by any connected [Handle Block Exception blocks][], it will be passed to the [Handle Workspace Exception][] block on the same workspace. + +If the workspace does not contain a [Handle Workspace Exception][] block it will be rethrown by the Workspace block the workspace belongs to. + +This process repeats until: + +* The exception is handled, or +* The exception reaches the flow's top-level workspace, is not handled by any [Handle Block Exception blocks][] and the top-level workspace does not contain a [Handle Workspace Exception][] block. At this stage, the exception is handled by the flow's [Handle Flow Exception][] block. + +If an exception occurs within the workspace of the [Handle Flow Exception][] block and is not handled, the flow will end with a status of Error. + +{{< figure src="/images/flow-error-status.png" >}} + +For more information about chaining of exception handling blocks and passing of exceptions, please see [Exception Handling][]. + +### Why does the Exception property return a dynamic data type? + +The decision for the [Exception][Exception Property] to return a [dynamic data type][dynamic] rather than an [Exception data type][Exception], was to avoid users having to [cast][Object Casting] the exception to its correct type to be able to use all of its properties. + +As a result, any issues with using the [Exception data type][Exception] (i.e. trying to access a property it does not have) will not be reported as messages when trying to debug the flow; they will only be discovered when the flow execution reaches the part of the flow with the issue. + +If it is desirable to have any issues reported as messages when trying to debug the flow, the user can [cast][Object Casting] the exception to its correct type. + +### Using the built-in ($)_ variable to discard the Exception from being saved + +Sometimes when an exception occurs the flow execution wants to use the exception to make decisions or take further action. However, there are occasions when the exception is not needed, and being forced to create another variable to save the exception is extra work for no benefit. In these circumstances it is possible to use the built-in `($)_` variable to indicate the exception does not need to be saved. + +For more infomation about using the built-in `($)_` variable, please see [Discarding Output Properties][]. + +[Exception Property]: {{< ref "#exception" >}} +[discard]: {{< ref "#using-the-built-in-_-variable-to-discard-the-exception-from-being-saved" >}} + +[Unhandled Exceptions]: {{< ref "#unhandled-exceptions" >}} + +[Exception Handling]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Exceptions.HandlingExceptions.MainDoc" >}} +[Object Casting]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectCasting.MainDoc" >}} +[Discarding Output Properties]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.DiscardingOutputs" >}} + +[Handle Block Exception blocks]: {{< url path="Cortex.Reference.Blocks.Exceptions.HandleBlock.MainDoc" >}} +[Handle Flow Exception]: {{< url path="Cortex.Reference.Blocks.Exceptions.HandleFlow.HandleFlowException.MainDoc" >}} +[Handle Workspace Exception]: {{< url path="Cortex.Reference.Blocks.Exceptions.HandleWorkspace.HandleWorkspaceException.MainDoc" >}} + +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[Exception]: {{< url path="Cortex.Reference.DataTypes.Exceptions.Exception.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-workspace-exception/_index.md b/content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-workspace-exception/_index.md new file mode 100644 index 000000000..bfe98fb7b --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-workspace-exception/_index.md @@ -0,0 +1,5 @@ +--- +title: "Handle Workspace Exception(s)" +linkTitle: "Handle Workspace Exception(s)" +description: "Handle exceptions not handled by any Handle Block Exception blocks." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-workspace-exception/handle-workspace-exception-block.md b/content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-workspace-exception/handle-workspace-exception-block.md new file mode 100644 index 000000000..b36045815 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Exceptions/handle-workspace-exception/handle-workspace-exception-block.md @@ -0,0 +1,144 @@ +--- +title: "Handle Workspace Exception" +linkTitle: "Handle Workspace Exception" +description: "Handles any unhandled exception within its workspace." +--- + +{{< figure src="/blocks/exceptions-handle-workspace-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Exceptions.HandleWorkspaceException.HandleWorkspaceExceptionBlock)
+ +## Description + +Handles any unhandled [Exception][Exception Property] within its workspace. + +For more information, please see [Unhandled Exceptions][]. + +## Examples + +### Handle and save the Exception + +This example will handle any unhandled exception within the block's workspace; saving the exception to a variable, so the flow execution can use it to make decisions or take further action. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Exception][Exception Property] | `($)Exception`, with no value | `($)Exception` is a variable that will be set to a [dynamic][] value | + +#### Result + +The block will handle any unhandled exception within the block's workspace and save the exception to the `($)Exception` variable for use later in the flow execution. + +*** + +### Handle and discard the Exception from being saved + +This example will handle any unhandled exception within the block's workspace; not saving the exception to a variable, as the flow execution does not need it to make decisions or take further action. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Exception][Exception Property] | `($)_`, with no value | `($)_` is a built-in variable that indicates the flow execution does not need to save the exception, so it can be discarded | + +#### Result + +The block will handle any unhandled exception within the block's workspace, but will not save the exception as the `($)_` variable indicates it is not needed and can be discarded. + +For more infomation about using the built-in `($)_` variable, please see [Discarding Output Properties][]. + +*** + +## Properties + +### Exception + +The [Exception][Exception Property] that is handled. + +[Exception][Exception Property] can be any [Exception data type][Exception]. + +If the flow execution does not need the exception, it can be discarded by assigning the built-in `($)_` variable. + +For more infomation about using the built-in `($)_` variable, please see [Discarding Output Properties][]. + +| | | +|--------------------|---------------------------| +| Data Type | [dynamic][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)_` to [discard][] | + + +## Exceptions + +No exceptions are thrown by the block. + +## Remarks + +### Block Restrictions + +The following restrictions apply to this block: + +* A workspace cannot contain more than one [Handle Workspace Exception][] block. If more than one is added, it will be reported as a message when trying to debug the flow. +* The [Handle Workspace Exception][] block will only handle the first unhandled exception within its workspace. This is to prevent infinite recursion within the flow. Subsequent unhandled exceptions are passed to the next relevant exception handling block. For more information about chaining of exception handling blocks and passing of exceptions, please see [Exception Handling][]. +* A flow's Top-Level Workspace cannot contain a [Handle Workspace Exception][] block. If one is added, it will be reported as a message when trying to debug the flow. + +### Unhandled Exceptions + +If an exception thrown by a block is not handled by any connected [Handle Block Exception blocks][], it will be passed to the [Handle Workspace Exception][] block on the same workspace. + +If the workspace does not contain a [Handle Workspace Exception][] block it will be rethrown by the [Workspace][] block the workspace belongs to. + +This process repeats until: + +* The exception is handled, or +* The exception reaches the flow's top-level workspace, is not handled by any [Handle Block Exception blocks][] and the top-level workspace does not contain a [Handle Workspace Exception][] block. At this stage, the exception is handled by the flow's [Handle Flow Exception][] block. + +If an exception occurs within the workspace of the [Handle Flow Exception][] block and is not handled, the flow will end with a status of Error. + +{{< figure src="/images/flow-error-status.png" >}} + +For more information about chaining of exception handling blocks and passing of exceptions, please see [Exception Handling][]. + +### Why does the Exception property return a dynamic data type? + +The decision for the [Exception][Exception Property] to return a [dynamic data type][dynamic] rather than an [Exception data type][Exception], was to avoid users having to [cast][Object Casting] the exception to its correct type to be able to use all of its properties. + +As a result, any issues with using the [Exception data type][Exception] (i.e. trying to access a property it does not have) will not be reported as messages when trying to debug the flow; they will only be discovered when the flow execution reaches the part of the flow with the issue. + +If it is desirable to have any issues reported as messages when trying to debug the flow, the user can [cast][Object Casting] the exception to its correct type. + +### Using the built-in ($)_ variable to discard the Exception from being saved + +Sometimes when an exception occurs the flow execution wants to use the exception to make decisions or take further action. However, there are occasions when the exception is not needed, and being forced to create another variable to save the exception is extra work for no benefit. In these circumstances it is possible to use the built-in `($)_` variable to indicate the exception does not need to be saved. + +For more infomation about using the built-in `($)_` variable, please see [Discarding Output Properties][]. + +[Exception Property]: {{< ref "#exception" >}} +[discard]: {{< ref "#using-the-built-in-_-variable-to-discard-the-exception-from-being-saved" >}} + +[Unhandled Exceptions]: {{< ref "#unhandled-exceptions" >}} + +[Exception Handling]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Exceptions.HandlingExceptions.MainDoc" >}} +[Object Casting]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectCasting.MainDoc" >}} +[Discarding Output Properties]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.DiscardingOutputs" >}} + +[Handle Block Exception blocks]: {{< url path="Cortex.Reference.Blocks.Exceptions.HandleBlock.MainDoc" >}} +[Handle Flow Exception]: {{< url path="Cortex.Reference.Blocks.Exceptions.HandleFlow.HandleFlowException.MainDoc" >}} +[Handle Workspace Exception]: {{< url path="Cortex.Reference.Blocks.Exceptions.HandleWorkspace.HandleWorkspaceException.MainDoc" >}} +[Workspace]: {{< url path="Cortex.Reference.Blocks.Workspaces.Workspace.Workspace.MainDoc" >}} + +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[Exception]: {{< url path="Cortex.Reference.DataTypes.Exceptions.Exception.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Exceptions/rethrow-exception/_index.md b/content/en/docs/2023.9/Reference/Blocks/Exceptions/rethrow-exception/_index.md new file mode 100644 index 000000000..2867ac09a --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Exceptions/rethrow-exception/_index.md @@ -0,0 +1,5 @@ +--- +title: "Rethrow Exception" +linkTitle: "Rethrow Exception" +description: "Rethrow a previously thrown and handled exception." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Exceptions/rethrow-exception/rethrow-exception-block.md b/content/en/docs/2023.9/Reference/Blocks/Exceptions/rethrow-exception/rethrow-exception-block.md new file mode 100644 index 000000000..ce29e032c --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Exceptions/rethrow-exception/rethrow-exception-block.md @@ -0,0 +1,89 @@ +--- +title: "Rethrow Exception" +linkTitle: "Rethrow Exception" +description: "Rethrows an Exception which has previously been thrown and handled." +--- + +{{< figure src="/blocks/exceptions-rethrow-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Exceptions.RethrowException.RethrowExceptionBlock)
+ +## Description + +Rethrows an [Exception][Exception Property] which has previously been thrown and handled. + +## Examples + +### Rethrowing an Exception + +This example will rethrow the following handled [Exception][] thrown by an [Add Item At Beginning][] block: + +{{< figure src="/images/rethrow-original-list-exception.png" >}} + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Exception][Exception Property] | `($)Exception`, with value of`{"Exception Type": "PropertyNullException","Message": "'List' is null; it must be provided with a non-null value.\r\nPlease click the HelpLink for more information on how to fix this.","HelpLink": "https://docs.wearecortex.com/docs/2023.5/reference/exceptions/common/property/property-null-exception/"}` | `($)Exception` is a variable of type [PropertyNullException][] | + +#### Result + +Rethrowing `($)Exception` results in the [Exception][Exception Property] being rethrown and shown in the [Exceptions Viewer][]: + +{{< figure src="/images/rethrow-from-list-exception.png" >}} + +*** + +## Properties + +### Exception + +The [Exception][Exception Property] that is rethrown. + +[Exception][Exception Property] can be any [Exception data type][Exception]. + +| | | +|--------------------|---------------------------| +| Data Type | [Exception][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Exception` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyNullException][] | Thrown when [Exception][Exception Property] is `null`. | + +## Remarks + +### Propagating Exceptions + +Sometimes it is necessary to propagate exceptions thrown in a child flow to the flow that called it. Currently, using the [Rethrow Exception][] block to rethrow the [Exception][] from the [Handle Flow Exception][] workspace is the only way to achieve this. This can be seen below: + +{{< figure src="/images/rethrow-from-subflow.gif" >}} + +In future, additional ways to propagate exceptions between flows may be added. + +[Exception Property]: {{< ref "#exception" >}} + +[Rethrow Exception]: {{< url path="Cortex.Reference.Blocks.Exceptions.RethrowException.RethrowException.MainDoc" >}} +[Handle Flow Exception]: {{< url path="Cortex.Reference.Blocks.Exceptions.HandleFlow.HandleFlowException.MainDoc" >}} +[Add Item At Beginning]: {{< url path="Cortex.Reference.Blocks.Lists.AddItem.AddItemAtBeginning.MainDoc" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[Exception]: {{< url path="Cortex.Reference.DataTypes.Exceptions.Exception.MainDoc" >}} + +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} + +[Exceptions Viewer]: {{< url path="Cortex.Guides.Studio.EastPanel.ExceptionsViewer">}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} \ No newline at end of file diff --git a/content/en/docs/2023.9/Reference/Blocks/Exceptions/throw-exception/_index.md b/content/en/docs/2023.9/Reference/Blocks/Exceptions/throw-exception/_index.md new file mode 100644 index 000000000..6825cb935 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Exceptions/throw-exception/_index.md @@ -0,0 +1,5 @@ +--- +title: "Throw Exception" +linkTitle: "Throw Exception" +description: "Throw an exception." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Exceptions/throw-exception/throw-new-flow-exception-block.md b/content/en/docs/2023.9/Reference/Blocks/Exceptions/throw-exception/throw-new-flow-exception-block.md new file mode 100644 index 000000000..f0d41a4a9 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Exceptions/throw-exception/throw-new-flow-exception-block.md @@ -0,0 +1,185 @@ +--- +title: "Throw New Flow Exception" +linkTitle: "Throw New Flow Exception" +description: "Throws a new FlowException with the specified message, category, error code, details, inner exception and help link." +--- + +{{< figure src="/blocks/exceptions-throw-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Exceptions.ThrowException.ThrowNewFlowExceptionBlock)
+ +## Description + +Throws a new [FlowException][] with the specified [Message][Message Property], [Category][Category Property], [Error Code][ErrorCode Property], [Details][Details Property], [Inner Exception][InnerException Property] and [Help Link][HelpLink Property]. + +All properties are optional, and if not supplied will be set to the following default values: + +| Property | Default Value | +|--------------------|-----------------------------------| +| [Message][Message Property] | `"Exception of type 'Cortex.Exceptions.Flows.FlowException' was thrown."` | +| [Category][Category Property] | `null` | +| [Error Code][ErrorCode Property] | `null` | +| [Details][Details Property] | `null`| +| [InnerException][InnerException Property] | `null` | +| [HelpLink][HelpLink Property] | `https://docs.wearecortex.com/docs/2023.5/reference/exceptions/flows/flow-exception/` | + +## Examples + +### Throw new FlowException with full configuration + +This example will throw a new [FlowException][] with all properties configured. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Message][Message Property] | `($)Message`, with value `"Custom Message"` | `($)Message` is a variable of type [String][] | +| [Category][Category Property] | `($)Category`, with value `"Custom Category"` | `($)Category` is a variable of type [String][] | +| [Error Code][ErrorCode Property] | `($)ErrorCode`, with value `100` | `($)ErrorCode` is a variable of type [Nullable][]<[Int32][]> | +| [Details][Details Property] | `($)Details`, with value `{"DetailsKey1" : "DetailsValue1", "DetailsKey2" : "DetailsValue2"}` | `($)Details` is a variable of type [IDictionary][]<[String][], [String][]> | +| [InnerException][InnerException Property] | `($)InnerException`, with value `($)Exception` containing another [FlowException][] with default properties | `($)InnerException` is a variable of type [FlowException][] | +| [HelpLink][HelpLink Property] | `($)HelpLink`, with value `"http://customdomain.com/customurl"` | `($)HelpLink` is a variable of type [String][] | + +#### Result + +Throwing a new [FlowException][] with properties configured as above will result in the following exception: + +{{< figure src="/images/flow-exception-full-configuration.png" >}} + +*** + +### Throw new FlowException with no configuration + +This example will throw a new [FlowException][] with no configuration. + +#### Properties + +No properties are configured for this example. + +#### Result + +Throwing a new [FlowException][] without configuring any of the block's properties will result in the following exception: + +{{< figure src="/images/flow-exception-no-configuration.png" >}} + +*** + +## Properties + +### Message + +A [Message][Message Property] describing the exception that occurred. + +If [Message][Message Property] is not provided or is set to `null`, it will default to `"Exception of type 'Cortex.Exceptions.Flows.FlowException' was thrown."`. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | `$@""` | + +### Category + +A [Category][Category Property] that can be used to categorise similar types of exception that has occurred (e.g. an `AuthenticationError` category may be set for exceptions relating to authentication issues). This can then be used for future decision making in the flow, or to assist in troubleshooting and reporting. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Error Code + +An [Error Code][ErrorCode Property] that can be used to uniquely identify the type of exception (e.g. There may be multiple exceptions with the same `AuthenticationError` category set, such as `InvalidCredentials`, `TokenExpired`. In this case each exception can be assigned its own unique [Error Code][ErrorCode Property]; `InvalidCredentials` = `100` and `TokenExpired` = `101`). This can then be used for future decision making in the flow, or to assist in troubleshooting and reporting. + +If [Error Code][ErrorCode Property] is not provided, it will default to `null`. + +| | | +|--------------------|---------------------------| +| Data Type | [Nullable][]<[Int32][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Details + +[Details][Details Property] can be used to provide more detailed information about the exception. It can be any type of [Object][]. This can then be used for future decision making in the flow, or to assist in troubleshooting and reporting. + +| | | +|--------------------|---------------------------| +| Data Type | [dynamic][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Inner Exception + +[Inner Exception][InnerException Property] can be used to include another [exception][] within the thrown exception (e.g. If the [FlowException][] has been thrown as a result of handling another [exception][], then the handled [exception][] can be included within the [FlowException][] to add traceability). + +| | | +|--------------------|---------------------------| +| Data Type | [Exception][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Help Link + +A [Help Link][HelpLink Property] can be specified where further information can be found about the exception being thrown. + +If [Help Link][HelpLink Property] is not provided or is set to `null`, it will default to a link to the [FlowException][] page; please note this page will not provide any guidance on how to fix the solution specific [exception][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +No exceptions are thrown by the block. + +## Remarks + +### Null Message + +If [Message][Message Property] is not provided or is set to `null`, it will default to `"Exception of type 'Cortex.Exceptions.Flows.FlowException' was thrown."`. + +### Null Help Link + +If [Help Link][HelpLink Property] is not provided or is set to `null`, it will default to a link to the [FlowException][] page, please note this page will not provide any guidance on how to fix the solution specific [exception][]. + +[Message Property]: {{< ref "#message" >}} +[Category Property]: {{< ref "#category" >}} +[ErrorCode Property]: {{< ref "#error-code" >}} +[Details Property]: {{< ref "#details" >}} +[InnerException Property]: {{< ref "#inner-exception" >}} +[HelpLink Property]: {{< ref "#help-link" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[Object]: {{< url path="Cortex.Reference.DataTypes.All.Object.MainDoc" >}} +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[Exception]: {{< url path="Cortex.Reference.DataTypes.Exceptions.Exception.MainDoc" >}} +[FlowException]: {{< url path="Cortex.Reference.Exceptions.Flows.FlowException.MainDoc" >}} +[Nullable]: {{< url path="Cortex.Reference.DataTypes.Other.Nullable.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/_index.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/_index.md new file mode 100644 index 000000000..f42a0941a --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/_index.md @@ -0,0 +1,5 @@ +--- +title: "Files & Folders" +linkTitle: "Files & Folders" +description: "Blocks related to working with Files and Folders." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/check-file/_index.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/check-file/_index.md new file mode 100644 index 000000000..e5fb6edbb --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/check-file/_index.md @@ -0,0 +1,5 @@ +--- +title: "Check File Exists" +linkTitle: "Check File Exists" +description: "Check if a file exists." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/check-file/check-file-exists-block.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/check-file/check-file-exists-block.md new file mode 100644 index 000000000..4941c1b87 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/check-file/check-file-exists-block.md @@ -0,0 +1,159 @@ +--- +title: "Check File Exists" +linkTitle: "Check File Exists" +description: "Checks if a file exists at the specified file path." +--- + +{{< figure src="/blocks/files-check-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.FilesAndFolders.CheckFile.CheckFileExistsBlock)
+ +## Description + +Checks if a [File Exists][FileExists Property] at the specified [File Path][FilePath Property]. + +## Examples + +### File exists at the specified File Path + +This example will check if `"C:\Windows\System32\cmd.exe"` exists on the Windows server executing the flow. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [File Path][FilePath Property] | `($)FilePath`, with value `@"C:\Windows\System32\cmd.exe"` | `($)FilePath` is a variable of type [String][] | +| [File Exists][FileExists Property] | `($)FileExists`, with no value | `($)FileExists` is a variable that will be set to a [Boolean][] value | + +#### Result + +`"C:\Windows\System32\cmd.exe"` is the command prompt application on Windows machines. Checking this on the Windows server executing the flow will result in the variable `($)FileExists` being updated to the following: + +```json +true +``` + +*** + +### File does not exist at the specified File Path + +This example will check if `"/etc/passwd"` exists on the Windows server executing the flow. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [File Path][FilePath Property] | `($)FilePath`, with value `"/etc/passwd"` | `($)FilePath` is a variable of type [String][] | +| [File Exists][FileExists Property] | `($)FileExists`, with no value | `($)FileExists` is a variable that will be set to a [Boolean][] value | + +#### Result + +`"/etc/passwd"` is a file that exists on Linux machines containing the list of system accounts. Checking this on the Windows server executing the flow will result in the variable `($)FileExists` being updated to the following: + +```json +false +``` + +*** + +## Properties + +### File Path + +The [File Path][FilePath Property] to check a file exists at. + +The [File Path][FilePath Property] is case-insensitive, and any trailing spaces will be automatically removed. + +For information about the supported file path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FilePath` with no value | + +### File Exists + +The result of the file exists check. + +If the file exists at the specified [File Path][FilePath Property], the specified variable will be set to `true`, otherwise it will be set to `false`. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FileExists` with no value | + +## Exceptions + +No exceptions are thrown by the block. + +## Remarks + +### File Paths + +For information about the supported file path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +### File Path needs escaping + +[File Path][FilePath Property] requires `\` characters to be escaped, otherwise each unescaped `\` will be reported as an `Invalid property value` message when trying to debug the flow. + +Escaping can be done in two ways: + +* Escaping the `\` character with another `\` character (e.g. `"C:\\Windows\\System32\\cmd.exe"`), or +* Prepending an `@` character before the start of the [File Path][FilePath Property] (e.g. `@"C:\Windows\System32\cmd.exe"`) + +### Null File Path + +If [File Path][FilePath Property] is `null` the variable specified in the [File Exists][FileExists Property] property will be set to `false`. + +### Empty File Path + +If [File Path][FilePath Property] is empty (i.e. `""`) the variable specified in the [File Exists][FileExists Property] property will be set to `false`. + +### Invalid File Path + +If [File Path][FilePath Property] is invalid (i.e. contains any of the following characters: `"`, `*`, `?`, `|`, `<`, `>`, `:`, `\`, `/`) the variable specified in the [File Exists][FileExists Property] property will be set to `false`. + +### File Path points to a folder + +If [File Path][FilePath Property] points to a folder, the variable specified in the [File Exists][FileExists Property] property will be set to `false`. + +To check if a folder exists, use the [Check Folder Exists block][]. + +### File Path contains leading spaces + +If [File Path][FilePath Property] contains leading spaces they are not removed; however, trailing spaces are removed. + +### Error occurs whilst checking if the file exists + +If any error occurs whilst checking if a file exists at the specified [File Path][FilePath Property], the variable specified in the [File Exists][FileExists Property] property will be set to `false`. + +### User does not have necessary permissions to check if the file exists + +If the user the flow is executing as does not have permissions to check if a file exists at the specified [File Path][FilePath Property], the variable specified in the [File Exists][FileExists Property] property will be set to `false`. + +[FilePath Property]: {{< ref "#file-path" >}} +[FileExists Property]: {{< ref "#file-exists" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[File & Folder Paths]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Paths.MainDoc" >}} + +[Check Folder Exists block]: {{< url path="Cortex.Reference.Blocks.FilesAndFolders.CheckFolder.CheckFolderExists.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/check-folder/_index.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/check-folder/_index.md new file mode 100644 index 000000000..4ae62e559 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/check-folder/_index.md @@ -0,0 +1,5 @@ +--- +title: "Check Folder Exists" +linkTitle: "Check Folder Exists" +description: "Check if a folder exists." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/check-folder/check-folder-exists-block.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/check-folder/check-folder-exists-block.md new file mode 100644 index 000000000..3e2d5062a --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/check-folder/check-folder-exists-block.md @@ -0,0 +1,159 @@ +--- +title: "Check Folder Exists" +linkTitle: "Check Folder Exists" +description: "Checks if a folder exists at the specified folder path." +--- + +{{< figure src="/blocks/folders-check-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.FilesAndFolders.CheckFolder.CheckFolderExistsBlock)
+ +## Description + +Checks if a [Folder Exists][FolderExists Property] at the specified [Folder Path][FolderPath Property]. + +## Examples + +### Folder exists at the specified Folder Path + +This example will check if `"C:\Windows\System32"` exists on the Windows server executing the flow. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Path][FolderPath Property] | `($)FolderPath`, with value `@"C:\Windows\System32"` | `($)FolderPath` is a variable of type [String][] | +| [Folder Exists][FolderExists Property] | `($)FolderExists`, with no value | `($)FolderExists` is a variable that will be set to a [Boolean][] value | + +#### Result + +`"C:\Windows\System32"` is the folder on Windows machines that contains files critical to the functioning of the operating system. Checking this on the Windows server executing the flow will result in the variable `($)FolderExists` being updated to the following: + +```json +true +``` + +*** + +### Folder does not exist at the specified Folder Path + +This example will check if `"/etc"` exists on the Windows server executing the flow. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Path][FolderPath Property] | `($)FolderPath`, with value `"/etc"` | `($)FolderPath` is a variable of type [String][] | +| [Folder Exists][FolderExists Property] | `($)FolderExists`, with no value | `($)FolderExists` is a variable that will be set to a [Boolean][] value | + +#### Result + +`"/etc"` is the folder on Linux machines containing system configuration files. Checking this on the Windows server executing the flow will result in the variable `($)FolderExists` being updated to the following: + +```json +false +``` + +*** + +## Properties + +### Folder Path + +The [Folder Path][FolderPath Property] to check a folder exists at. + +The [Folder Path][FolderPath Property] is case-insensitive, any trailing spaces will be automatically removed, and can end with or without a trailing `\` (e.g. `@"C:\Windows\System32"` or `@"C:\Windows\System32\"`). + +For information about the supported folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FolderPath` with no value | + +### Folder Exists + +The result of the folder exists check. + +If the folder exists at the specified [Folder Path][FolderPath Property], the specified variable will be set to `true`, otherwise it will be set to `false`. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FolderExists` with no value | + +## Exceptions + +No exceptions are thrown by the block. + +## Remarks + +### Folder Paths + +For information about the supported folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +### Folder Path needs escaping + +[Folder Path][FolderPath Property] requires `\` characters to be escaped, otherwise each unescaped `\` will be reported as an `Invalid property value` message when trying to debug the flow. + +Escaping can be done in two ways: + +* Escaping the `\` character with another `\` character (e.g. `"C:\\Windows\\System32"`), or +* Prepending an `@` character before the start of the [Folder Path][FolderPath Property] (e.g. `@"C:\Windows\System32"`) + +### Null Folder Path + +If [Folder Path][FolderPath Property] is `null` the variable specified in the [Folder Exists][FolderExists Property] property will be set to `false`. + +### Empty Folder Path + +If [Folder Path][FolderPath Property] is empty (i.e. `""`) the variable specified in the [Folder Exists][FolderExists Property] property will be set to `false`. + +### Invalid Folder Path + +If [Folder Path][FolderPath Property] is invalid (i.e. contains any of the following characters: `"`, `*`, `?`, `|`, `<`, `>`, `:`, `\`, `/`) the variable specified in the [Folder Exists][FolderExists Property] property will be set to `false`. + +### Folder Path points to a file + +If [Folder Path][FolderPath Property] points to a file, the variable specified in the [Folder Exists][FolderExists Property] property will be set to `false`. + +To check if a file exists, use the [Check File Exists block][]. + +### Folder Path contains leading spaces + +If [Folder Path][FolderPath Property] contains leading spaces they are not removed; however, trailing spaces are removed. + +### Error occurs whilst checking if the folder exists + +If any error occurs whilst checking if a folder exists at the specified [Folder Path][FolderPath Property], the variable specified in the [Folder Exists][FolderExists Property] property will be set to `false`. + +### User does not have necessary permissions to check if the folder exists + +If the user the flow is executing as does not have permissions to check if a folder exists at the specified [Folder Path][FolderPath Property], the variable specified in the [Folder Exists][FolderExists Property] property will be set to `false`. + +[FolderPath Property]: {{< ref "#folder-path" >}} +[FolderExists Property]: {{< ref "#folder-exists" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[File & Folder Paths]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Paths.MainDoc" >}} + +[Check File Exists block]: {{< url path="Cortex.Reference.Blocks.FilesAndFolders.CheckFile.CheckFileExists.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-file/_index.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-file/_index.md new file mode 100644 index 000000000..71e54f21e --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-file/_index.md @@ -0,0 +1,5 @@ +--- +title: "Copy File(s)" +linkTitle: "Copy File(s)" +description: "Copy a file or multiple files." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-file/copy-file-block.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-file/copy-file-block.md new file mode 100644 index 000000000..11b1d51df --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-file/copy-file-block.md @@ -0,0 +1,224 @@ +--- +title: "Copy File" +linkTitle: "Copy File" +description: "Copies a file at the specified file path to the given destination path." +--- + +{{< figure src="/blocks/files-copy-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.FilesAndFolders.CopyFile.CopyFileBlock)
+ +## Description + +Copies a file at the specified [File Path][FilePath Property] to the given [Destination Path][DestinationPath Property], with an option to [Overwrite][Overwrite Property] the file if it already exists. + +## Examples + +### Copy a file to a folder keeping the same file name + +This example will copy `"C:\Source\OriginalFile.txt"` to `"C:\Destination"`, with the same file name of `"OriginalFile.txt"`. + +In this example assume `"C:\Destination"` does not already contain a file named `"OriginalFile.txt"`, so overwrite can be set to either `true` or `false` and it will still work. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [File Path][FilePath Property] | `($)FilePath`, with value `@"C:\Source\OriginalFile.txt"` | `($)FilePath` is a variable of type [String][] | +| [Destination Path][DestinationPath Property] | `($)DestinationPath`, with value `@"C:\Destination"` | `($)DestinationPath` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `false` | `($)Overwrite` is a variable of type [Boolean][] | + +#### Result + +Copying `"C:\Source\OriginalFile.txt"` to `"C:\Destination"` that does not already contain a file named `"OriginalFile.txt"` will: + +* Create a new file at `"C:\Destination\OriginalFile.txt"` with: + * The content copied from `"C:\Source\OriginalFile.txt"`. + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` copied from `"C:\Source\OriginalFile.txt"`. + * The [File Attributes][] copied from `"C:\Source\OriginalFile.txt"`. + +*** + +### Copy a file to a folder with a new name + +This example will copy `"C:\Source\OriginalFile.txt"` to `"C:\Destination"`, with a new file name of `"NewFile.txt"`. + +To rename the file when it is being copied, please note that the [Destination Path][DestinationPath Property] must be a file path, rather than a folder path (e.g. `"C:\Destination\NewFile.txt"` rather than `"C:\Destination"`). + +In this example assume `"C:\Destination"` does not already contain a file named `"NewFile.txt"`, so overwrite can be set to either `true` or `false` and it will still work. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [File Path][FilePath Property] | `($)FilePath`, with value `@"C:\Source\OriginalFile.txt"` | `($)FilePath` is a variable of type [String][] | +| [Destination Path][DestinationPath Property] | `($)DestinationPath`, with value `@"C:\Destination\NewFile.txt"` | `($)DestinationPath` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `false` | `($)Overwrite` is a variable of type [Boolean][] | + +#### Result + +Copying `"C:\Source\OriginalFile.txt"` to the path `"C:\Destination\NewFile.txt"` that does not already exist will: + +* Create a new file at `"C:\Destination\NewFile.txt"` with: + * The content copied from `"C:\Source\OriginalFile.txt"`. + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` copied from `"C:\Source\OriginalFile.txt"`. + * The [File Attributes][] copied from `"C:\Source\OriginalFile.txt"`. + +*** + +### Copy a file to a folder overwriting any file that already exists with the same name + +This example will copy `"C:\Source\FileAlreadyExists.txt"` to `"C:\Destination"`, with the same file name of `"FileAlreadyExists.txt"`. + +In this example assume `"C:\Destination"` already contains a file named `"FileAlreadyExists.txt"`, so overwrite must be set to `true` to ensure the content of the existing file can be overwritten. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [File Path][FilePath Property] | `($)FilePath`, with value `@"C:\Source\FileAlreadyExists.txt"` | `($)FilePath` is a variable of type [String][] | +| [Destination Path][DestinationPath Property] | `($)DestinationPath`, with value `@"C:\Destination"` | `($)DestinationPath` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `true` | `($)Overwrite` is a variable of type [Boolean][] | + +#### Result + +Copying `"C:\Source\FileAlreadyExists.txt"` to `"C:\Destination"` and overwriting the existing file named `"FileAlreadyExists.txt"` will: + +* Overwrite the existing file at `"C:\Destination\FileAlreadyExists.txt"` with: + * The content copied from `"C:\Source\FileAlreadyExists.txt"`. + * The `Date Created` left unchanged. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` copied from `"C:\Source\FileAlreadyExists.txt"`. + * The [File Attributes][] copied from `"C:\Source\FileAlreadyExists.txt"`. + +*** + +## Properties + +### File Path + +The [File Path][FilePath Property] to copy the file from. + +The [File Path][FilePath Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +For information about the supported file path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FilePath` with no value | + +### Destination Path + +The [Destination Path][DestinationPath Property] to copy the file to. + +The [Destination Path][DestinationPath Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +The [Destination Path][DestinationPath Property] can either point to a folder or a file: + +* If it points to a folder, the copied file will have the name specified in the [File Path][FilePath Property]. +* If it points to a file, the copied file will have the name specified in the [Destination Path][DestinationPath Property]. + +Any non-existing folders within the [Destination Path][DestinationPath Property] will be automatically created. + +For information about the supported file and folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | No value (defaults to `""`) | + +### Overwrite + +Option to [Overwrite][Overwrite Property] the file in the [Destination Path][DestinationPath Property] if it already exists. + +If the file exists, [Overwrite][Overwrite Property] must be set to `true`, otherwise an [OperationFailedException][] will be thrown. By default, this is set to `false` to avoid implicit and accidental overwriting of existing files. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `false` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [InvalidPathException][] | The [Destination Path][DestinationPath Property] contains leading spaces. | +| | The [Destination Path][DestinationPath Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any file or folder names. | +| | The [Destination Path][DestinationPath Property] (if it points to a file), or the [Destination Path][DestinationPath Property] (if it points to a folder) plus the file name, exceeds the system-defined maximum length (typically 32,767 characters). | +| [OperationFailedException][] | The [File Path][FilePath Property] does not exist. | +| | The [File Path][FilePath Property] points to a folder. | +| | The [File Path][FilePath Property] contains leading spaces. | +| | The [File Path][FilePath Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any file or folder names. | +| | The [File Path][FilePath Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| | The [File Path][FilePath Property] or [Destination Path][DestinationPath Property] is invalid (for example, it is on an unmapped drive). | +| | The file in the specified [Destination Path][DestinationPath Property] exists and overwrite is `false`. | +| | The file in the specified [Destination Path][DestinationPath Property] exists, is read-only and overwrite is `true`. | +| | The file in the specified [Destination Path][DestinationPath Property] exists, is hidden and overwrite is `true`, but the file in the specified [File Path][FilePath Property] is not hidden.| +| | The user the flow is executing as does not have the required permissions to copy the file (e.g. not having read access to the [File Path][FilePath Property] or write access to the [Destination Path][DestinationPath Property]). | +| | An unexpected error occurs when copying the file. | +| [PropertyEmptyException][] | Thrown when [File Path][FilePath Property] or [Destination Path][DestinationPath Property] are empty (i.e. `""`). | +| [PropertyNullException][] | Thrown when [File Path][FilePath Property] or [Destination Path][DestinationPath Property] are `null`. | + +## Remarks + +### File and Folder Paths + +For information about the supported file and folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +### File Path and Destination Path need escaping + +[File Path][FilePath Property] and [Destination Path][DestinationPath Property] require `\` characters to be escaped, otherwise each unescaped `\` will be reported as an `Invalid property value` message when trying to debug the flow. + +Escaping can be done in two ways: + +* Escaping the `\` character with another `\` character (e.g. `"C:\\Source\\OriginalFile.txt"`), or +* Prepending an `@` character before the start of the [File Path][FilePath Property] (e.g. `@"C:\Source\OriginalFile.txt"`) and [Destination Path][DestinationPath Property] (e.g. `@"C:\Destination"`). + +### File Attributes + +When copying a file from the [File Path][FilePath Property] to the new [Destination Path][DestinationPath Property], all of the file's attributes will also be copied. + +For information about the file attributes (i.e. ReadOnly, Hidden, Archive etc.), please see [File & Folder Attributes][]. + +[FilePath Property]: {{< ref "#file-path" >}} +[DestinationPath Property]: {{< ref "#destination-path" >}} +[Overwrite Property]: {{< ref "#overwrite" >}} + +[File Attributes]: {{< ref "#file-attributes" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[InvalidPathException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.InvalidPathException.MainDoc" >}} +[OperationFailedException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.MainDoc" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[File & Folder Attributes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Attributes.MainDoc" >}} +[File & Folder Paths]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Paths.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-file/copy-files-block.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-file/copy-files-block.md new file mode 100644 index 000000000..5d6b42de9 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-file/copy-files-block.md @@ -0,0 +1,217 @@ +--- +title: "Copy Files" +linkTitle: "Copy Files" +description: "Copies files at the specified file paths to the given destination path." +--- + +{{< figure src="/blocks/files-copy-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.FilesAndFolders.CopyFile.CopyFilesBlock)
+ +## Description + +Copies files at the specified [File Paths][FilePaths Property] to the given [Destination Path][DestinationPath Property], with an option to [Overwrite][Overwrite Property] the files if they already exist. + +## Examples + +### Copy files to a folder keeping the same file names + +This example will copy `["C:\Source\OriginalFile1.txt", "C:\Source\OriginalFile2.txt"]` to `"C:\Destination"`, with the same file names of `"OriginalFile1.txt"` and `"OriginalFile2.txt"`. + +In this example assume `"C:\Destination"` does not already contain a file named `"OriginalFile1.txt"` or a file named `"OriginalFile2.txt"`, so overwrite can be set to either `true` or `false` and it will still work. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [File Paths][FilePaths Property] | `($)FilePaths`, with value `[@"C:\Source\OriginalFile1.txt", @"C:\Source\OriginalFile2.txt"]` | `($)FilePaths` is a variable of type [IEnumerable][]<[String][]> | +| [Destination Path][DestinationPath Property] | `($)DestinationPath`, with value `@"C:\Destination"` | `($)DestinationPath` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `false` | `($)Overwrite` is a variable of type [Boolean][] | + +#### Result + +Copying `["C:\Source\OriginalFile1.txt", "C:\Source\OriginalFile2.txt"]` to `"C:\Destination"` that does not already contain files named `"OriginalFile1.txt"` and `"OriginalFile2.txt"` will: + +* Create a new file at `"C:\Destination\OriginalFile1.txt"` with: + * The content copied from `"C:\Source\OriginalFile1.txt"`. + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` copied from `"C:\Source\OriginalFile1.txt"`. + * The [File Attributes][] copied from `"C:\Source\OriginalFile1.txt"`. +* Create a new file at `"C:\Destination\OriginalFile2.txt"` with: + * The content copied from `"C:\Source\OriginalFile2.txt"`. + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` copied from `"C:\Source\OriginalFile2.txt"`. + * The [File Attributes][] copied from `"C:\Source\OriginalFile2.txt"`. + +*** + +### Copy files to a folder overwriting any files that already exists with the same names + +This example will copy `["C:\Source\FileAlreadyExists1.txt", "C:\Source\FileAlreadyExists2.txt"]` to `"C:\Destination"`, with the same file names of `"FileAlreadyExists1.txt"` and `"FileAlreadyExists2.txt"`. + +In this example assume `"C:\Destination"` already contains a file named `"FileAlreadyExists1.txt"` and a file named `"FileAlreadyExists2.txt"`, so overwrite must be set to `true` to ensure the content of the existing files can be overwritten. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [File Paths][FilePaths Property] | `($)FilePaths`, with value `[@"C:\Source\FileAlreadyExists1.txt", @"C:\Source\FileAlreadyExists2.txt"]` | `($)FilePaths` is a variable of type [IEnumerable][]<[String][]> | +| [Destination Path][DestinationPath Property] | `($)DestinationPath`, with value `@"C:\Destination"` | `($)DestinationPath` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `true` | `($)Overwrite` is a variable of type [Boolean][] | + +#### Result + +Copying `["C:\Source\FileAlreadyExists1.txt", "C:\Source\FileAlreadyExists2.txt"]` to `"C:\Destination"` and overwriting the existing files named `"FileAlreadyExists1.txt"` and `"FileAlreadyExists2.txt"` will: + +* Overwrite the existing file at `"C:\Destination\FileAlreadyExists1.txt"` with: + * The content copied from `"C:\Source\FileAlreadyExists1.txt"`. + * The `Date Created` left unchanged. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` copied from `"C:\Source\FileAlreadyExists1.txt"`. + * The [File Attributes][] copied from `"C:\Source\FileAlreadyExists1.txt"`. +* Overwrite the existing file at `"C:\Destination\FileAlreadyExists2.txt"` with: + * The content copied from `"C:\Source\FileAlreadyExists2.txt"`. + * The `Date Created` left unchanged. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` copied from `"C:\Source\FileAlreadyExists2.txt"`. + * The [File Attributes][] copied from `"C:\Source\FileAlreadyExists2.txt"`. + +*** + +## Properties + +### File Paths + +The [File Paths][FilePaths Property] to copy the files from. + +Each file path in [File Paths][FilePaths Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +For information about the supported file path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[String][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FilePaths` with no value | + +### Destination Path + +The [Destination Path][DestinationPath Property] to copy the files to. + +The [Destination Path][DestinationPath Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +The [Destination Path][DestinationPath Property] must point to a folder, otherwise an [InvalidPathException][] will be thrown. + +The copied files will have the names specified in the [File Paths][FilePaths Property]. + +Any non-existing folders within the [Destination Path][DestinationPath Property] will be automatically created. + +For information about the supported file and folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | No value (defaults to `""`) | + +### Overwrite + +Option to [Overwrite][Overwrite Property] the files in the [Destination Path][DestinationPath Property] if they already exist. + +If any file exists, [Overwrite][Overwrite Property] must be set to `true`, otherwise an [OperationFailedException][] will be thrown. By default, this is set to `false` to avoid implicit and accidental overwriting of existing files. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `false` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [InvalidPathException][] | The [Destination Path][DestinationPath Property] does not point to a folder. | +| | The [Destination Path][DestinationPath Property] contains leading spaces. | +| | The [Destination Path][DestinationPath Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any file or folder names. | +| | The [Destination Path][DestinationPath Property] (if it points to a file), or the [Destination Path][DestinationPath Property] (if it points to a folder) plus the file name, exceeds the system-defined maximum length (typically 32,767 characters). | +| [OperationFailedException][] | Any file path in [File Paths][FilePaths Property] is `null` or empty (i.e. `""`). For more information, see [Null or Empty File Paths][]| +| | Any file path in [File Paths][FilePaths Property] is duplicated. For more information, see [Duplicate File Paths][] | +| | Any file path in [File Paths][FilePaths Property] does not exist. | +| | Any file path in [File Paths][FilePaths Property] points to a folder. | +| | Any file path in [File Paths][FilePaths Property] contains leading spaces. | +| | Any file path in [File Paths][FilePaths Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any file or folder names. | +| | Any file path in [File Paths][FilePaths Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| | Any file path in [File Paths][FilePaths Property] or [Destination Path][DestinationPath Property] is invalid (for example, it is on an unmapped drive). | +| | Any file path in [File Paths][FilePaths Property] exists in the specified [Destination Path][DestinationPath Property] and overwrite is `false`. | +| | Any file path in [File Paths][FilePaths Property] exists in the specified [Destination Path][DestinationPath Property] with the same name, is read-only and overwrite is `true`. | +| | Any file path in [File Paths][FilePaths Property] exists in the specified [Destination Path][DestinationPath Property] with the same name, is hidden and overwrite is `true`, but the file in the specified [File Paths][FilePaths Property] is not hidden.| +| | The user the flow is executing as does not have the required permissions to copy any file (e.g. not having read access to a file path in [File Paths][FilePaths Property] or write access to the [Destination Path][DestinationPath Property]). | +| | An unexpected error occurs when copying a file. | +| [PropertyEmptyException][] | Thrown when [File Paths][FilePaths Property] does not contain any items, or [Destination Path][DestinationPath Property] is empty (i.e. `""`). | +| [PropertyNullException][] | Thrown when [File Paths][FilePaths Property] or [Destination Path][DestinationPath Property] are `null`. | + +## Remarks + +### File and Folder Paths + +For information about the supported file and folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +### File Paths and Destination Path need escaping + +Each file path in [File Paths][FilePaths Property] and [Destination Path][DestinationPath Property] require `\` characters to be escaped, otherwise each unescaped `\` will be reported as an `Invalid property value` message when trying to debug the flow. + +Escaping can be done in two ways: + +* Escaping the `\` character with another `\` character (e.g. `"C:\\Source\\OriginalFile.txt"`), or +* Prepending an `@` character before the start of the +file path (e.g. `@"C:\Source\OriginalFile.txt"`) and [Destination Path][DestinationPath Property] (e.g. `@"C:\Destination"`). + +### File Attributes + +When copying a file in the [File Paths][FilePaths Property] to the new [Destination Path][DestinationPath Property], all of the file's attributes will also be copied. + +For information about the file attributes (i.e. ReadOnly, Hidden, Archive etc.), please see [File & Folder Attributes][]. + +### Handling of Exceptions + +If an exception occurs when trying to copy a file in the [File Paths][FilePaths Property], it will be recorded and the block will continue processing the remaining files. Once all files are processed, recorded exceptions will be thrown within an [OperationFailedException][]. + +[FilePaths Property]: {{< ref "#file-paths" >}} +[DestinationPath Property]: {{< ref "#destination-path" >}} +[Overwrite Property]: {{< ref "#overwrite" >}} + +[File Attributes]: {{< ref "#file-attributes" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[InvalidPathException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.InvalidPathException.MainDoc" >}} +[OperationFailedException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.MainDoc" >}} +[Duplicate File Paths]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.IndexesOfDuplicatePaths" >}} +[Null Or Empty File Paths]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.IndexesOfNullOrEmptyPaths" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[File & Folder Attributes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Attributes.MainDoc" >}} +[File & Folder Paths]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Paths.MainDoc" >}} + +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-folder/_index.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-folder/_index.md new file mode 100644 index 000000000..0b4717a91 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-folder/_index.md @@ -0,0 +1,5 @@ +--- +title: "Copy Folder(s)" +linkTitle: "Copy Folder(s)" +description: "Copy a folder or multiple folders." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-folder/copy-folder-block.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-folder/copy-folder-block.md new file mode 100644 index 000000000..4b13ef407 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-folder/copy-folder-block.md @@ -0,0 +1,386 @@ +--- +title: "Copy Folder" +linkTitle: "Copy Folder" +description: "Copies a folder at the specified folder path to the given destination path." +--- + +{{< figure src="/blocks/folders-copy-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.FilesAndFolders.CopyFolder.CopyFolderBlock)
+ +## Description + +Copies a folder at the specified [Folder Path][FolderPath Property] to the given [Destination Path][DestinationPath Property], with an option to copy the folder and its content, or just its [Content Only][ContentOnly Property]. + +An option can also be specified to [Overwrite][Overwrite Property] anything being copied that already exists in the [Destination Path][DestinationPath Property]. + +## Examples + +### Copy a folder and its content + +This example will copy `"C:\Source\Folder"` and its content to `"C:\Destination"`. + +In this example assume: + +* `"C:\Source\Folder"` contains: + * An empty sub-folder named `"SubFolder"`. + * A file named `"File.txt"`. +* `"C:\Destination"` does not already contain a folder named `"Folder"`, so overwrite can be set to either `true` or `false` and it will still work. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Path][FolderPath Property] | `($)FolderPath`, with value `@"C:\Source\Folder"` | `($)FolderPath` is a variable of type [String][] | +| [Destination Path][DestinationPath Property] | `($)DestinationPath`, with value `@"C:\Destination"` | `($)DestinationPath` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `false` | `($)Overwrite` is a variable of type [Boolean][] | +| [Content Only][ContentOnly Property] | `($)ContentOnly`, with value `false` | `($)ContentOnly` is a variable of type [Boolean][] | + +#### Result + +Copying `"C:\Source\Folder"` and its content to `"C:\Destination"` that does not already contain a folder named `"Folder"` will: + +* Create a new folder at `"C:\Destination\Folder"` with: + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` set to the time the copy occurred. + * The [Folder attributes][] copied from `"C:\Source\Folder"`. +* Create a new folder at `"C:\Destination\Folder\SubFolder"` with: + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` set to the time the copy occurred. + * The [Folder attributes][] copied from `"C:\Source\Folder\SubFolder"`. +* Create a new file at `"C:\Destination\Folder\File.txt"` with: + * The content copied from `"C:\Source\Folder\File.txt"`. + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` copied from `"C:\Source\Folder\File.txt"`. + * The [File attributes][] copied from `"C:\Source\Folder\File.txt"`. + +*** + +### Copy a folder and its content, overwriting any content that already exists + +This example will copy `"C:\Source\Folder"` and its content to `"C:\Destination"`, overwriting any content that already exists. + +In this example assume: + +* `"C:\Source\Folder"` contains: + * An empty sub-folder named `"SubFolder"`. + * An empty sub-folder named `"SubFolderAlreadyExists"`. + * A file named `"File.txt"`. + * A file named `"FileAlreadyExists.txt"`. +* `"C:\Destination"` already contains a folder named `"Folder"`, which already contains: + * A folder named `"SubFolderAlreadyExists"`. + * A file named `"FileAlreadyExists.txt"`. + +Therefore, overwrite must be set to `true` to ensure the existing `"SubFolderAlreadyExists"` and `"FileAlreadyExists.txt"` can be overwritten. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Path][FolderPath Property] | `($)FolderPath`, with value `@"C:\Source\Folder"` | `($)FolderPath` is a variable of type [String][] | +| [Destination Path][DestinationPath Property] | `($)DestinationPath`, with value `@"C:\Destination"` | `($)DestinationPath` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `true` | `($)Overwrite` is a variable of type [Boolean][] | +| [Content Only][ContentOnly Property] | `($)ContentOnly`, with value `false` | `($)ContentOnly` is a variable of type [Boolean][] | + +#### Result + +Copying `"C:\Source\Folder"` and its content to `"C:\Destination"` with the [Overwrite][Overwrite Property] option set to `true`, and where `"C:\Destination\Folder"`, `"C:\Destination\Folder\SubFolderAlreadyExists"` and `"C:\Destination\Folder\FileAlreadyExists.txt"` already exist will: + +* Overwrite the existing folder at `"C:\Destination\Folder"` with: + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Create a new empty folder at `"C:\Destination\Folder\SubFolder"` with: + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` set to the time the copy occurred. + * The [Folder attributes][] copied from `"C:\Source\Folder\SubFolder"`. +* Overwrite the existing folder at `"C:\Destination\Folder\SubFolderAlreadyExists"` with: + * The content left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Create a new file at `"C:\Destination\Folder\File.txt"` with: + * The content copied from `"C:\Source\Folder\File.txt"`. + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` copied from `"C:\Source\Folder\File.txt"`. + * The [File attributes][] copied from `"C:\Source\Folder\File.txt"`. +* Overwrite the existing file at `"C:\Destination\Folder\FileAlreadyExists.txt"` with: + * The content copied from `"C:\Source\Folder\FileAlreadyExists.txt"`. + * The `Date Created` left unchanged. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` copied from `"C:\Source\Folder\FileAlreadyExists.txt"`. + * The [File attributes][] copied from `"C:\Source\Folder\FileAlreadyExists.txt"`. + +*** + +### Copy a folder's content only + +This example will copy `"C:\Source\Folder"` content only to `"C:\Destination"`. + +In this example assume: + +* `"C:\Source\Folder"` contains: + * An empty sub-folder named `"SubFolder"`. + * A file named `"File.txt"`. +* `"C:\Destination"` does not already contain a folder named `"SubFolder"` or a file named `"File.txt"`, so overwrite can be set to either `true` or `false` and it will still work. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Path][FolderPath Property] | `($)FolderPath`, with value `@"C:\Source\Folder"` | `($)FolderPath` is a variable of type [String][] | +| [Destination Path][DestinationPath Property] | `($)DestinationPath`, with value `@"C:\Destination"` | `($)DestinationPath` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `false` | `($)Overwrite` is a variable of type [Boolean][] | +| [Content Only][ContentOnly Property] | `($)ContentOnly`, with value `true` | `($)ContentOnly` is a variable of type [Boolean][] | + +#### Result + +Copying `"C:\Source\Folder"` content only to `"C:\Destination"` that does not already contain a folder named `"SubFolder"` or a file named `"File.txt"` will: + +* Create a new folder at `"C:\Destination\SubFolder"` with: + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` set to the time the copy occurred. + * The [Folder attributes][] copied from `"C:\Source\Folder\SubFolder"`. +* Create a new file at `"C:\Destination\File.txt"` with: + * The content copied from `"C:\Source\Folder\File.txt"`. + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` copied from `"C:\Source\Folder\File.txt"`. + * The [File attributes][] copied from `"C:\Source\Folder\File.txt"`. + +*** + +### Copy a folder's content only, overwriting any content that already exists + +This example will copy `"C:\Source\Folder"` content only to `"C:\Destination"`, overwriting any content that already exists. + +In this example assume: + +* `"C:\Source\Folder"` contains: + * An empty sub-folder named `"SubFolder"`. + * An empty sub-folder named `"SubFolderAlreadyExists"`. + * A file named `"File.txt"`. + * A file named `"FileAlreadyExists.txt"`. +* `"C:\Destination"` already contains: + * A folder named `"SubFolderAlreadyExists"`. + * A file named `"FileAlreadyExists.txt"`. + +Therefore, overwrite must be set to `true` to ensure the existing `"SubFolderAlreadyExists"` and `"FileAlreadyExists.txt"` can be overwritten. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Path][FolderPath Property] | `($)FolderPath`, with value `@"C:\Source\Folder"` | `($)FolderPath` is a variable of type [String][] | +| [Destination Path][DestinationPath Property] | `($)DestinationPath`, with value `@"C:\Destination"` | `($)DestinationPath` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `true` | `($)Overwrite` is a variable of type [Boolean][] | +| [Content Only][ContentOnly Property] | `($)ContentOnly`, with value `true` | `($)ContentOnly` is a variable of type [Boolean][] | + +#### Result + +Copying `"C:\Source\Folder"` content only to `"C:\Destination"` with the [Overwrite][Overwrite Property] option set to `true`, and where `"C:\Destination\SubFolderAlreadyExists"` and `"C:\Destination\FileAlreadyExists.txt"` already exist will: + +* Create a new empty folder at `"C:\Destination\SubFolder"` with: + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` set to the time the copy occurred. + * The [Folder attributes][] copied from `"C:\Source\Folder\SubFolder"`. +* Overwrite the existing folder at `"C:\Destination\SubFolderAlreadyExists"` with: + * The content left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Create a new file at `"C:\Destination\File.txt"` with: + * The content copied from `"C:\Source\Folder\File.txt"`. + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` copied from `"C:\Source\Folder\File.txt"`. + * The [File attributes][] copied from `"C:\Source\Folder\File.txt"`. +* Overwrite the existing file at `"C:\Destination\FileAlreadyExists.txt"` with: + * The content copied from `"C:\Source\Folder\FileAlreadyExists.txt"`. + * The `Date Created` left unchanged. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` copied from `"C:\Source\Folder\FileAlreadyExists.txt"`. + * The [File attributes][] copied from `"C:\Source\Folder\FileAlreadyExists.txt"`. + +*** + +### Copy a folder and its content to the same location but with a different name + +If it is required to copy a folder and its content into the same folder it is currently located in, but with a different name, then it is not possible to do with this block; the [Duplicate Folder][] block must be used instead. + +*** + +### Copy a folder and its content to a different location but with a different name + +If it is required to copy a folder and its content into a different folder than the one it is currently located in, but with a different name, then it is not possible to do with this block; the [Rename Folder][] block must be used instead. + +*** + +## Properties + +### Folder Path + +The [Folder Path][FolderPath Property] to copy the folder and/or its content from. + +The [Folder Path][FolderPath Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +For information about the supported folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FolderPath` with no value | + +### Destination Path + +The [Destination Path][DestinationPath Property] to copy the folder and/or its content to. + +The [Destination Path][DestinationPath Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +The [Destination Path][DestinationPath Property] must point to a folder, otherwise an [InvalidPathException][] will be thrown. + +The copied folders and files will have the same names as the folders and files copied. + +Any non-existing folders within the [Destination Path][DestinationPath Property] will be automatically created. + +For information about the supported file and folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | No value (defaults to `""`) | + +### Overwrite + +Option to [Overwrite][Overwrite Property] the folder and/or contents being copied to in the [Destination Path][DestinationPath Property] if they already exist. + +If the folder and/or contents exists, [Overwrite][Overwrite Property] must be set to `true`, otherwise an [OperationFailedException][] will be thrown. By default, this is set to `false` to avoid implicit and accidental overwriting of existing folders and files. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `false` | + +### Content Only + +Option to specify whether to copy the folder and its content or just the [Content Only][ContentOnly Property]. + +To copy the folder and its content, [Content Only][ContentOnly Property] must be set to `false`; to copy just the content, [Content Only][ContentOnly Property] must be set to `true`. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `false` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [InvalidPathException][] | The [Destination Path][DestinationPath Property] points to a file. | +| | The [Destination Path][DestinationPath Property] contains leading spaces. | +| | The [Destination Path][DestinationPath Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any folder names. | +| | The [Destination Path][DestinationPath Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| [OperationFailedException][] | The [Folder Path][FolderPath Property] does not exist. | +| | The [Folder Path][FolderPath Property] points to a file. | +| | The [Folder Path][FolderPath Property] contains leading spaces. | +| | The [Folder Path][FolderPath Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any folder names. | +| | The [Folder Path][FolderPath Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| | The [Folder Path][FolderPath Property] or [Destination Path][DestinationPath Property] is a win32 device path (i.e starts with a `"\\.\"`). | +| | The [Folder Path][FolderPath Property] or [Destination Path][DestinationPath Property] is invalid (for example, it is on an unmapped drive). | +| | The [Folder Path][FolderPath Property] and [Destination Path][DestinationPath Property] point to the same folder and [Content Only][ContentOnly Property] is `true`. | +| | The [Folder Path][FolderPath Property] is a child folder in the [Destination Path][DestinationPath Property] and [Content Only][ContentOnly Property] is `false`. | +| | Any file being copied already exists in the specified [Destination Path][DestinationPath Property] and overwrite is `false`. | +| | Any file being copied already exists in the specified [Destination Path][DestinationPath Property], is read-only and overwrite is `true`. | +| | Any file being copied already exists in the specified [Destination Path][DestinationPath Property], is hidden and overwrite is `true`, but the file under the specified [Folder Path][FolderPath Property] is not hidden.| +| | The user the flow is executing as does not have the required permissions to copy the folder or any of its content (e.g. not having read access to the [Folder Path][FolderPath Property] or its content, or write access to the [Destination Path][DestinationPath Property]). | +| | The operation is cyclic (e.g. copying a folder into one of its sub-folders). | +| | An unexpected error occurs when copying the folder or any of its content. | +| [PropertyEmptyException][] | Thrown when [Folder Path][FolderPath Property] or [Destination Path][DestinationPath Property] are empty (i.e. `""`). | +| [PropertyNullException][] | Thrown when [Folder Path][FolderPath Property] or [Destination Path][DestinationPath Property] are `null`. | + +## Remarks + +### Folder Paths + +For information about the supported folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +### Folder Path and Destination Path need escaping + +[Folder Path][FolderPath Property] and [Destination Path][DestinationPath Property] require `\` characters to be escaped, otherwise each unescaped `\` will be reported as an `Invalid property value` message when trying to debug the flow. + +Escaping can be done in two ways: + +* Escaping the `\` character with another `\` character (e.g. `"C:\\Source\\"`), or +* Prepending an `@` character before the start of the [Folder Path][FolderPath Property] (e.g. `@"C:\Source"`) and [Destination Path][DestinationPath Property] (e.g. `@"C:\Destination"`). + +### Folder Attributes + +When copying the folder at the specified [Folder Path][FolderPath Property] or any folder under it to the new [Destination Path][DestinationPath Property], if the copied folder already exists its attributes remain unchanged, otherwise they are copied. + +For information about the folder attributes (i.e. ReadOnly, Hidden, Archive etc.), please see [File & Folder Attributes][]. + +### File Attributes + +When copying a file under [Folder Path][FolderPath Property] to the new [Destination Path][DestinationPath Property], all of the file's attributes are also copied. + +For information about the file attributes (i.e. ReadOnly, Hidden, Archive etc.), please see [File & Folder Attributes][]. + +### Handling of Exceptions + +If an exception occurs when trying to copy [Folder Path][FolderPath Property], an [OperationFailedException][] will be thrown. + +[FolderPath Property]: {{< ref "#folder-path" >}} +[DestinationPath Property]: {{< ref "#destination-path" >}} +[Overwrite Property]: {{< ref "#overwrite" >}} +[ContentOnly Property]: {{< ref "#content-only" >}} + +[Folder Attributes]: {{< ref "#folder-attributes" >}} +[File Attributes]: {{< ref "#file-attributes" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[InvalidPathException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.InvalidPathException.MainDoc" >}} +[OperationFailedException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.MainDoc" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[File & Folder Attributes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Attributes.MainDoc" >}} +[File & Folder Paths]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Paths.MainDoc" >}} + +[Rename Folder]: {{< url path="Cortex.Reference.Blocks.FilesAndFolders.RenameFolder.RenameFolder.MainDoc" >}} +[Duplicate Folder]: {{< url path="Cortex.Reference.Blocks.FilesAndFolders.CopyFolder.DuplicateFolder.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-folder/copy-folders-block.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-folder/copy-folders-block.md new file mode 100644 index 000000000..4c28f4f99 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-folder/copy-folders-block.md @@ -0,0 +1,498 @@ +--- +title: "Copy Folders" +linkTitle: "Copy Folders" +description: "Copies folders at the specified folder paths to the given destination path." +--- + +{{< figure src="/blocks/folders-copy-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.FilesAndFolders.CopyFolder.CopyFoldersBlock)
+ +## Description + +Copies folders at the specified [Folder Paths][FolderPaths Property] to the given [Destination Path][DestinationPath Property], with an option to copy the folders and their content, or just their [Content Only][ContentOnly Property]. + +An option can also be specified to [Overwrite][Overwrite Property] anything being copied that already exists in the [Destination Path][DestinationPath Property]. + +## Examples + +### Copy folders and their content + +This example will copy `["C:\Source\Folder1", "C:\Source\Folder2"]` and their content to `"C:\Destination"`. + +In this example assume: + +* `"C:\Source\Folder1"` contains: + * An empty sub-folder named `"SubFolder1"`. + * A file named `"File1.txt"`. +* `"C:\Source\Folder2"` contains: + * An empty sub-folder named `"SubFolder2"`. + * A file named `"File2.txt"`. +* `"C:\Destination"` does not already contain a folder named `"Folder1"` or `"Folder2"`, so overwrite can be set to either `true` or `false` and it will still work. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Paths][FolderPaths Property] | `($)FolderPaths`, with value `[@"C:\Source\Folder1", @"C:\Source\Folder2"]` | `($)FolderPaths` is a variable of type [IEnumerable][]<[String][]> | +| [Destination Path][DestinationPath Property] | `($)DestinationPath`, with value `@"C:\Destination"` | `($)DestinationPath` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `false` | `($)Overwrite` is a variable of type [Boolean][] | +| [Content Only][ContentOnly Property] | `($)ContentOnly`, with value `false` | `($)ContentOnly` is a variable of type [Boolean][] | + +#### Result + +Copying `["C:\Source\Folder1", "C:\Source\Folder2"]` and their content to `"C:\Destination"` that does not already contain folders named `"Folder1"` and `"Folder2"` will: + +* Create a new folder at `"C:\Destination\Folder1"` with: + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` set to the time the copy occurred. + * The [Folder attributes][] copied from `"C:\Source\Folder1"`. +* Create a new folder at `"C:\Destination\Folder1\SubFolder1"` with: + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` set to the time the copy occurred. + * The [Folder attributes][] copied from `"C:\Source\Folder1\SubFolder1"`. +* Create a new file at `"C:\Destination\Folder1\File1.txt"` with: + * The content copied from `"C:\Source\Folder1\File1.txt"`. + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` copied from `"C:\Source\Folder1\File1.txt"`. + * The [File attributes][] copied from `"C:\Source\Folder1\File1.txt"`. +* Create a new folder at `"C:\Destination\Folder2"` with: + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` set to the time the copy occurred. + * The [Folder attributes][] copied from `"C:\Source\Folder2"`. +* Create a new folder at `"C:\Destination\Folder2\SubFolder2"` with: + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` set to the time the copy occurred. + * The [Folder attributes][] copied from `"C:\Source\Folder2\SubFolder2"`. +* Create a new file at `"C:\Destination\Folder2\File2.txt"` with: + * The content copied from `"C:\Source\Folder2\File2.txt"`. + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` copied from `"C:\Source\Folder2\File2.txt"`. + * The [File attributes][] copied from `"C:\Source\Folder2\File2.txt"`. + +*** + +### Copy folders and their content, overwriting any content that already exists + +This example will copy `["C:\Source\Folder1", "C:\Source\Folder2"]` and their content to `"C:\Destination"`, overwriting any content that already exists. + +In this example assume: + +* `"C:\Source\Folder1"` contains: + * An empty sub-folder named `"SubFolder1"`. + * An empty sub-folder named `"SubFolderAlreadyExists1"`. + * A file named `"File1.txt"`. + * A file named `"FileAlreadyExists1.txt"`. +* `"C:\Source\Folder2"` contains: + * An empty sub-folder named `"SubFolder2"`. + * An empty sub-folder named `"SubFolderAlreadyExists2"`. + * A file named `"File2.txt"`. + * A file named `"FileAlreadyExists2.txt"`. +* `"C:\Destination"` already contains: + * A folder named `"Folder1"`, which already contains: + * A folder named `"SubFolderAlreadyExists1"`. + * A file named `"FileAlreadyExists1.txt"`. + * A folder named `"Folder2"`, which already contains: + * A folder named `"SubFolderAlreadyExists2"`. + * A file named `"FileAlreadyExists2.txt"`. + +Therefore, overwrite must be set to `true` to ensure the existing folders and files can be overwritten. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Paths][FolderPaths Property] | `($)FolderPaths`, with value `[@"C:\Source\Folder1", @"C:\Source\Folder2"]` | `($)FolderPaths` is a variable of type [IEnumerable][]<[String][]> | +| [Destination Path][DestinationPath Property] | `($)DestinationPath`, with value `@"C:\Destination"` | `($)DestinationPath` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `true` | `($)Overwrite` is a variable of type [Boolean][] | +| [Content Only][ContentOnly Property] | `($)ContentOnly`, with value `false` | `($)ContentOnly` is a variable of type [Boolean][] | + +#### Result + +Copying `["C:\Source\Folder1", "C:\Source\Folder2"]` and their content to `"C:\Destination"` with the [Overwrite][Overwrite Property] option set to `true`, and where `"C:\Destination\Folder1"`, `"C:\Destination\Folder1\SubFolderAlreadyExists1"`, `"C:\Destination\Folder1\FileAlreadyExists1.txt"`, `"C:\Destination\Folder2"`, `"C:\Destination\Folder2\SubFolderAlreadyExists2"` and `"C:\Destination\Folder2\FileAlreadyExists2.txt"` already exist will: + +* Overwrite the existing folder at `"C:\Destination\Folder1"` with: + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Create a new empty folder at `"C:\Destination\Folder1\SubFolder1"` with: + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` set to the time the copy occurred. + * The [Folder attributes][] copied from `"C:\Source\Folder1\SubFolder1"`. +* Overwrite the existing folder at `"C:\Destination\Folder1\SubFolderAlreadyExists1"` with: + * The content left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Create a new file at `"C:\Destination\Folder1\File1.txt"` with: + * The content copied from `"C:\Source\Folder1\File1.txt"`. + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` copied from `"C:\Source\Folder1\File1.txt"`. + * The [File attributes][] copied from `"C:\Source\Folder1\File1.txt"`. +* Overwrite the existing file at `"C:\Destination\Folder1\FileAlreadyExists1.txt"` with: + * The content copied from `"C:\Source\Folder1\FileAlreadyExists1.txt"`. + * The `Date Created` left unchanged. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` copied from `"C:\Source\Folder1\FileAlreadyExists1.txt"`. + * The [File attributes][] copied from `"C:\Source\Folder1\FileAlreadyExists1.txt"`. +* Overwrite the existing folder at `"C:\Destination\Folder2"` with: + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Create a new empty folder at `"C:\Destination\Folder2\SubFolder2"` with: + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` set to the time the copy occurred. + * The [Folder attributes][] copied from `"C:\Source\Folder2\SubFolder2"`. +* Overwrite the existing folder at `"C:\Destination\Folder2\SubFolderAlreadyExists2"` with: + * The content left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Create a new file at `"C:\Destination\Folder2\File2.txt"` with: + * The content copied from `"C:\Source\Folder2\File2.txt"`. + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` copied from `"C:\Source\Folder2\File2.txt"`. + * The [File attributes][] copied from `"C:\Source\Folder2\File2.txt"`. +* Overwrite the existing file at `"C:\Destination\Folder2\FileAlreadyExists2.txt"` with: + * The content copied from `"C:\Source\Folder2\FileAlreadyExists2.txt"`. + * The `Date Created` left unchanged. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` copied from `"C:\Source\Folder2\FileAlreadyExists2.txt"`. + * The [File attributes][] copied from `"C:\Source\Folder2\FileAlreadyExists2.txt"`. + +*** + +### Copy the folders' content only + +This example will copy `["C:\Source\Folder1", "C:\Source\Folder2"]` content only to `"C:\Destination"`. + +In this example assume: + +* `"C:\Source\Folder1"` contains: + * An empty sub-folder named `"SubFolder1"`. + * A file named `"File1.txt"`. +* `"C:\Source\Folder2"` contains: + * An empty sub-folder named `"SubFolder2"`. + * A file named `"File2.txt"`. +* `"C:\Destination"` does not already contain a folder named `"SubFolder1"` or `"SubFolder2"` or a file named `"File1.txt"` or `"File2.txt"`, so overwrite can be set to either `true` or `false` and it will still work. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Paths][FolderPaths Property] | `($)FolderPaths`, with value `[@"C:\Source\Folder1", @"C:\Source\Folder2"]` | `($)FolderPaths` is a variable of type [IEnumerable][]<[String][]> | +| [Destination Path][DestinationPath Property] | `($)DestinationPath`, with value `@"C:\Destination"` | `($)DestinationPath` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `false` | `($)Overwrite` is a variable of type [Boolean][] | +| [Content Only][ContentOnly Property] | `($)ContentOnly`, with value `true` | `($)ContentOnly` is a variable of type [Boolean][] | + +#### Result + +Copying `["C:\Source\Folder1", "C:\Source\Folder2"]` content only to `"C:\Destination"` that does not already contain a folder named `"SubFolder1"` or `"SubFolder2"` or a file named `"File1.txt"` or `"File2.txt"` will: + +* Create a new folder at `"C:\Destination\SubFolder1"` with: + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` set to the time the copy occurred. + * The [Folder attributes][] copied from `"C:\Source\Folder1\SubFolder1"`. +* Create a new file at `"C:\Destination\File1.txt"` with: + * The content copied from `"C:\Source\Folder1\File1.txt"`. + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` copied from `"C:\Source\Folder1\File1.txt"`. + * The [File attributes][] copied from `"C:\Source\Folder1\File1.txt"`. +* Create a new folder at `"C:\Destination\SubFolder2"` with: + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` set to the time the copy occurred. + * The [Folder attributes][] copied from `"C:\Source\Folder2\SubFolder2"`. +* Create a new file at `"C:\Destination\File2.txt"` with: + * The content copied from `"C:\Source\Folder2\File2.txt"`. + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` copied from `"C:\Source\Folder2\File2.txt"`. + * The [File attributes][] copied from `"C:\Source\Folder2\File2.txt"`. + +*** + +### Copy folders' content only, overwriting any content that already exists + +This example will copy `["C:\Source\Folder1", "C:\Source\Folder2"]` content only to `"C:\Destination"`, overwriting any content that already exists. + +In this example assume: + +* `"C:\Source\Folder1"` contains: + * An empty sub-folder named `"SubFolder1"`. + * An empty sub-folder named `"SubFolderAlreadyExists1"`. + * A file named `"File1.txt"`. + * A file named `"FileAlreadyExists1.txt"`. +* `"C:\Source\Folder2"` contains: + * An empty sub-folder named `"SubFolder2"`. + * An empty sub-folder named `"SubFolderAlreadyExists2"`. + * A file named `"File2.txt"`. + * A file named `"FileAlreadyExists2.txt"`. +* `"C:\Destination"` already contains: + * A folder named `"SubFolderAlreadyExists1"`. + * A folder named `"SubFolderAlreadyExists2"`. + * A file named `"FileAlreadyExists1.txt"`. + * A file named `"FileAlreadyExists2.txt"`. + +Therefore, overwrite must be set to `true` to ensure the existing folders and files can be overwritten. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Paths][FolderPaths Property] | `($)FolderPaths`, with value `[@"C:\Source\Folder1", @"C:\Source\Folder2"]` | `($)FolderPaths` is a variable of type [IEnumerable][]<[String][]> | +| [Destination Path][DestinationPath Property] | `($)DestinationPath`, with value `@"C:\Destination"` | `($)DestinationPath` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `true` | `($)Overwrite` is a variable of type [Boolean][] | +| [Content Only][ContentOnly Property] | `($)ContentOnly`, with value `true` | `($)ContentOnly` is a variable of type [Boolean][] | + +#### Result + +Copying `["C:\Source\Folder1", "C:\Source\Folder2"]` content only to `"C:\Destination"` with the [Overwrite][Overwrite Property] option set to `true`, and where `"C:\Destination\SubFolderAlreadyExists1"`, `"C:\Destination\SubFolderAlreadyExists2"`, `"C:\Destination\FileAlreadyExists1.txt"` and `"C:\Destination\FileAlreadyExists2.txt"` already exist will: + +* Create a new empty folder at `"C:\Destination\SubFolder1"` with: + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` set to the time the copy occurred. + * The [Folder attributes][] copied from `"C:\Source\Folder1\SubFolder1"`. +* Overwrite the existing folder at `"C:\Destination\SubFolderAlreadyExists1"` with: + * The content left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Create a new file at `"C:\Destination\File1.txt"` with: + * The content copied from `"C:\Source\Folder1\File1.txt"`. + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` copied from `"C:\Source\Folder1\File1.txt"`. + * The [File attributes][] copied from `"C:\Source\Folder1\File1.txt"`. +* Overwrite the existing file at `"C:\Destination\FileAlreadyExists1.txt"` with: + * The content copied from `"C:\Source\Folder1\FileAlreadyExists1.txt"`. + * The `Date Created` left unchanged. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` copied from `"C:\Source\Folder1\FileAlreadyExists1.txt"`. + * The [File attributes][] copied from `"C:\Source\Folder1\FileAlreadyExists1.txt"`. +* Create a new empty folder at `"C:\Destination\SubFolder2"` with: + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` set to the time the copy occurred. + * The [Folder attributes][] copied from `"C:\Source\Folder2\SubFolder2"`. +* Overwrite the existing folder at `"C:\Destination\SubFolderAlreadyExists2"` with: + * The content left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Create a new file at `"C:\Destination\File2.txt"` with: + * The content copied from `"C:\Source\Folder2\File2.txt"`. + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` copied from `"C:\Source\Folder2\File2.txt"`. + * The [File attributes][] copied from `"C:\Source\Folder2\File2.txt"`. +* Overwrite the existing file at `"C:\Destination\FileAlreadyExists2.txt"` with: + * The content copied from `"C:\Source\Folder2\FileAlreadyExists2.txt"`. + * The `Date Created` left unchanged. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` copied from `"C:\Source\Folder2\FileAlreadyExists2.txt"`. + * The [File attributes][] copied from `"C:\Source\Folder2\FileAlreadyExists2.txt"`. + +*** + +### Copy folders and their content to the same location but with a different name + +If it is required to copy folders and their content into the same folder they are currently located in, but with a different name, then it is not possible to do with this block; the [Duplicate Folder][] block must be used instead. + +*** + +### Copy folders and their content to a different location but with a different name + +If it is required to copy folders and their content into a different folder than the one they are currently located in, but with a different name, then it is not possible to do with this block; the [Rename Folder][] block must be used instead. + +*** + +## Properties + +### Folder Paths + +The [Folder Paths][FolderPaths Property] to copy the folders and/or their content from. + +Each folder path in [Folder Paths][FolderPaths Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +For information about the supported folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FolderPaths` with no value | + +### Destination Path + +The [Destination Path][DestinationPath Property] to copy the folders and/or their content to. + +The [Destination Path][DestinationPath Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +The [Destination Path][DestinationPath Property] must point to a folder, otherwise an [InvalidPathException][] will be thrown. + +The copied folders and files will have the same names as the folders and files copied. + +Any non-existing folders within the [Destination Path][DestinationPath Property] will be automatically created. + +For information about the supported file and folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | No value (defaults to `""`) | + +### Overwrite + +Option to [Overwrite][Overwrite Property] the folders and/or contents being copied to in the [Destination Path][DestinationPath Property] if they already exist. + +If any of the folders and/or contents exists, [Overwrite][Overwrite Property] must be set to `true`, otherwise an [OperationFailedException][] will be thrown. By default, this is set to `false` to avoid implicit and accidental overwriting of existing folders and files. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `false` | + +### Content Only + +Option to specify whether to copy the folders and their content or just the [Content Only][ContentOnly Property]. + +To copy the folders and their content, [Content Only][ContentOnly Property] must be set to `false`; to copy just the content, [Content Only][ContentOnly Property] must be set to `true`. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `false` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [InvalidPathException][] | The [Destination Path][DestinationPath Property] points to a file. | +| | The [Destination Path][DestinationPath Property] contains leading spaces. | +| | The [Destination Path][DestinationPath Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any folder names. | +| | The [Destination Path][DestinationPath Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| [OperationFailedException][] | Any folder path in [Folder Paths][FolderPaths Property] is `null` or empty (i.e. `""`). For more information, see [Null or Empty Folder Paths][]| +| | Any folder path in [Folder Paths][FolderPaths Property] is duplicated. For more information, see [Duplicate Folder Paths][] | +| | Any folder path in [Folder Paths][FolderPaths Property] does not exist. | +| | Any folder path in [Folder Paths][FolderPaths Property] points to a file. | +| | Any folder path in [Folder Paths][FolderPaths Property] contains leading spaces. | +| | Any folder path in [Folder Paths][FolderPaths Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any folder names. | +| | Any folder path in [Folder Paths][FolderPaths Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| | Any folder path in [Folder Paths][FolderPaths Property] or [Destination Path][DestinationPath Property] is a win32 device path (i.e starts with a `"\\.\"`). | +| | Any folder path in [Folder Paths][FolderPaths Property] or [Destination Path][DestinationPath Property] is invalid (for example, it is on an unmapped drive). | +| | Any folder path in [Folder Paths][FolderPaths Property] and [Destination Path][DestinationPath Property] point to the same folder and [Content Only][ContentOnly Property] is `true`. | +| | Any folder path in [Folder Paths][FolderPaths Property] is a child folder in the [Destination Path][DestinationPath Property] and [Content Only][ContentOnly Property] is `false`. | +| | Any file being copied already exists in the specified [Destination Path][DestinationPath Property] and overwrite is `false`. | +| | Any file being copied already exists in the specified [Destination Path][DestinationPath Property], is read-only and overwrite is `true`. | +| | Any file being copied already exists in the specified [Destination Path][DestinationPath Property], is hidden and overwrite is `true`, but the file under any of the specified [Folder Paths][FolderPaths Property] is not hidden.| +| | The user the flow is executing as does not have the required permissions to copy the folder or any of its content (e.g. not having read access to any of the folders in [Folder Paths][FolderPaths Property] or its content, or write access to the [Destination Path][DestinationPath Property]). | +| | The operation is cyclic (e.g. copying a folder into one of its sub-folders). | +| | An unexpected error occurs when copying a folder or any of its content. | +| [PropertyEmptyException][] | Thrown when [Folder Paths][FolderPaths Property] does not contain any items, or [Destination Path][DestinationPath Property] are empty (i.e. `""`). | +| [PropertyNullException][] | Thrown when [Folder Paths][FolderPaths Property] or [Destination Path][DestinationPath Property] are `null`. | + +## Remarks + +### Folder Paths + +For information about the supported folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +### Folder Path and Destination Path need escaping + +Each folder paths in [Folder Paths][FolderPaths Property] and [Destination Path][DestinationPath Property] require `\` characters to be escaped, otherwise each unescaped `\` will be reported as an `Invalid property value` message when trying to debug the flow. + +Escaping can be done in two ways: + +* Escaping the `\` character with another `\` character (e.g. `"C:\\Source\\"`), or +* Prepending an `@` character before the start of the folder path (e.g. `@"C:\Source"`) and [Destination Path][DestinationPath Property] (e.g. `@"C:\Destination"`). + +### Folder Attributes + +When copying the folders at the specified [Folder Paths][FolderPaths Property] or any folder under them to the new [Destination Path][DestinationPath Property], if the copied folder already exists its attributes remain unchanged, otherwise they are copied. + +For information about the folder attributes (i.e. ReadOnly, Hidden, Archive etc.), please see [File & Folder Attributes][]. + +### File Attributes + +When copying a file under any of the [Folder Paths][FolderPaths Property] to the new [Destination Path][DestinationPath Property], all of the file's attributes are also copied. + +For information about the file attributes (i.e. ReadOnly, Hidden, Archive etc.), please see [File & Folder Attributes][]. + +### Conflicting Content + +If two or more paths in the specified [Folder Paths][FolderPaths Property] contain content (folders or files) with the same name, and [Overwrite][Overwrite Property] and [Content Only][ContentOnly Property] are `true`: + +* The attributes of the folder/file in the [Destination Path][DestinationPath Property] will be that of the first one copied. +* For files, the content of the file in the [Destination Path][DestinationPath Property] will be that of the last one copied. + +### Handling of Exceptions + +If an exception occurs when trying to copy a folder in [Folder Paths][FolderPaths Property], it will be recorded and the block will continue processing the remaining folders. Once all folders are processed, recorded exceptions will be thrown within an [OperationFailedException][]. + +[FolderPaths Property]: {{< ref "#folder-paths" >}} +[DestinationPath Property]: {{< ref "#destination-path" >}} +[Overwrite Property]: {{< ref "#overwrite" >}} +[ContentOnly Property]: {{< ref "#content-only" >}} + +[Folder Attributes]: {{< ref "#folder-attributes" >}} +[File Attributes]: {{< ref "#file-attributes" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[InvalidPathException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.InvalidPathException.MainDoc" >}} +[OperationFailedException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.MainDoc" >}} +[Duplicate Folder Paths]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.IndexesOfDuplicatePaths" >}} +[Null Or Empty Folder Paths]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.IndexesOfNullOrEmptyPaths" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[File & Folder Attributes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Attributes.MainDoc" >}} +[File & Folder Paths]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Paths.MainDoc" >}} + +[Rename Folder]: {{< url path="Cortex.Reference.Blocks.FilesAndFolders.RenameFolder.RenameFolder.MainDoc" >}} +[Duplicate Folder]: {{< url path="Cortex.Reference.Blocks.FilesAndFolders.CopyFolder.DuplicateFolder.MainDoc" >}} + +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-folder/duplicate-folder-block.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-folder/duplicate-folder-block.md new file mode 100644 index 000000000..f529ee099 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/copy-folder/duplicate-folder-block.md @@ -0,0 +1,181 @@ +--- +title: "Duplicate Folder" +linkTitle: "Duplicate Folder" +description: "Copies a folder at the specified folder path to the same location but with a new name." +--- + +{{< figure src="/blocks/folders-copy-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.FilesAndFolders.CopyFolder.DuplicateFolderBlock)
+ +## Description + +Copies a folder at the specified [Folder Path][FolderPath Property] to the same location but with a [New Name][NewName Property]. + +## Examples + +### Duplicate a folder + +This example will make a copy of `"C:\Source\Folder"` at `"C:\Source\CopyOfFolder"`. + +In this example assume: + +* `"C:\Source\Folder"` contains: + * An empty sub-folder named `"SubFolder"`. + * A file named `"File.txt"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Path][FolderPath Property] | `($)FolderPath`, with value `@"C:\Source\Folder"` | `($)FolderPath` is a variable of type [String][] | +| [New Name][NewName Property] | `($)NewName`, with value `"CopyOfFolder"` | `($)NewName` is a variable of type [String][] | + +#### Result + +Making a copy of `"C:\Source\Folder"` with a new name of `"CopyOfFolder"` will: + +* Create a new folder at `"C:\Source\CopyOfFolder"` with: + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` set to the time the copy occurred. + * The [Folder attributes][] copied from `"C:\Source\Folder"`. +* Create a new folder at `"C:\Source\CopyOfFolder\SubFolder"` with: + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` set to the time the copy occurred. + * The [Folder attributes][] copied from `"C:\Source\Folder\SubFolder"`. +* Create a new file at `"C:\Source\CopyOfFolder\File.txt"` with: + * The content copied from `"C:\Source\Folder\File.txt"`. + * The `Date Created` set to the time the copy occurred. + * The `Date Accessed` set to the time the copy occurred. + * The `Date Modified` copied from `"C:\Source\Folder\File.txt"`. + * The [File attributes][] copied from `"C:\Source\Folder\File.txt"`. + +*** + +### Other Copy Operations + +If any other folder copying operation is required, the [Copy Folder][] or [Copy Folders][] blocks must be used instead. + +*** + +## Properties + +### Folder Path + +The [Folder Path][FolderPath Property] to copy the folder and its content from. + +The [Folder Path][FolderPath Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +For information about the supported folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FolderPath` with no value | + +### New Name + +The [New Name][NewName Property] to use for the copy of the folder. + +The [New Name][NewName Property] is case-insensitive and any trailing spaces will be automatically removed. + +The [New Name][NewName Property] must be a valid folder name, otherwise an [InvalidFolderNameException][] will be thrown. + +All child folders and files copied will have the same names as the folders and files copied. + +For information about valid folder names, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | No value (defaults to `""`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [InvalidFolderNameException][] | A folder or file with the [New Name][NewName Property] already exists. | +| | The [New Name][NewName Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`). | +| | The [New Name][NewName Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| [OperationFailedException][] | The [Folder Path][FolderPath Property] does not exist. | +| | The [Folder Path][FolderPath Property] points to a file. | +| | The [Folder Path][FolderPath Property] contains leading spaces. | +| | The [Folder Path][FolderPath Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any folder names. | +| | The [Folder Path][FolderPath Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| | The [Folder Path][FolderPath Property] is a win32 device path (i.e starts with a `"\\.\"`). | +| | The [Folder Path][FolderPath Property] is invalid (for example, it is on an unmapped drive). | +| | The user the flow is executing as does not have the required permissions to copy the folder or any of its content (e.g. not having read access to the [Folder Path][FolderPath Property] or its content, or write access to the parent of [Folder Path][FolderPath Property]. | +| | An unexpected error occurs when copying the folder or any of its content. | +| [PropertyEmptyException][] | Thrown when [Folder Path][FolderPath Property] or [New Name][NewName Property] are empty (i.e. `""`). | +| [PropertyNullException][] | Thrown when [Folder Path][FolderPath Property] or [New Name][NewName Property] are `null`. | + +## Remarks + +### Folder Paths + +For information about the supported folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +### Folder Path needs escaping + +[Folder Path][FolderPath Property] requires `\` characters to be escaped, otherwise each unescaped `\` will be reported as an `Invalid property value` message when trying to debug the flow. + +Escaping can be done in two ways: + +* Escaping the `\` character with another `\` character (e.g. `"C:\\Source\\"`), or +* Prepending an `@` character before the start of the [Folder Path][FolderPath Property] (e.g. `@"C:\Source"`). + +### Folder Attributes + +When copying the folder at or any folder under the specified [Folder Path][FolderPath Property] all of the folder's attributes are also copied. + +For information about the folder attributes (i.e. ReadOnly, Hidden, Archive etc.), please see [File & Folder Attributes][]. + +### File Attributes + +When copying a file under [Folder Path][FolderPath Property] all of the file's attributes are also copied. + +For information about the file attributes (i.e. ReadOnly, Hidden, Archive etc.), please see [File & Folder Attributes][]. + +### Handling of Exceptions + +If an exception occurs when trying to copy [Folder Path][FolderPath Property], an [OperationFailedException][] will be thrown. + +[FolderPath Property]: {{< ref "#folder-path" >}} +[NewName Property]: {{< ref "#new-name" >}} + +[Folder Attributes]: {{< ref "#folder-attributes" >}} +[File Attributes]: {{< ref "#file-attributes" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[InvalidFolderNameException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.InvalidFolderNameException.MainDoc" >}} +[OperationFailedException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.MainDoc" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[File & Folder Attributes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Attributes.MainDoc" >}} +[File & Folder Paths]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Paths.MainDoc" >}} + +[Copy Folder]: {{< url path="Cortex.Reference.Blocks.FilesAndFolders.CopyFolder.CopyFolder.MainDoc" >}} +[Copy Folders]: {{< url path="Cortex.Reference.Blocks.FilesAndFolders.CopyFolder.CopyFolders.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/create-folder/_index.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/create-folder/_index.md new file mode 100644 index 000000000..91e4e4279 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/create-folder/_index.md @@ -0,0 +1,5 @@ +--- +title: "Create Folder(s)" +linkTitle: "Create Folder(s)" +description: "Create a folder or multiple folders." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/create-folder/create-folder-block.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/create-folder/create-folder-block.md new file mode 100644 index 000000000..15d450a33 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/create-folder/create-folder-block.md @@ -0,0 +1,108 @@ +--- +title: "Create Folder" +linkTitle: "Create Folder" +description: "Creates a folder at the specified folder path." +--- + +{{< figure src="/blocks/folders-create-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.FilesAndFolders.CreateFolder.CreateFolderBlock)
+ +## Description + +Creates a folder at the specified [Folder Path][FolderPath Property]. + +## Examples + +### Create a folder + +This example will create `"C:\Source\NewFolder"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Path][FolderPath Property] | `($)FolderPath`, with value `@"C:\Source\NewFolder"` | `($)FolderPath` is a variable of type [String][] | + +#### Result + +Creating `"C:\Source\NewFolder"` results in the folder `"NewFolder"` being created in the folder `"C:\Source"`. + +*** + +## Properties + +### Folder Path + +The [Folder Path][FolderPath Property] to create the folder at. + +The [Folder Path][FolderPath Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +Any folders that do not exist in the [Folder Path][FolderPath Property] will be created. + +If the [Folder Path][FolderPath Property] already exists, a new folder is not created, and no exception is thrown. + +For information about the supported folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FolderPath` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [OperationFailedException][] | The [Folder Path][FolderPath Property] points to a file. | +| | The [Folder Path][FolderPath Property] contains leading spaces. | +| | The [Folder Path][FolderPath Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any folder names. | +| | The [Folder Path][FolderPath Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| | The [Folder Path][FolderPath Property] is invalid (for example, it is on an unmapped drive). | +| | The user the flow is executing as does not have the required permissions to create the folder at the [Folder Path][FolderPath Property]. | +| | An unexpected error occurs when creating the folder at the [Folder Path][FolderPath Property] or any of its content. | +| [PropertyEmptyException][] | Thrown when [Folder Path][FolderPath Property] is empty (i.e. `""`). | +| [PropertyNullException][] | Thrown when [Folder Path][FolderPath Property] is `null`. | + +## Remarks + +### Folder Paths + +For information about the supported folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +### Folder Path needs escaping + +[Folder Path][FolderPath Property] requires `\` characters to be escaped, otherwise each unescaped `\` will be reported as an `Invalid property value` message when trying to debug the flow. + +Escaping can be done in two ways: + +* Escaping the `\` character with another `\` character (e.g. `"C:\\Source\\"`), or +* Prepending an `@` character before the start of the [Folder Path][FolderPath Property] (e.g. `@"C:\Source"`). + +### Folder Path already exists + +If the [Folder Path][FolderPath Property] already exists nothing is created, and no exception is thrown. + +[FolderPath Property]: {{< ref "#folder-path" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[OperationFailedException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.MainDoc" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[File & Folder Paths]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Paths.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/create-folder/create-folders-block.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/create-folder/create-folders-block.md new file mode 100644 index 000000000..f7e631cfb --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/create-folder/create-folders-block.md @@ -0,0 +1,117 @@ +--- +title: "Create Folders" +linkTitle: "Create Folders" +description: "Create folders at the specified folder paths." +--- + +{{< figure src="/blocks/folders-create-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.FilesAndFolders.CreateFolder.CreateFoldersBlock)
+ +## Description + +Creates folders at the specified [Folder Paths][FolderPaths Property]. + +## Examples + +### Create folders + +This example will create `["C:\Source\NewFolder1", "C:\Source\NewFolder2"]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Paths][FolderPaths Property] | `($)FolderPaths`, with value `[@"C:\Source\NewFolder1", @"C:\Source\NewFolder2"]` | `($)FolderPaths` is a variable of type [IEnumerable][]<[String][]> | + +#### Result + +Creating `["C:\Source\NewFolder1", "C:\Source\NewFolder2"]` results in the folders `"NewFolder1"` and `"NewFolder2"` being create in the folder `"C:\Source"`. + +*** + +## Properties + +### Folder Paths + +The [Folder Paths][FolderPaths Property] to create the folders at. + +Each folder path in [Folder Paths][FolderPaths Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +Any folders that do not exist in any of the [Folder Paths][FolderPaths Property] will be created. + +If a folder in [Folder Paths][FolderPaths Property] already exists, a new folder is not created, and no exception is thrown. + +For information about the supported folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FolderPaths` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [OperationFailedException][] | Any folder path in [Folder Paths][FolderPaths Property] is `null` or empty (i.e. `""`). For more information, see [Null or Empty Folder Paths][]. | +| | Any folder path in [Folder Paths][FolderPaths Property] is duplicated. For more information, see [Duplicate Folder Paths][]. | +| | Any folder path in [Folder Paths][FolderPaths Property] points to a file. | +| | Any folder path in [Folder Paths][FolderPaths Property] contains leading spaces. | +| | Any folder path in [Folder Paths][FolderPaths Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any folder names. | +| | Any folder path in [Folder Paths][FolderPaths Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| | Any folder path in [Folder Paths][FolderPaths Property] is invalid (for example, it is on an unmapped drive). | +| | The user the flow is executing as does not have the required permissions to create a folder in the [Folder Paths][FolderPaths Property]. | +| | An unexpected error occurs when creating a folder in the [Folder Paths][FolderPaths Property] or any of its content. | +| [PropertyEmptyException][] | Thrown when [Folder Paths][FolderPaths Property] does not contain any items. | | +| [PropertyNullException][] | Thrown when [Folder Paths][FolderPaths Property] is `null`. | + +## Remarks + +### Folder Paths + +For information about the supported folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +### Folder Paths need escaping + +Each folder path in [Folder Paths][FolderPaths Property] requires `\` characters to be escaped, otherwise each unescaped `\` will be reported as an `Invalid property value` message when trying to debug the flow. + +Escaping can be done in two ways: + +* Escaping the `\` character with another `\` character (e.g. `"C:\\Source\\"`), or +* Prepending an `@` character before the start of the folder path (e.g. `@"C:\Source"`). + +### Folder Path already exists + +If a folder path in [Folder Paths][FolderPaths Property] already exists nothing is created, and no exception is thrown. + +### Handling of Exceptions + +If an exception occurs when trying to create a folder in [Folder Paths][FolderPaths Property], it will be recorded and the block will continue processing the remaining folders. Once all folders are processed, recorded exceptions will be thrown within an [OperationFailedException][]. + +[FolderPaths Property]: {{< ref "#folder-paths" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[OperationFailedException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.MainDoc" >}} +[Duplicate Folder Paths]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.IndexesOfDuplicatePaths" >}} +[Null Or Empty Folder Paths]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.IndexesOfNullOrEmptyPaths" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[File & Folder Paths]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Paths.MainDoc" >}} + +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/delete-file/_index.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/delete-file/_index.md new file mode 100644 index 000000000..e4e10375e --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/delete-file/_index.md @@ -0,0 +1,5 @@ +--- +title: "Delete File(s)" +linkTitle: "Delete File(s)" +description: "Delete a file or multiple files." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/delete-file/delete-file-block.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/delete-file/delete-file-block.md new file mode 100644 index 000000000..18d47a0d8 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/delete-file/delete-file-block.md @@ -0,0 +1,110 @@ +--- +title: "Delete File" +linkTitle: "Delete File" +description: "Deletes a file at the specified file path." +--- + +{{< figure src="/blocks/files-delete-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.FilesAndFolders.DeleteFile.DeleteFileBlock)
+ +## Description + +Deletes a file at the specified [File Path][FilePath Property]. + +## Examples + +### Delete a file + +This example will delete `"C:\Source\File.txt"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [File Path][FilePath Property] | `($)FilePath`, with value `@"C:\Source\File.txt"` | `($)FilePath` is a variable of type [String][] | + +#### Result + +Deleting `"C:\Source\File.txt"` results in the file `"File.txt"` being deleted from the folder `"C:\Source"`. + +*** + +## Properties + +### File Path + +The [File Path][FilePath Property] to delete the file from. + +The [File Path][FilePath Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +If the [File Path][FilePath Property] exists it is permanently deleted; it does not go into a recycle bin. + +If the [File Path][FilePath Property] does not exist no exception is thrown. + +For information about the supported file path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FilePath` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [OperationFailedException][] | The [File Path][FilePath Property] points to a folder. | +| | The [File Path][FilePath Property] contains leading spaces. | +| | The [File Path][FilePath Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any file or folder names. | +| | The [File Path][FilePath Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| | The [File Path][FilePath Property] is invalid (for example, it is on an unmapped drive). | +| | The file at the specified [File Path][FilePath Property] is read-only. | +| | The file at the specified [File Path][FilePath Property] is in use by another application. | +| | The user the flow is executing as does not have the required permissions to delete the file. | +| | An unexpected error occurs when deleting the file. | +| [PropertyEmptyException][] | Thrown when [File Path][FilePath Property] is empty (i.e. `""`). | +| [PropertyNullException][] | Thrown when [File Path][FilePath Property] is `null`. | + +## Remarks + +### File Paths + +For information about the supported file path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +### File Path needs escaping + +[File Path][FilePath Property] requires `\` characters to be escaped, otherwise each unescaped `\` will be reported as an `Invalid property value` message when trying to debug the flow. + +Escaping can be done in two ways: + +* Escaping the `\` character with another `\` character (e.g. `"C:\\Source\\File.txt"`), or +* Prepending an `@` character before the start of the [File Path][FilePath Property] (e.g. `@"C:\Source\File.txt"`). + +### File Path does not exist + +If the [File Path][FilePath Property] does not exist nothing is deleted, and no exception is thrown. + +[FilePath Property]: {{< ref "#file-path" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[OperationFailedException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.MainDoc" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[File & Folder Paths]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Paths.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/delete-file/delete-files-block.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/delete-file/delete-files-block.md new file mode 100644 index 000000000..794ab5a9a --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/delete-file/delete-files-block.md @@ -0,0 +1,121 @@ +--- +title: "Delete Files" +linkTitle: "Delete Files" +description: "Deletes files at the specified file paths." +--- + +{{< figure src="/blocks/files-delete-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.FilesAndFolders.DeleteFile.DeleteFilesBlock)
+ +## Description + +Deletes files at the specified [File Paths][FilePaths Property]. + +## Examples + +### Delete files + +This example will delete files `["C:\Source\File1.txt", "C:\Source\File2.txt"]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [File Paths][FilePaths Property] | `($)FilePaths`, with value `[@"C:\Source\File1.txt", @"C:\Source\File2.txt"]` | `($)FilePaths` is a variable of type [IEnumerable][]<[String][]> | + +#### Result + +Deleting `["C:\Source\File1.txt", "C:\Source\File2.txt"]` results in files `"File1.txt"` and `"File2.txt"` being deleted from the folder `"C:\Source"`. + +*** + +## Properties + +### File Paths + +The [File Paths][FilePaths Property] to delete the files from. + +Each file path in [File Paths][FilePaths Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +If a file path in [File Paths][FilePaths Property] exists it is permanently deleted; it does not go into a recycle bin. + +If a file path in [File Paths][FilePaths Property] does not exist no exception is recorded for that file path. + +For information about the supported file path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[String][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FilePaths` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [OperationFailedException][] | Any file path in [File Paths][FilePaths Property] is `null` or empty (i.e. `""`). For more information, see [Null or Empty File Paths][]. | +| | Any file path in [File Paths][FilePaths Property] is duplicated. For more information, see [Duplicate File Paths][]. | +| | Any file path in [File Paths][FilePaths Property] points to a folder. | +| | Any file path in [File Paths][FilePaths Property] contains leading spaces. | +| | Any file path in [File Paths][FilePaths Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any file or folder names. | +| | Any file path in [File Paths][FilePaths Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| | Any file path in [File Paths][FilePaths Property] is invalid (for example, it is on an unmapped drive). | +| | Any file path in [File Paths][FilePaths Property] is read-only. | +| | Any file path in [File Paths][FilePaths Property] is in use by another application. | +| | The user the flow is executing as does not have the required permissions to delete a file in [File Paths][FilePaths Property]. | +| | An unexpected error occurs when deleting a file in [File Paths][FilePaths Property]. | +| [PropertyEmptyException][] | Thrown when [File Paths][FilePaths Property] does not contain any items. | +| [PropertyNullException][] | Thrown when [File Paths][FilePaths Property] is `null`. | + +## Remarks + +### File Paths + +For information about the supported file path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +### File Paths need escaping + +Each file path in [File Paths][FilePaths Property] requires `\` characters to be escaped, otherwise each unescaped `\` will be reported as an `Invalid property value` message when trying to debug the flow. + +Escaping can be done in two ways: + +* Escaping the `\` character with another `\` character (e.g. `"C:\\Source\\File.txt"`), or +* Prepending an `@` character before the start of the +file path (e.g. `@"C:\Source\File.txt"`). + +### File Path does not exist + +If a file path in [File Paths][FilePaths Property] does not exist no exception is recorded for that file path. + +### Handling of Exceptions + +If an exception occurs when trying to delete a file in the [File Paths][FilePaths Property], it will be recorded and the block will continue processing the remaining files. Once all files are processed, recorded exceptions will be thrown within an [OperationFailedException][]. + +[FilePaths Property]: {{< ref "#file-paths" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[OperationFailedException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.MainDoc" >}} +[Duplicate File Paths]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.IndexesOfDuplicatePaths" >}} +[Null Or Empty File Paths]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.IndexesOfNullOrEmptyPaths" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[File & Folder Paths]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Paths.MainDoc" >}} + +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/delete-folder/_index.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/delete-folder/_index.md new file mode 100644 index 000000000..03f110087 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/delete-folder/_index.md @@ -0,0 +1,5 @@ +--- +title: "Delete Folder(s)" +linkTitle: "Delete Folder(s)" +description: "Delete a folder or multiple folders." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/delete-folder/delete-folder-block.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/delete-folder/delete-folder-block.md new file mode 100644 index 000000000..b9746049c --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/delete-folder/delete-folder-block.md @@ -0,0 +1,163 @@ +--- +title: "Delete Folder" +linkTitle: "Delete Folder" +description: "Deletes a folder at the specified folder path." +--- + +{{< figure src="/blocks/folders-delete-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.FilesAndFolders.DeleteFolder.DeleteFolderBlock)
+ +## Description + +Deletes a folder at the specified [Folder Path][FolderPath Property]. + +A [Recursive][Recursive Property] option must be set to `true` to be able to delete a folder that contains files and/or other folders. This is to prevent unintentional and destructive deletion of files and folders. + +## Examples + +### Delete an empty folder + +This example will delete `"C:\Source\EmptyFolder"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Path][FolderPath Property] | `($)FolderPath`, with value `@"C:\Source\EmptyFolder"` | `($)FolderPath` is a variable of type [String][] | +| [Recursive][Recursive Property] | `($)Recursive`, with value `false` | `($)Recursive` is a variable of type [Boolean][] | + +#### Result + +Deleting `"C:\Source\EmptyFolder"` results in the folder `"EmptyFolder"` being deleted from the folder `"C:\Source"`. + +*** + +### Delete a folder and its content + +This example will delete `"C:\Source\Folder"` and its content. + +In this example assume: + +* `"C:\Source\Folder"` contains: + * A file named `"FileInFolder.txt"`. + * An empty sub-folder named `"EmptySubFolder"`. + * An sub-folder named `"SubFolder"` that contains. + * A file named `"FileInSubFolder.txt"`. + +Therefore, recursive must be set to `true` to ensure child folders and files can be deleted. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Path][FolderPath Property] | `($)FolderPath`, with value `@"C:\Source\Folder"` | `($)FolderPath` is a variable of type [String][] | +| [Recursive][Recursive Property] | `($)Recursive`, with value `true` | `($)Recursive` is a variable of type [Boolean][] | + +#### Result + +Deleting `"C:\Source\Folder"` and its content results in: + +* File `"FileInSubFolder.txt"` being deleted from the folder `"C:\Source\Folder\SubFolder"`. +* Folder `"SubFolder"` being deleted from the folder `"C:\Source\Folder"`. +* Folder `"EmptySubFolder"` being deleted from the folder `"C:\Source\Folder"`. +* File `"FileInFolder.txt"` being deleted from the folder `"C:\Source\Folder"`. +* Folder `"Folder"` being deleted from the folder `"C:\Source"`. + +*** + +## Properties + +### Folder Path + +The [Folder Path][FolderPath Property] to delete the folder from. + +The [Folder Path][FolderPath Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +For information about the supported folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FolderPath` with no value | + +### Recursive + +[Recursive][Recursive Property] option that must be set to `true` to be able to delete a folder that contains files and/or other folders. + +If [Recursive][Recursive Property] is set to `false`, only an empty folder will be able to be deleted; for a non-empty folder an [OperationFailedException][] will be thrown. + +By default, this is set to `false` to prevent unintentional and destructive deletion of files and folders. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `false` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [OperationFailedException][] | The [Folder Path][FolderPath Property] points to a file. | +| | The [Folder Path][FolderPath Property] contains leading spaces. | +| | The [Folder Path][FolderPath Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any folder names. | +| | The [Folder Path][FolderPath Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| | The folder at the [Folder Path][FolderPath Property] is not empty and recursive is `false`. | +| | The folder at the [Folder Path][FolderPath Property] or any sub-folders are read-only or contain read-only files and/or folders. +| | The user the flow is executing as does not have the required permissions to delete the folder at the [Folder Path][FolderPath Property] or any of its content. | +| | An unexpected error occurs when deleting the folder at the [Folder Path][FolderPath Property] or any of its content. | +| [PropertyEmptyException][] | Thrown when [Folder Path][FolderPath Property] is empty (i.e. `""`). | +| [PropertyNullException][] | Thrown when [Folder Path][FolderPath Property] is `null`. | + +## Remarks + +### Folder Paths + +For information about the supported folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +### Folder Path needs escaping + +[Folder Path][FolderPath Property] requires `\` characters to be escaped, otherwise each unescaped `\` will be reported as an `Invalid property value` message when trying to debug the flow. + +Escaping can be done in two ways: + +* Escaping the `\` character with another `\` character (e.g. `"C:\\Source\\"`), or +* Prepending an `@` character before the start of the [Folder Path][FolderPath Property] (e.g. `@"C:\Source"`). + +### Folder Path does not exist + +If the [Folder Path][FolderPath Property] does not exist nothing is deleted, and no exception is thrown. + +### Handling of Exceptions + +If an exception occurs when trying to delete [Folder Path][FolderPath Property], an [OperationFailedException][] will be thrown. + +[FolderPath Property]: {{< ref "#folder-path" >}} +[Recursive Property]: {{< ref "#recursive" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[OperationFailedException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.MainDoc" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[File & Folder Paths]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Paths.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/delete-folder/delete-folders-block.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/delete-folder/delete-folders-block.md new file mode 100644 index 000000000..1fdfb6cf1 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/delete-folder/delete-folders-block.md @@ -0,0 +1,178 @@ +--- +title: "Delete Folders" +linkTitle: "Delete Folders" +description: "Deletes folders at the specified folder paths." +--- + +{{< figure src="/blocks/folders-delete-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.FilesAndFolders.DeleteFolder.DeleteFoldersBlock)
+ +## Description + +Deletes folders at the specified [Folder Paths][FolderPaths Property]. + +A [Recursive][Recursive Property] option must be set to `true` to be able to delete folders that contain files and/or other folders. This is to prevent unintentional and destructive deletion of files and folders. + +## Examples + +### Delete empty folders + +This example will delete `["C:\Source\EmptyFolder1", "C:\Source\EmptyFolder2"]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Paths][FolderPaths Property] | `($)FolderPaths`, with value `[@"C:\Source\EmptyFolder1", @"C:\Source\EmptyFolder2"]` | `($)FolderPaths` is a variable of type [IEnumerable][]<[String][]> | +| [Recursive][Recursive Property] | `($)Recursive`, with value `false` | `($)Recursive` is a variable of type [Boolean][] | + +#### Result + +Deleting `["C:\Source\EmptyFolder1", "C:\Source\EmptyFolder2"]` results in the folders `"EmptyFolder1"` and `"EmptyFolder2"` being deleted from the folder `"C:\Source"`. + +*** + +### Delete folders and their content + +This example will delete `["C:\Source\Folder1", "C:\Source\Folder2"]` and their content. + +In this example assume: + +* `"C:\Source\Folder1"` contains: + * A file named `"FileInFolder1.txt"`. + * An empty sub-folder named `"EmptySubFolder1"`. + * An sub-folder named `"SubFolder1"` that contains. + * A file named `"FileInSubFolder1.txt"`. +* `"C:\Source\Folder2"` contains: + * A file named `"FileInFolder2.txt"`. + * An empty sub-folder named `"EmptySubFolder2"`. + * An sub-folder named `"SubFolder2"` that contains. + * A file named `"FileInSubFolder2.txt"`. + +Therefore, recursive must be set to `true` to ensure child folders and files can be deleted. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Paths][FolderPaths Property] | `($)FolderPaths`, with value `[@"C:\Source\Folder1", @"C:\Source\Folder2"]` | `($)FolderPaths` is a variable of type [IEnumerable][]<[String][]> | +| [Recursive][Recursive Property] | `($)Recursive`, with value `true` | `($)Recursive` is a variable of type [Boolean][] | + +#### Result + +Deleting `[@"C:\Source\Folder1", @"C:\Source\Folder2"]` and their content results in: + +* File `"FileInSubFolder1.txt"` being deleted from the folder `"C:\Source\Folder1\SubFolder1"`. +* File `"FileInSubFolder2.txt"` being deleted from the folder `"C:\Source\Folder2\SubFolder2"`. +* Folder `"SubFolder1"` being deleted from the folder `"C:\Source\Folder1"`. +* Folder `"SubFolder2"` being deleted from the folder `"C:\Source\Folder2"`. +* Folder `"EmptySubFolder1"` being deleted from the folder `"C:\Source\Folder1"`. +* Folder `"EmptySubFolder2"` being deleted from the folder `"C:\Source\Folder2"`. +* File `"FileInFolder1.txt"` being deleted from the folder `"C:\Source\Folder1"`. +* File `"FileInFolder2.txt"` being deleted from the folder `"C:\Source\Folder2"`. +* Folder `"Folder1"` being deleted from the folder `"C:\Source"`. +* Folder `"Folder2"` being deleted from the folder `"C:\Source"`. + +*** + +## Properties + +### Folder Paths + +The [Folder Paths][FolderPaths Property] to delete the folders from. + +Each folder path in [Folder Paths][FolderPaths Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +For information about the supported folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FolderPaths` with no value | + +### Recursive + +[Recursive][Recursive Property] option that must be set to `true` to be able to delete folders that contain files and/or other folders. + +If [Recursive][Recursive Property] is set to `false`, only empty folders will be able to be deleted; for non-empty folders an [OperationFailedException][] will be thrown. + +By default, this is set to `false` to prevent unintentional and destructive deletion of files and folders. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `false` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [OperationFailedException][] | Any folder path in [Folder Paths][FolderPaths Property] is `null` or empty (i.e. `""`). For more information, see [Null or Empty Folder Paths][]. | +| | Any folder path in [Folder Paths][FolderPaths Property] is duplicated. For more information, see [Duplicate Folder Paths][]. | +| | Any folder path in [Folder Paths][FolderPaths Property] points to a file. | +| | Any folder path in [Folder Paths][FolderPaths Property] contains leading spaces. | +| | Any folder path in [Folder Paths][FolderPaths Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any folder names. | +| | Any folder path in [Folder Paths][FolderPaths Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| | Any folder path in [Folder Paths][FolderPaths Property] is not empty and recursive is `false`. | +| | Any folder path in [Folder Paths][FolderPaths Property] or any of their sub-folders are read-only or contain read-only files and/or folders. +| | The user the flow is executing as does not have the required permissions to delete a folder in the [Folder Paths][FolderPaths Property] or any of its content. | +| | An unexpected error occurs when deleting a folder in the [Folder Paths][FolderPaths Property] or any of its content. | +| [PropertyEmptyException][] | Thrown when [Folder Paths][FolderPaths Property] does not contain any items. | | +| [PropertyNullException][] | Thrown when [Folder Paths][FolderPaths Property] is `null`. | + +## Remarks + +### Folder Paths + +For information about the supported folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +### Folder Paths need escaping + +Each folder path in [Folder Paths][FolderPaths Property] requires `\` characters to be escaped, otherwise each unescaped `\` will be reported as an `Invalid property value` message when trying to debug the flow. + +Escaping can be done in two ways: + +* Escaping the `\` character with another `\` character (e.g. `"C:\\Source\\"`), or +* Prepending an `@` character before the start of the folder path (e.g. `@"C:\Source"`). + +### Folder Path does not exist + +If a folder path in [Folder Paths][FolderPaths Property] does not exist no exception is recorded for that folder path. + +### Handling of Exceptions + +If an exception occurs when trying to delete a folder in [Folder Paths][FolderPaths Property], it will be recorded and the block will continue processing the remaining folders. Once all folders are processed, recorded exceptions will be thrown within an [OperationFailedException][]. + +[FolderPaths Property]: {{< ref "#folder-paths" >}} +[Recursive Property]: {{< ref "#recursive" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[OperationFailedException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.MainDoc" >}} +[Duplicate Folder Paths]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.IndexesOfDuplicatePaths" >}} +[Null Or Empty Folder Paths]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.IndexesOfNullOrEmptyPaths" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[File & Folder Paths]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Paths.MainDoc" >}} + +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/get-file-information/_index.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/get-file-information/_index.md new file mode 100644 index 000000000..e2945e03a --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/get-file-information/_index.md @@ -0,0 +1,5 @@ +--- +title: "Get File Information" +linkTitle: "Get File Information" +description: "Get information about a file (i.e. file attributes, created, accessed and modified dates etc.)." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/get-file-information/get-file-information-block.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/get-file-information/get-file-information-block.md new file mode 100644 index 000000000..c81732e36 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/get-file-information/get-file-information-block.md @@ -0,0 +1,154 @@ +--- +title: "Get File Information" +linkTitle: "Get File Information" +description: "Gets information about a file (e.g. file attributes, created, accessed, modified dates etc.) at the specified file path." +--- + +{{< figure src="/blocks/files-get-information-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.FilesAndFolders.GetFileInformation.GetFileInformationBlock)
+ +## Description + +Gets [File Information][FileInformation Property] about a file (e.g. file attributes, created, accessed, modified dates etc.) at the specified [File Path][FilePath Property]. + +## Examples + +### Get file information + +This example will get information about `"C:\Source\File.txt"`. + +In this example assume `"C:\Source\File.txt"`: + +* Is on a server where local time and UTC time are the same (e.g. in UK). +* Was created at 10.00am on the 1st January 2021. +* Was last modified at 10.00am on the 1st January 2021. +* Was last accessed at 1.00pm on the 10th January 2021. +* Is 100 bytes in size. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [File Path][FilePath Property] | `($)FilePath`, with value `@"C:\Source\File.txt"` | `($)FilePath` is a variable of type [String][] | +| [File Information][FileInformation Property] | `($)FileInformation`, with no value | `($)FilePath` is a variable that will be set to a [FileInformation][] value | + +#### Result + +Getting file information for `"C:\Source\File.txt"` results in the variable `($)FileInformation` being updated to the following: + +```json +{ + "Extension": ".exe", + "Path": "C:\\Source\\File.txt", + "Name": "File.txt", + "ParentRoot": "C:\\", + "ParentPath": "C:\\Source", + "SizeInBytes": 100, + "IsArchive": false, + "IsCompressed": false, + "IsEncrypted": false, + "IsHidden": false, + "IsNormal": false, + "IsTemporary": false, + "IsReadOnly": false, + "IsSystem": false, + "CreationTimeLocal": "2021-01-01T10:00:00+00:00", + "CreationTimeUtc": "2021-01-01T10:00:00Z", + "LastAccessTimeLocal": "2021-01-10T13:00:00+00:00", + "LastAccessTimeUtc": "2021-01-10T13:00:00Z", + "LastWriteTimeLocal": "2021-01-01T10:00:00+00:00", + "LastWriteTimeUtc": "2021-01-01T10:00:00Z" +} +``` + +*** + +## Properties + +### File Path + +The [File Path][FilePath Property] to get the [File Information][FileInformation Property] of. + +The [File Path][FilePath Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +For information about the supported file path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FilePath` with no value | + +### File Information + +The [File Information][FileInformation Property] retrieved from the file at the specified [File Path][FilePath Property]. + +[File Information][FileInformation Property] includes file attributes, create, access and write dates and path details. + +For more information see the [example][] above, or the [FileInformation][] data type. + +| | | +|--------------------|---------------------------| +| Data Type | [FileInformation][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FileInformation` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [OperationFailedException][] | The [File Path][FilePath Property] points to a folder. | +| | The [File Path][FilePath Property] contains leading spaces. | +| | The [File Path][FilePath Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any folder or file names. | +| | The [File Path][FilePath Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| | The [File Path][FilePath Property] is invalid (for example, it is on an unmapped drive). | +| | The user the flow is executing as does not have the required permissions to get information about the file at the [File Path][FilePath Property]. | +| | An unexpected error occurs when getting information for the file at the [File Path][FilePath Property]. | +| [PropertyEmptyException][] | Thrown when [File Path][FilePath Property] is empty (i.e. `""`). | +| [PropertyNullException][] | Thrown when [File Path][FilePath Property] is `null`. | + +## Remarks + +### File Paths + +For information about the supported file path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +### File Path needs escaping + +[File Path][FilePath Property] requires `\` characters to be escaped, otherwise each unescaped `\` will be reported as an `Invalid property value` message when trying to debug the flow. + +Escaping can be done in two ways: + +* Escaping the `\` character with another `\` character (e.g. `"C:\\Source\\File.txt"`), or +* Prepending an `@` character before the start of the [File Path][FilePath Property] (e.g. `@"C:\Source\File.txt"`). + +[FilePath Property]: {{< ref "#file-path" >}} +[FileInformation Property]: {{< ref "#file-information" >}} +[Example]: {{< ref "#get-file-information" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[OperationFailedException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.MainDoc" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[File & Folder Paths]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Paths.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[FileInformation]: {{< url path="Cortex.Reference.DataTypes.FilesAndFolders.FileInformation.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/get-folder-content/_index.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/get-folder-content/_index.md new file mode 100644 index 000000000..4c4696535 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/get-folder-content/_index.md @@ -0,0 +1,5 @@ +--- +title: "Get Folder Content" +linkTitle: "Get Folder Content" +description: "Get the paths of files or folders in another folder." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/get-folder-content/get-folder-content-block.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/get-folder-content/get-folder-content-block.md new file mode 100644 index 000000000..7c5830db9 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/get-folder-content/get-folder-content-block.md @@ -0,0 +1,389 @@ +--- +title: "Get Folder Content" +linkTitle: "Get Folder Content" +description: "Gets the paths of files or folders under the specified folder path." +--- + +{{< figure src="/blocks/folders-get-content-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.FilesAndFolders.GetFolderContent.GetFolderContentBlock)
+ +## Description + +Gets the [Paths][Paths Property] of files or folders under the specified [Folder Path][FolderPath Property] whose name matches the given [Search Pattern][SearchPattern Property]. + +The returned [Paths][Paths Property] can then be used in other file and folder blocks that require paths. + +Additional options can be specified: + +* [Search Options][SearchOptions Property] can be specified to choose whether to use a ContainsText, PatternMatching or Regex search. +* [Content Options][ContentOptions Property] can be specified to choose whether to search for files or folders. +* A [Recursive][Recursive Property] option can specified to choose whether to search only in the specified [Folder Path][FolderPath Property], or include all subfolders. +* A [Comparison Type][ComparisonType Property] option can specified to choose how it is determined whether the file or folder name matches the [Search Pattern][SearchPattern Property] (e.g. whether the search is case-sensitive or case-insensitive). + +## Examples + +### Get paths of files in a folder whose names contain a given text + +This example will get the paths of all files in `"C:\Source\Folder"` that contain `"file"` in their name. + +It will perform a case-insensitive search, and will not get any paths of folders or any paths of files that reside in subfolders of `"C:\Source\Folder"`. + +In this example assume `"C:\Source\Folder"` contains: + +* A file named `"FileInFolder1.txt"`. +* A file named `"FileInFolder2.txt"`. +* A folder named `"SubFolder"` which contains: + * A file named `"FileInSubFolder1.txt"`. + * A file named `"FileInSubFolder2.txt"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Path][FolderPath Property] | `($)FolderPath`, with value `@"C:\Source\Folder"` | `($)FolderPath` is a variable of type [String][] | +| [Search Pattern][SearchPattern Property] | `($)SearchPattern`, with value `"file"` | `($)SearchPattern` is a variable of type [String][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Content Options][ContentOptions Property] | `($)ContentOptions`, with value `ContentOptions.Files` | `($)ContentOptions` is a variable of type [ContentOptions][] | +| [Recursive][Recursive Property] | `($)Recursive`, with value `false` | `($)Recursive` is a variable of type [Boolean][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.OrdinalIgnoreCase` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Paths][Paths Property] | `($)Paths`, with no value | `($)Paths` is a variable that will be set to an [IList][]<[String][]> value | + +#### Result + +Getting all file paths that contain `"file"` (case-insensitive) in `"C:\Source\Folder"` excluding any of its subfolders, results in the variable `($)Paths` being updated to the following: + +```json +[ + "C:\\Source\\Folder\\FileInFolder1.txt", + "C:\\Source\\Folder\\FileInFolder2.txt" +] +``` + +*** + +### Get paths of files in a folder (and its subfolders) whose names contain a given text + +This example will get the paths of all files in `"C:\Source\Folder"` or any of its subfolders, that contain `"File"` in their name. + +It will perform a case-sensitive search and will not get any paths of folders. + +In this example assume `"C:\Source\Folder"` contains: + +* A file named `"FileInFolder1.txt"`. +* A file named `"FileInFolder2.txt"`. +* A folder named `"SubFolder"` which contains: + * A file named `"FileInSubFolder1.txt"`. + * A file named `"FileInSubFolder2.txt"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Path][FolderPath Property] | `($)FolderPath`, with value `@"C:\Source\Folder"` | `($)FolderPath` is a variable of type [String][] | +| [Search Pattern][SearchPattern Property] | `($)SearchPattern`, with value `"File"` | `($)SearchPattern` is a variable of type [String][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Content Options][ContentOptions Property] | `($)ContentOptions`, with value `ContentOptions.Files` | `($)ContentOptions` is a variable of type [ContentOptions][] | +| [Recursive][Recursive Property] | `($)Recursive`, with value `true` | `($)Recursive` is a variable of type [Boolean][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Paths][Paths Property] | `($)Paths`, with no value | `($)Paths` is a variable that will be set to an [IList][]<[String][]> value | + +#### Result + +Getting all file paths that contain `"File"` (case-sensitive) in `"C:\Source\Folder"` or any of its subfolders, results in the variable `($)Paths` being updated to the following: + +```json +[ + "C:\\Source\\Folder\\FileInFolder1.txt", + "C:\\Source\\Folder\\FileInFolder2.txt", + "C:\\Source\\Folder\\SubFolder\\FileInSubFolder1.txt", + "C:\\Source\\Folder\\SubFolder\\FileInSubFolder2.txt" +] +``` + +*** + +### Get paths of folders in a folder whose names match a given pattern + +This example will get the paths of all folders that are in `"C:\Source\Folder"`, and match the pattern `"*"` in their name. + +It will perform a case-insensitive search, will not get any paths of files, and will match any folder in `"C:\Source\Folder"`. It will not match any child folders of folders in `"C:\Source\Folder"`. + +In this example assume `"C:\Source\Folder"` contains: + +* A file named `"FileInFolder1.txt"`. +* A file named `"FileInFolder2.txt"`. +* A folder named `"SubFolder"` which contains: + * A file named `"FileInSubFolder1.txt"`. + * A file named `"FileInSubFolder2.txt"`. + * An empty folder named `"NestedSubFolder"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Path][FolderPath Property] | `($)FolderPath`, with value `@"C:\Source\Folder"` | `($)FolderPath` is a variable of type [String][] | +| [Search Pattern][SearchPattern Property] | `($)SearchPattern`, with value `"*"` | `($)SearchPattern` is a variable of type [String][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.PatternMatching` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Content Options][ContentOptions Property] | `($)ContentOptions`, with value `ContentOptions.Folders` | `($)ContentOptions` is a variable of type [ContentOptions][] | +| [Recursive][Recursive Property] | `($)Recursive`, with value `false` | `($)Recursive` is a variable of type [Boolean][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.OrdinalIgnoreCase` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Paths][Paths Property] | `($)Paths`, with no value | `($)Paths` is a variable that will be set to an [IList][]<[String][]> value | + +#### Result + +Getting all folder paths that match the pattern `"*"` (case-insensitive) in `"C:\Source\Folder"` excluding any of its subfolders, results in the variable `($)Paths` being updated to the following: + +```json +[ + "C:\\Source\\Folder\\SubFolder" +] +``` + +*** + +### Get paths of folders in a folder (and its subfolders) whose names match a given regex + +This example will get the paths of all folders that are in `"C:\Source\Folder"` or any of its subfolders, and match the regex `"Folder$"` in their name. + +It will perform a case-sensitive search, will not get any paths of files, and will match folders whose name ends with `"Folder"`. + +In this example assume `"C:\Source\Folder"` contains: + +* A file named `"FileInFolder1.txt"`. +* A file named `"FileInFolder2.txt"`. +* A folder named `"SubFolder"` which contains: + * A file named `"FileInSubFolder1.txt"`. + * A file named `"FileInSubFolder2.txt"`. + * An empty folder named `"NestedSubFolder"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Path][FolderPath Property] | `($)FolderPath`, with value `@"C:\Source\Folder"` | `($)FolderPath` is a variable of type [String][] | +| [Search Pattern][SearchPattern Property] | `($)SearchPattern`, with value `"Folder$"` | `($)SearchPattern` is a variable of type [String][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Content Options][ContentOptions Property] | `($)ContentOptions`, with value `ContentOptions.Folders` | `($)ContentOptions` is a variable of type [ContentOptions][] | +| [Recursive][Recursive Property] | `($)Recursive`, with value `true` | `($)Recursive` is a variable of type [Boolean][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Paths][Paths Property] | `($)Paths`, with no value | `($)Paths` is a variable that will be set to an [IList][]<[String][]> value | + +#### Result + +Getting all folder paths that match the regex `"Folder$"` (case-sensitive) in `"C:\Source\Folder"` or any of its subfolders, results in the variable `($)Paths` being updated to the following: + +```json +[ + "C:\\Source\\Folder\\SubFolder", + "C:\\Source\\Folder\\SubFolder\\NestedSubFolder" +] +``` + +*** + +## Properties + +### Folder Path + +The [Folder Path][FolderPath Property] to get the [Paths][Paths Property] of files or folders whose name matches the given [Search Pattern][SearchPattern Property]. + +The [Folder Path][FolderPath Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +For information about the supported folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FolderPath` with no value | + +### Search Pattern + +The [Search Pattern][SearchPattern Property] file or folder names must match to be included in the returned [Paths][Paths Property]. + +Only file or folder names are matched, not the whole path. + +A [Search Pattern][SearchPattern Property] of `null` or empty (i.e. `""`) means match any name; all additional block options such as [Content Options][ContentOptions Property] etc. still take effect. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | No value (defaults to `""`) | + +### Search Options + +[Search Options][SearchOptions Property] can be specified to choose whether [Search Pattern][SearchPattern Property] should be interpreted as a ContainsText, PatternMatching or Regex search: + +* `SearchOptions.ContainsText` matches text exactly; as long as the file or folder name contains the text specified in [Search Pattern][SearchPattern Property] it will be considered a match. +* `SearchOptions.PatternMatching` allows wildcard text matching using [Pattern Matching Syntax][]: + * `*` wildcard character can be used to match `0` or more characters. + * `?` wildcard character can be used to match `0` or `1` character. + * All other characters are treated as a literal character. +* `SearchOptions.Regex` allows regex text matching using [.Net Regex Syntax][Regex Syntax]. + +Please note that with `SearchOptions.ContainsText` overlapping matches are detected (e.g. searching for `"aa"` in `"aaa"` matches `"aa"` at index `0` and `"aa"` at index `1`). With `SearchOptions.Regex` only `"aa"` at index `0` will be matched. + +| | | +|--------------------|---------------------------| +| Data Type | [SearchOptions][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Literal][] | +| Default Value | `ContainsText` | + +### Content Options + +[Content Options][ContentOptions Property] can be specified to choose whether [Search Pattern][SearchPattern Property] should be match file or folder names. + +* ContentOptions.Files restricts the search to match only files. +* ContentOptions.Folders restricts the search to match only folders. + +| | | +|--------------------|---------------------------| +| Data Type | [ContentOptions][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `Files` | + +### Recursive + +[Recursive][Recursive Property] option can specified to choose whether to search only in the specified [Folder Path][FolderPath Property], or include all subfolders. + +To search only in the specified [Folder Path][FolderPath Property] set [Recursive][Recursive Property] to `false`, or to include all subfolders set [Recursive][Recursive Property] to `true`. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `false` | + +### Comparison Type + +The [Comparison Type][ComparisonType Property] specifying the rules used to match file or folder names against the given [Search Pattern][SearchPattern Property]. + +For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [StringComparison][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Literal][] | +| Default Value | `Ordinal` | + +### Paths + +All [Paths][Paths Property] that match the specified [Search Pattern][SearchPattern Property] based on the other specified options. + +The [Paths][Paths Property] returned will be absolute paths, and based on the [Folder Path][FolderPath Property] provided (i.e. if a UNC path is specified, all returned paths will be UNC paths). + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[String][]> | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Paths` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [ArgumentException][] | Thrown when [Search Options][SearchOptions Property] is not one of the specified [SearchOptions][] types (e.g. `(SearchOptions)10`). | +| | Thrown when [Content Options][ContentOptions Property] is not one of the specified [ContentOptions][] types (e.g. `(ContentOptions)10`). | +| | Thrown when [Comparison Type][ComparisonType Property] is not one of the specified [StringComparison][] types (e.g. `(StringComparison)10`). | +| [OperationFailedException][] | The [Folder Path][FolderPath Property] points to a file. | +| | The [Folder Path][FolderPath Property] contains leading spaces. | +| | The [Folder Path][FolderPath Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any folder names. | +| | The [Folder Path][FolderPath Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| | The [Folder Path][FolderPath Property] is invalid (for example, it is on an unmapped drive). | +| | The user the flow is executing as does not have the required permissions to get the paths of files or folders in the [Folder Path][FolderPath Property], or any of its subfolders if [Recursive][Recursive Property] is `true`. | +| | An unexpected error occurs when getting the paths of files or folders in the [Folder Path][FolderPath Property], or any of its subfolders if [Recursive][Recursive Property] is `true`. | +| [PropertyEmptyException][] | Thrown when [Folder Path][FolderPath Property] is empty (i.e. `""`). | +| [PropertyNullException][] | Thrown when [Folder Path][FolderPath Property] is `null`. | +| [RegexMatchTimeoutException][] | Thrown when using [Search Options][SearchOptions Property] is either `SearchOptions.Regex` or `SearchOptions.PatternMatching` and the execution time of the search exceeds `30` seconds. | +| [RegexParsingFailedException][] | Thrown when [Search Options][SearchOptions Property] is `SearchOptions.Regex` and the [Search Pattern][SearchPattern Property] is not a valid regex (e.g. `(`). | + +## Remarks + +### Folder Paths + +For information about the supported folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +### Folder Path needs escaping + +[Folder Path][FolderPath Property] requires `\` characters to be escaped, otherwise each unescaped `\` will be reported as an `Invalid property value` message when trying to debug the flow. + +Escaping can be done in two ways: + +* Escaping the `\` character with another `\` character (e.g. `"C:\\Source\\"`), or +* Prepending an `@` character before the start of the [Folder Path][FolderPath Property] (e.g. `@"C:\Source"`). + +### Null or empty Search Pattern + +A `null` or empty (i.e. `""`) [Search Pattern][SearchPattern Property] means match any name; all additional block options such as [Content Options][ContentOptions Property] etc. still take effect. + +### Comparison Types + +For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. + +### Handling of Exceptions + +If an exception occurs when trying to match a file or folder name, it will be recorded and the block will continue processing the remaining files or folders. Once all files or folders are processed, recorded exceptions will be thrown within an [OperationFailedException][]. + +### Known Limitations + +If [Search Options][SearchOptions Property] is set to `SearchOptions.Regex` or `SearchOptions.PatternMatching` and [Comparison Type][ComparisonType Property] is set to `StringComparison.CurrentCulture`, some characters such as `æ` that is equivalent to `ae` may not evaluate as equal. + +[FolderPath Property]: {{< ref "#folder-path" >}} +[SearchPattern Property]: {{< ref "#search-pattern" >}} +[SearchOptions Property]: {{< ref "#search-options" >}} +[ContentOptions Property]: {{< ref "#content-options" >}} +[Recursive Property]: {{< ref "#recursive" >}} +[ComparisonType Property]: {{< ref "#comparison-type" >}} +[Paths Property]: {{< ref "#paths" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.MainDoc" >}} +[ComparisonTypes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.MainDoc" >}} +[Ordinal]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.Ordinal" >}} +[OrdinalIgnoreCase]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.OrdinalIgnoreCase" >}} + +[ArgumentException]: {{< url path="MSDocs.DotNet.Api.System.ArgumentException" >}} +[OperationFailedException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.MainDoc" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} +[RegexMatchTimeoutException]: {{< url path="MSDocs.DotNet.Api.System.Text.RegularExpressions.RegexMatchTimeoutException" >}} +[RegexParsingFailedException]: {{< url path="Cortex.Reference.Exceptions.Text.Regex.RegexParsingFailedException.MainDoc" >}} + +[File & Folder Paths]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Paths.MainDoc" >}} +[Pattern Matching Syntax]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.PatternMatchingSyntax.MainDoc" >}} +[Regex Syntax]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.RegexSyntax.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[SearchOptions]: {{< url path="Cortex.Reference.DataTypes.Text.SearchOptions.MainDoc" >}} +[ContentOptions]: {{< url path="Cortex.Reference.DataTypes.FilesAndFolders.ContentOptions.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} +[StringComparison]: {{< url path="Cortex.Reference.DataTypes.Text.StringComparison.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/get-folder-information/_index.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/get-folder-information/_index.md new file mode 100644 index 000000000..9b3213535 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/get-folder-information/_index.md @@ -0,0 +1,5 @@ +--- +title: "Get Folder Information" +linkTitle: "Get Folder Information" +description: "Get information about a folder (i.e. folder attributes, created, accessed and modified dates etc.)." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/get-folder-information/get-folder-information-block.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/get-folder-information/get-folder-information-block.md new file mode 100644 index 000000000..ab7c0b1e2 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/get-folder-information/get-folder-information-block.md @@ -0,0 +1,158 @@ +--- +title: "Get Folder Information" +linkTitle: "Get Folder Information" +description: "Gets information about a folder (e.g. folder attributes, created, accessed, modified dates etc.) at the specified folder path." +--- + +{{< figure src="/blocks/folders-get-information-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.FilesAndFolders.GetFolderInformation.GetFolderInformationBlock)
+ +## Description + +Gets [Folder Information][FolderInformation Property] about a folder (e.g. folder attributes, created, accessed, modified dates etc.) at the specified [Folder Path][FolderPath Property]. + +## Examples + +### Get folder information + +This example will get information about `"C:\Source\Folder"`. + +In this example assume `"C:\Source\Folder"`: + +* Is on a server where local time and UTC time are the same (e.g. in UK). +* Was created at 10.00am on the 1st January 2021. +* Was last modified at 10.00am on the 1st January 2021. +* Was last accessed at 1.00pm on the 10th January 2021. +* Contains a single file named `"File.txt"` which is 100 bytes in size. +* Contains a single empty folder named `"SubFolder"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Path][FolderPath Property] | `($)FolderPath`, with value `@"C:\Source\Folder"` | `($)FolderPath` is a variable of type [String][] | +| [Folder Information][FolderInformation Property] | `($)FolderInformation`, with no value | `($)FolderPath` is a variable that will be set to a [FolderInformation][] value | + +#### Result + +Getting folder information for `"C:\Source\Folder"` results in the variable `($)FolderInformation` being updated to the following: + +```json +{ + "FileCount": 1, + "FolderCount": 1, + "TotalItemCount": 2, + "Path": "C:\\Source\\Folder", + "Name": "Test", + "ParentRoot": "C:\\", + "ParentPath": "C:\\Source", + "SizeInBytes": 100, + "IsArchive": false, + "IsCompressed": false, + "IsEncrypted": false, + "IsHidden": false, + "IsNormal": false, + "IsTemporary": false, + "IsReadOnly": false, + "IsSystem": false, + "CreationTimeLocal": "2021-01-01T10:00:00+00:00", + "CreationTimeUtc": "2021-01-01T10:00:00Z", + "LastAccessTimeLocal": "2021-01-10T13:00:00+00:00", + "LastAccessTimeUtc": "2021-01-10T13:00:00Z", + "LastWriteTimeLocal": "2021-01-01T10:00:00+00:00", + "LastWriteTimeUtc": "2021-01-01T10:00:00Z" +} +``` + +*** + +## Properties + +### Folder Path + +The [Folder Path][FolderPath Property] to get the [Folder Information][FolderInformation Property] of. + +The [Folder Path][FolderPath Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +For information about the supported folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FolderPath` with no value | + +### Folder Information + +The [Folder Information][FolderInformation Property] retrieved from the folder at the specified [Folder Path][FolderPath Property]. + +[Folder Information][FolderInformation Property] includes folder attributes, create, access and write dates, path details and folder and file counts. + +For more information see the [example][] above, or the [FolderInformation][] data type. + +| | | +|--------------------|---------------------------| +| Data Type | [FolderInformation][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FolderInformation` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [OperationFailedException][] | The [Folder Path][FolderPath Property] points to a file. | +| | The [Folder Path][FolderPath Property] contains leading spaces. | +| | The [Folder Path][FolderPath Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any folder names. | +| | The [Folder Path][FolderPath Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| | The [Folder Path][FolderPath Property] is invalid (for example, it is on an unmapped drive). | +| | The user the flow is executing as does not have the required permissions to get information about the folder at the [Folder Path][FolderPath Property]. | +| | An unexpected error occurs when getting information for the folder at the [Folder Path][FolderPath Property] or any of its content. | +| [PropertyEmptyException][] | Thrown when [Folder Path][FolderPath Property] is empty (i.e. `""`). | +| [PropertyNullException][] | Thrown when [Folder Path][FolderPath Property] is `null`. | + +## Remarks + +### Folder Paths + +For information about the supported folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +### Folder Path needs escaping + +[Folder Path][FolderPath Property] requires `\` characters to be escaped, otherwise each unescaped `\` will be reported as an `Invalid property value` message when trying to debug the flow. + +Escaping can be done in two ways: + +* Escaping the `\` character with another `\` character (e.g. `"C:\\Source\\"`), or +* Prepending an `@` character before the start of the [Folder Path][FolderPath Property] (e.g. `@"C:\Source"`). + +[FolderPath Property]: {{< ref "#folder-path" >}} +[FolderInformation Property]: {{< ref "#folder-information" >}} + +[Example]: {{< ref "#get-folder-information" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[OperationFailedException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.MainDoc" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[File & Folder Paths]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Paths.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[FolderInformation]: {{< url path="Cortex.Reference.DataTypes.FilesAndFolders.FolderInformation.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/move-file/_index.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/move-file/_index.md new file mode 100644 index 000000000..72624ef3e --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/move-file/_index.md @@ -0,0 +1,5 @@ +--- +title: "Move File(s)" +linkTitle: "Move File(s)" +description: "Move a file or multiple files." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/move-file/move-file-block.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/move-file/move-file-block.md new file mode 100644 index 000000000..fde37d7c6 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/move-file/move-file-block.md @@ -0,0 +1,223 @@ +--- +title: "Move File" +linkTitle: "Move File" +description: "Moves a file at the specified file path to the given destination path." +--- + +{{< figure src="/blocks/files-move-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.FilesAndFolders.MoveFile.MoveFileBlock)
+ +## Description + +Moves a file at the specified [File Path][FilePath Property] to the given [Destination Path][DestinationPath Property], with an option to [Overwrite][Overwrite Property] the file if it already exists. + +## Examples + +### Move a file to a folder keeping the same file name + +This example will move `"C:\Source\OriginalFile.txt"` to `"C:\Destination"`, with the same file name of `"OriginalFile.txt"`. + +In this example assume `"C:\Destination"` does not already contain a file named `"OriginalFile.txt"`, so overwrite can be set to either `true` or `false` and it will still work. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [File Path][FilePath Property] | `($)FilePath`, with value `@"C:\Source\OriginalFile.txt"` | `($)FilePath` is a variable of type [String][] | +| [Destination Path][DestinationPath Property] | `($)DestinationPath`, with value `@"C:\Destination"` | `($)DestinationPath` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `false` | `($)Overwrite` is a variable of type [Boolean][] | + +#### Result + +Moving `"C:\Source\OriginalFile.txt"` to `"C:\Destination"` that does not already contain a file named `"OriginalFile.txt"` will: + +* Move `"C:\Source\OriginalFile.txt"` to `"C:\Destination\OriginalFile.txt"` with: + * The content left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [File attributes][] left unchanged. + +*** + +### Move a file to a folder with a new name + +This example will move `"C:\Source\OriginalFile.txt"` to `"C:\Destination"`, with a new file name of `"NewFile.txt"`. + +To rename the file when it is being moved, please note that the [Destination Path][DestinationPath Property] must be a file path, rather than a folder path (e.g. `"C:\Destination\NewFile.txt"` rather than `"C:\Destination"`). + +In this example assume `"C:\Destination"` does not already contain a file named `"NewFile.txt"`, so overwrite can be set to either `true` or `false` and it will still work. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [File Path][FilePath Property] | `($)FilePath`, with value `@"C:\Source\OriginalFile.txt"` | `($)FilePath` is a variable of type [String][] | +| [Destination Path][DestinationPath Property] | `($)DestinationPath`, with value `@"C:\Destination\NewFile.txt"` | `($)DestinationPath` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `false` | `($)Overwrite` is a variable of type [Boolean][] | + +#### Result + +Move `"C:\Source\OriginalFile.txt"` to the path `"C:\Destination\NewFile.txt"` that does not already exist will: + +* Move `"C:\Source\OriginalFile.txt"` to `"C:\Destination\NewFile.txt"` with: + * The content left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [File attributes][] left unchanged. + +*** + +### Move a file to a folder overwriting any file that already exists with the same name + +This example will move `"C:\Source\FileAlreadyExists.txt"` to `"C:\Destination"`, with the same file name of `"FileAlreadyExists.txt"`. + +In this example assume `"C:\Destination"` already contains a file named `"FileAlreadyExists.txt"`, so overwrite must be set to `true` to ensure the content of the existing file can be overwritten. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [File Path][FilePath Property] | `($)FilePath`, with value `@"C:\Source\FileAlreadyExists.txt"` | `($)FilePath` is a variable of type [String][] | +| [Destination Path][DestinationPath Property] | `($)DestinationPath`, with value `@"C:\Destination"` | `($)DestinationPath` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `true` | `($)Overwrite` is a variable of type [Boolean][] | + +#### Result + +Moving `"C:\Source\FileAlreadyExists.txt"` to `"C:\Destination"` and overwriting the existing file named `"FileAlreadyExists.txt"` will: + +* Overwrite the existing file at `"C:\Destination\FileAlreadyExists.txt"` with: + * The content copied from `"C:\Source\FileAlreadyExists.txt"`. + * The `Date Created` copied from `"C:\Source\FileAlreadyExists.txt"`. + * The `Date Accessed` copied from `"C:\Source\FileAlreadyExists.txt"` + * The `Date Modified` copied from `"C:\Source\FileAlreadyExists.txt"`. + * The [File Attributes][] copied from `"C:\Source\FileAlreadyExists.txt"`. + +*** + +## Properties + +### File Path + +The [File Path][FilePath Property] to move the file from. + +The [File Path][FilePath Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +For information about the supported file path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FilePath` with no value | + +### Destination Path + +The [Destination Path][DestinationPath Property] to move the file to. + +The [Destination Path][DestinationPath Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +The [Destination Path][DestinationPath Property] can either point to a folder or a file: + +* If it points to a folder, the moved file will have the name specified in the [File Path][FilePath Property]. +* If it points to a file, the moved file will have the name specified in the [Destination Path][DestinationPath Property]. + +Any non-existing folders within the [Destination Path][DestinationPath Property] will be automatically created. + +For information about the supported file and folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | No value (defaults to `""`) | + +### Overwrite + +Option to [Overwrite][Overwrite Property] the file in the [Destination Path][DestinationPath Property] if it already exists. + +If the file exists, [Overwrite][Overwrite Property] must be set to `true`, otherwise an [OperationFailedException][] will be thrown. By default, this is set to `false` to avoid implicit and accidental overwriting of existing files. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `false` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [InvalidPathException][] | The [Destination Path][DestinationPath Property] contains leading spaces. | +| | The [Destination Path][DestinationPath Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any file or folder names. | +| | The [Destination Path][DestinationPath Property] (if it points to a file), or the [Destination Path][DestinationPath Property] (if it points to a folder) plus the file name, exceeds the system-defined maximum length (typically 32,767 characters). | +| [OperationFailedException][] | The [File Path][FilePath Property] does not exist. | +| | The [File Path][FilePath Property] points to a folder. | +| | The [File Path][FilePath Property] contains leading spaces. | +| | The [File Path][FilePath Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any file or folder names. | +| | The [File Path][FilePath Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| | The [File Path][FilePath Property] or [Destination Path][DestinationPath Property] is invalid (for example, it is on an unmapped drive). | +| | The file in the specified [Destination Path][DestinationPath Property] exists and overwrite is `false`. | +| | The file in the specified [Destination Path][DestinationPath Property] exists, is read-only and overwrite is `true`. | +| | The user the flow is executing as does not have the required permissions to move the file (e.g. not having read access to the [File Path][FilePath Property] or write access to the [Destination Path][DestinationPath Property]). | +| | An unexpected error occurs when moving the file. | +| [PropertyEmptyException][] | Thrown when [File Path][FilePath Property] or [Destination Path][DestinationPath Property] are empty (i.e. `""`). | +| [PropertyNullException][] | Thrown when [File Path][FilePath Property] or [Destination Path][DestinationPath Property] are `null`. | + +## Remarks + +### File and Folder Paths + +For information about the supported file and folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +### File Path and Destination Path need escaping + +[File Path][FilePath Property] and [Destination Path][DestinationPath Property] require `\` characters to be escaped, otherwise each unescaped `\` will be reported as an `Invalid property value` message when trying to debug the flow. + +Escaping can be done in two ways: + +* Escaping the `\` character with another `\` character (e.g. `"C:\\Source\\OriginalFile.txt"`), or +* Prepending an `@` character before the start of the [File Path][FilePath Property] (e.g. `@"C:\Source\OriginalFile.txt"`) and [Destination Path][DestinationPath Property] (e.g. `@"C:\Destination"`). + +### File Attributes + +When moving a file from the [File Path][FilePath Property] to the new [Destination Path][DestinationPath Property], all of the file's attributes will also be moved. + +For information about the file attributes (i.e. ReadOnly, Hidden, Archive etc.), please see [File & Folder Attributes][]. + +[FilePath Property]: {{< ref "#file-path" >}} +[DestinationPath Property]: {{< ref "#destination-path" >}} +[Overwrite Property]: {{< ref "#overwrite" >}} + +[File Attributes]: {{< ref "#file-attributes" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[InvalidPathException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.InvalidPathException.MainDoc" >}} +[OperationFailedException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.MainDoc" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[File & Folder Attributes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Attributes.MainDoc" >}} +[File & Folder Paths]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Paths.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/move-file/move-files-block.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/move-file/move-files-block.md new file mode 100644 index 000000000..c223d3da7 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/move-file/move-files-block.md @@ -0,0 +1,216 @@ +--- +title: "Move Files" +linkTitle: "Move Files" +description: "Moves files at the specified file paths to the given destination path." +--- + +{{< figure src="/blocks/files-move-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.FilesAndFolders.MoveFile.MoveFilesBlock)
+ +## Description + +Moves files at the specified [File Paths][FilePaths Property] to the given [Destination Path][DestinationPath Property], with an option to [Overwrite][Overwrite Property] the files if they already exist. + +## Examples + +### Move files to a folder keeping the same file names + +This example will move `["C:\Source\OriginalFile1.txt", "C:\Source\OriginalFile2.txt"]` to `"C:\Destination"`, with the same file names of `"OriginalFile1.txt"` and `"OriginalFile2.txt"`. + +In this example assume `"C:\Destination"` does not already contain a file named `"OriginalFile1.txt"` or a file named `"OriginalFile2.txt"`, so overwrite can be set to either `true` or `false` and it will still work. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [File Paths][FilePaths Property] | `($)FilePaths`, with value `[@"C:\Source\OriginalFile1.txt", @"C:\Source\OriginalFile2.txt"]` | `($)FilePaths` is a variable of type [IEnumerable][]<[String][]> | +| [Destination Path][DestinationPath Property] | `($)DestinationPath`, with value `@"C:\Destination"` | `($)DestinationPath` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `false` | `($)Overwrite` is a variable of type [Boolean][] | + +#### Result + +Moving `["C:\Source\OriginalFile1.txt", "C:\Source\OriginalFile2.txt"]` to `"C:\Destination"` that does not already contain files named `"OriginalFile1.txt"` and `"OriginalFile2.txt"` will: + +* Move `"C:\Source\OriginalFile1.txt"` to `"C:\Destination\OriginalFile1.txt"` with: + * The content left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [File attributes][] left unchanged. +* Move `"C:\Source\OriginalFile2.txt"` to `"C:\Destination\OriginalFile2.txt"` with: + * The content left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [File attributes][] left unchanged. + +*** + +### Move files to a folder overwriting any files that already exists with the same names + +This example will move `["C:\Source\FileAlreadyExists1.txt", "C:\Source\FileAlreadyExists2.txt"]` to `"C:\Destination"`, with the same file names of `"FileAlreadyExists1.txt"` and `"FileAlreadyExists2.txt"`. + +In this example assume `"C:\Destination"` already contains a file named `"FileAlreadyExists1.txt"` and a file named `"FileAlreadyExists2.txt"`, so overwrite must be set to `true` to ensure the content of the existing files can be overwritten. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [File Paths][FilePaths Property] | `($)FilePaths`, with value `[@"C:\Source\FileAlreadyExists1.txt", @"C:\Source\FileAlreadyExists2.txt"]` | `($)FilePaths` is a variable of type [IEnumerable][]<[String][]> | +| [Destination Path][DestinationPath Property] | `($)DestinationPath`, with value `@"C:\Destination"` | `($)DestinationPath` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `true` | `($)Overwrite` is a variable of type [Boolean][] | + +#### Result + +Moving `["C:\Source\FileAlreadyExists1.txt", "C:\Source\FileAlreadyExists2.txt"]` to `"C:\Destination"` and overwriting the existing files named `"FileAlreadyExists1.txt"` and `"FileAlreadyExists2.txt"` will: + +* Overwrite the existing file at `"C:\Destination\FileAlreadyExists1.txt"` with: + * The content copied from `"C:\Source\FileAlreadyExists1.txt"`. + * The `Date Created` copied from `"C:\Source\FileAlreadyExists1.txt"`. + * The `Date Accessed` copied from `"C:\Source\FileAlreadyExists1.txt"` + * The `Date Modified` copied from `"C:\Source\FileAlreadyExists1.txt"`. + * The [File Attributes][] copied from `"C:\Source\FileAlreadyExists1.txt"`. +* Overwrite the existing file at `"C:\Destination\FileAlreadyExists2.txt"` with: + * The content copied from `"C:\Source\FileAlreadyExists2.txt"`. + * The `Date Created` copied from `"C:\Source\FileAlreadyExists2.txt"`. + * The `Date Accessed` copied from `"C:\Source\FileAlreadyExists2.txt"`. + * The `Date Modified` copied from `"C:\Source\FileAlreadyExists2.txt"`. + * The [File Attributes][] copied from `"C:\Source\FileAlreadyExists2.txt"`. + +*** + +## Properties + +### File Paths + +The [File Paths][FilePaths Property] to move the files from. + +Each file path in [File Paths][FilePaths Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +For information about the supported file path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[String][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FilePaths` with no value | + +### Destination Path + +The [Destination Path][DestinationPath Property] to move the files to. + +The [Destination Path][DestinationPath Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +The [Destination Path][DestinationPath Property] must point to a folder, otherwise an [InvalidPathException][] will be thrown. + +The moved files will have the names specified in the [File Paths][FilePaths Property]. + +Any non-existing folders within the [Destination Path][DestinationPath Property] will be automatically created. + +For information about the supported file and folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | No value (defaults to `""`) | + +### Overwrite + +Option to [Overwrite][Overwrite Property] the files in the [Destination Path][DestinationPath Property] if they already exist. + +If any file exists, [Overwrite][Overwrite Property] must be set to `true`, otherwise an [OperationFailedException][] will be thrown. By default, this is set to `false` to avoid implicit and accidental overwriting of existing files. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `false` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [InvalidPathException][] | The [Destination Path][DestinationPath Property] does not point to a folder. | +| | The [Destination Path][DestinationPath Property] contains leading spaces. | +| | The [Destination Path][DestinationPath Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any file or folder names. | +| | The [Destination Path][DestinationPath Property] (if it points to a file), or the [Destination Path][DestinationPath Property] (if it points to a folder) plus the file name, exceeds the system-defined maximum length (typically 32,767 characters). | +| [OperationFailedException][] | Any file path in [File Paths][FilePaths Property] is `null` or empty (i.e. `""`). For more information, see [Null or Empty File Paths][]| +| | Any file path in [File Paths][FilePaths Property] is duplicated. For more information, see [Duplicate File Paths][] | +| | Any file path in [File Paths][FilePaths Property] does not exist. | +| | Any file path in [File Paths][FilePaths Property] points to a folder. | +| | Any file path in [File Paths][FilePaths Property] contains leading spaces. | +| | Any file path in [File Paths][FilePaths Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any file or folder names. | +| | Any file path in [File Paths][FilePaths Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| | Any file path in [File Paths][FilePaths Property] or [Destination Path][DestinationPath Property] is invalid (for example, it is on an unmapped drive). | +| | Any file path in [File Paths][FilePaths Property] exists in the specified [Destination Path][DestinationPath Property] and overwrite is `false`. | +| | Any file path in [File Paths][FilePaths Property] exists in the specified [Destination Path][DestinationPath Property] with the same name, is read-only and overwrite is `true`. | +| | The user the flow is executing as does not have the required permissions to move any file (e.g. not having read access to a file path in [File Paths][FilePaths Property] or write access to the [Destination Path][DestinationPath Property]). | +| | An unexpected error occurs when moving a file. | +| [PropertyEmptyException][] | Thrown when [File Paths][FilePaths Property] does not contain any items, or [Destination Path][DestinationPath Property] is empty (i.e. `""`). | +| [PropertyNullException][] | Thrown when [File Paths][FilePaths Property] or [Destination Path][DestinationPath Property] are `null`. | + +## Remarks + +### File and Folder Paths + +For information about the supported file and folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +### File Paths and Destination Path need escaping + +Each file path in [File Paths][FilePaths Property] and [Destination Path][DestinationPath Property] require `\` characters to be escaped, otherwise each unescaped `\` will be reported as an `Invalid property value` message when trying to debug the flow. + +Escaping can be done in two ways: + +* Escaping the `\` character with another `\` character (e.g. `"C:\\Source\\OriginalFile.txt"`), or +* Prepending an `@` character before the start of the +file path (e.g. `@"C:\Source\OriginalFile.txt"`) and [Destination Path][DestinationPath Property] (e.g. `@"C:\Destination"`). + +### File Attributes + +When moving a file in the [File Paths][FilePaths Property] to the new [Destination Path][DestinationPath Property], all of the file's attributes will also be moved. + +For information about the file attributes (i.e. ReadOnly, Hidden, Archive etc.), please see [File & Folder Attributes][]. + +### Handling of Exceptions + +If an exception occurs when trying to move a file in the [File Paths][FilePaths Property], it will be recorded and the block will continue processing the remaining files. Once all files are processed, recorded exceptions will be thrown within an [OperationFailedException][]. + +[FilePaths Property]: {{< ref "#file-paths" >}} +[DestinationPath Property]: {{< ref "#destination-path" >}} +[Overwrite Property]: {{< ref "#overwrite" >}} + +[File Attributes]: {{< ref "#file-attributes" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[InvalidPathException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.InvalidPathException.MainDoc" >}} +[OperationFailedException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.MainDoc" >}} +[Duplicate File Paths]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.IndexesOfDuplicatePaths" >}} +[Null Or Empty File Paths]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.IndexesOfNullOrEmptyPaths" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[File & Folder Attributes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Attributes.MainDoc" >}} +[File & Folder Paths]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Paths.MainDoc" >}} + +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/move-folder/_index.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/move-folder/_index.md new file mode 100644 index 000000000..facdb6dda --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/move-folder/_index.md @@ -0,0 +1,5 @@ +--- +title: "Move Folder(s)" +linkTitle: "Move Folder(s)" +description: "Move a folder or folders." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/move-folder/move-folder-block.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/move-folder/move-folder-block.md new file mode 100644 index 000000000..8ee7aa3e4 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/move-folder/move-folder-block.md @@ -0,0 +1,384 @@ +--- +title: "Move Folder" +linkTitle: "Move Folder" +description: "Moves a folder at the specified folder path to the given destination path." +--- + +{{< figure src="/blocks/folders-move-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.FilesAndFolders.MoveFolder.MoveFolderBlock)
+ +## Description + +Moves a folder at the specified [Folder Path][FolderPath Property] to the given [Destination Path][DestinationPath Property], with an option to move the folder and its content, or just its [Content Only][ContentOnly Property]. + +An option can also be specified to [Overwrite][Overwrite Property] anything being moved that already exists in the [Destination Path][DestinationPath Property]. + +## Examples + +### Move a folder and its content + +This example will move `"C:\Source\Folder"` and its content to `"C:\Destination"`. + +In this example assume: + +* `"C:\Source\Folder"` contains: + * An empty sub-folder named `"SubFolder"`. + * A file named `"File.txt"`. +* `"C:\Destination"` does not already contain a folder named `"Folder"`, so overwrite can be set to either `true` or `false` and it will still work. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Path][FolderPath Property] | `($)FolderPath`, with value `@"C:\Source\Folder"` | `($)FolderPath` is a variable of type [String][] | +| [Destination Path][DestinationPath Property] | `($)DestinationPath`, with value `@"C:\Destination"` | `($)DestinationPath` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `false` | `($)Overwrite` is a variable of type [Boolean][] | +| [Content Only][ContentOnly Property] | `($)ContentOnly`, with value `false` | `($)ContentOnly` is a variable of type [Boolean][] | + +#### Result + +Moving `"C:\Source\Folder"` and its content to `"C:\Destination"` that does not already contain a folder named `"Folder"` will: + +* Move `"C:\Source\Folder"` to `"C:\Destination\Folder"` with: + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Move `"C:\Source\Folder\SubFolder"` to `"C:\Destination\Folder\SubFolder"` with: + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Move `"C:\Source\Folder\File.txt"` to `"C:\Destination\Folder\File.txt"` with: + * The content left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [File attributes][] left unchanged. + +*** + +### Move a folder and its content, overwriting any content that already exists + +This example will move `"C:\Source\Folder"` and its content to `"C:\Destination"`, overwriting any content that already exists. + +In this example assume: + +* `"C:\Source\Folder"` contains: + * An empty sub-folder named `"SubFolder"`. + * An empty sub-folder named `"SubFolderAlreadyExists"`. + * A file named `"File.txt"`. + * A file named `"FileAlreadyExists.txt"`. +* `"C:\Destination"` already contains a folder named `"Folder"`, which already contains: + * A folder named `"SubFolderAlreadyExists"`. + * A file named `"FileAlreadyExists.txt"`. + +Therefore, overwrite must be set to `true` to ensure the existing `"SubFolderAlreadyExists"` and `"FileAlreadyExists.txt"` can be overwritten. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Path][FolderPath Property] | `($)FolderPath`, with value `@"C:\Source\Folder"` | `($)FolderPath` is a variable of type [String][] | +| [Destination Path][DestinationPath Property] | `($)DestinationPath`, with value `@"C:\Destination"` | `($)DestinationPath` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `true` | `($)Overwrite` is a variable of type [Boolean][] | +| [Content Only][ContentOnly Property] | `($)ContentOnly`, with value `false` | `($)ContentOnly` is a variable of type [Boolean][] | + +#### Result + +Moving `"C:\Source\Folder"` and its content to `"C:\Destination"` with the [Overwrite][Overwrite Property] option set to `true`, and where `"C:\Destination\Folder"`, `"C:\Destination\Folder\SubFolderAlreadyExists"` and `"C:\Destination\Folder\FileAlreadyExists.txt"` already exist will: + +* Overwrite the existing folder at `"C:\Destination\Folder"` with: + * The `Date Created` left unchanged. + * The `Date Accessed` set to the time the move occurred. + * The `Date Modified` set to the time the move occurred. + * The [Folder attributes][] left unchanged. +* Move `"C:\Source\Folder\SubFolder"` to `"C:\Destination\Folder\SubFolder"` with: + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Overwrite the existing folder at `"C:\Destination\Folder\SubFolderAlreadyExists"` with: + * The content left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Move `"C:\Source\Folder\File.txt"` to `"C:\Destination\Folder\File.txt"` with: + * The content left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [File attributes][] left unchanged. +* Overwrite the existing file at `"C:\Destination\Folder\FileAlreadyExists.txt"` with: + * The content copied from `"C:\Source\Folder\FileAlreadyExists.txt"`. + * The `Date Created` copied from `"C:\Source\Folder\FileAlreadyExists.txt"`. + * The `Date Accessed` copied from `"C:\Source\Folder\FileAlreadyExists.txt"`. + * The `Date Modified` copied from `"C:\Source\Folder\FileAlreadyExists.txt"`. + * The [File attributes][] copied from `"C:\Source\Folder\FileAlreadyExists.txt"`. + +*** + +### Move a folder's content only + +This example will move `"C:\Source\Folder"` content only to `"C:\Destination"`. + +In this example assume: + +* `"C:\Source\Folder"` contains: + * An empty sub-folder named `"SubFolder"`. + * A file named `"File.txt"`. +* `"C:\Destination"` does not already contain a folder named `"SubFolder"` or a file named `"File.txt"`, so overwrite can be set to either `true` or `false` and it will still work. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Path][FolderPath Property] | `($)FolderPath`, with value `@"C:\Source\Folder"` | `($)FolderPath` is a variable of type [String][] | +| [Destination Path][DestinationPath Property] | `($)DestinationPath`, with value `@"C:\Destination"` | `($)DestinationPath` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `false` | `($)Overwrite` is a variable of type [Boolean][] | +| [Content Only][ContentOnly Property] | `($)ContentOnly`, with value `true` | `($)ContentOnly` is a variable of type [Boolean][] | + +#### Result + +Moving `"C:\Source\Folder"` content only to `"C:\Destination"` that does not already contain a folder named `"SubFolder"` or a file named `"File.txt"` will: + +* Move `"C:\Source\Folder\SubFolder"` to `"C:\Destination\SubFolder"` with: + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Move `"C:\Source\Folder\File.txt"` to `"C:\Destination\File.txt"` with: + * The content left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [File attributes][] left unchanged. + +*** + +### Move a folder's content only, overwriting any content that already exists + +This example will move `"C:\Source\Folder"` content only to `"C:\Destination"`, overwriting any content that already exists. + +In this example assume: + +* `"C:\Source\Folder"` contains: + * An empty sub-folder named `"SubFolder"`. + * An empty sub-folder named `"SubFolderAlreadyExists"`. + * A file named `"File.txt"`. + * A file named `"FileAlreadyExists.txt"`. +* `"C:\Destination"` already contains: + * A folder named `"SubFolderAlreadyExists"`. + * A file named `"FileAlreadyExists.txt"`. + +Therefore, overwrite must be set to `true` to ensure the existing `"SubFolderAlreadyExists"` and `"FileAlreadyExists.txt"` can be overwritten. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Path][FolderPath Property] | `($)FolderPath`, with value `@"C:\Source\Folder"` | `($)FolderPath` is a variable of type [String][] | +| [Destination Path][DestinationPath Property] | `($)DestinationPath`, with value `@"C:\Destination"` | `($)DestinationPath` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `true` | `($)Overwrite` is a variable of type [Boolean][] | +| [Content Only][ContentOnly Property] | `($)ContentOnly`, with value `true` | `($)ContentOnly` is a variable of type [Boolean][] | + +#### Result + +Moving `"C:\Source\Folder"` content only to `"C:\Destination"` with the [Overwrite][Overwrite Property] option set to `true`, and where `"C:\Destination\SubFolderAlreadyExists"` and `"C:\Destination\FileAlreadyExists.txt"` already exist will: + +* Move `"C:\Source\Folder\SubFolder"` to `"C:\Destination\SubFolder"` with: + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Overwrite the existing folder at `"C:\Destination\SubFolderAlreadyExists"` with: + * The content left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Move `"C:\Source\Folder\File.txt"` to `"C:\Destination\File.txt"` with: + * The content left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [File attributes][] left unchanged. +* Overwrite the existing file at `"C:\Destination\FileAlreadyExists.txt"` with: + * The content copied from `"C:\Source\Folder\FileAlreadyExists.txt"`. + * The `Date Created` copied from `"C:\Source\Folder\FileAlreadyExists.txt"`. + * The `Date Accessed` copied from `"C:\Source\Folder\FileAlreadyExists.txt"`. + * The `Date Modified` copied from `"C:\Source\Folder\FileAlreadyExists.txt"`. + * The [File attributes][] copied from `"C:\Source\Folder\FileAlreadyExists.txt"`. + +*** + +### Move a folder and its content to the same location but with a different name + +If it is required to move a folder and its content into the same folder it is currently located in, but with a different name, then it is not possible to do with this block; the [Rename Folder][] block must be used instead. + +*** + +### Move a folder and its content to a different location but with a different name + +If it is required to move a folder and its content into a different folder than the one it is currently located in, but with a different name, it is not possible to do with a single block; you must use a combination of this block and the [Rename Folder][] block. + +*** + +## Properties + +### Folder Path + +The [Folder Path][FolderPath Property] to move the folder and/or its content from. + +The [Folder Path][FolderPath Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +For information about the supported folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FolderPath` with no value | + +### Destination Path + +The [Destination Path][DestinationPath Property] to move the folder and/or its content to. + +The [Destination Path][DestinationPath Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +The [Destination Path][DestinationPath Property] must point to a folder, otherwise an [InvalidPathException][] will be thrown. + +The moved folders and files will have the same names as the folders and files moved. + +Any non-existing folders within the [Destination Path][DestinationPath Property] will be automatically created. + +For information about the supported file and folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | No value (defaults to `""`) | + +### Overwrite + +Option to [Overwrite][Overwrite Property] the folder and/or contents being moved to in the [Destination Path][DestinationPath Property] if they already exist. + +If the folder and/or contents exists, [Overwrite][Overwrite Property] must be set to `true`, otherwise an [OperationFailedException][] will be thrown. By default, this is set to `false` to avoid implicit and accidental overwriting of existing folders and files. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `false` | + +### Content Only + +Option to specify whether to move the folder and its content or just the [Content Only][ContentOnly Property]. + +To move the folder and its content, [Content Only][ContentOnly Property] must be set to `false`; to move just the content, [Content Only][ContentOnly Property] must be set to `true`. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `false` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [InvalidPathException][] | The [Destination Path][DestinationPath Property] points to a file. | +| | The [Destination Path][DestinationPath Property] contains leading spaces. | +| | The [Destination Path][DestinationPath Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any folder names. | +| | The [Destination Path][DestinationPath Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| [OperationFailedException][] | The [Folder Path][FolderPath Property] does not exist. | +| | The [Folder Path][FolderPath Property] points to a file. | +| | The [Folder Path][FolderPath Property] contains leading spaces. | +| | The [Folder Path][FolderPath Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any folder names. | +| | The [Folder Path][FolderPath Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| | The [Folder Path][FolderPath Property] or [Destination Path][DestinationPath Property] is a win32 device path (i.e starts with a `"\\.\"`). | +| | The [Folder Path][FolderPath Property] or [Destination Path][DestinationPath Property] is invalid (for example, it is on an unmapped drive). | +| | The [Folder Path][FolderPath Property] and [Destination Path][DestinationPath Property] point to the same folder and [Content Only][ContentOnly Property] is `true`. | +| | The [Folder Path][FolderPath Property] is a child folder in the [Destination Path][DestinationPath Property] and [Content Only][ContentOnly Property] is `false`. | +| | Any file being moved already exists in the specified [Destination Path][DestinationPath Property] and overwrite is `false`. | +| | Any file being moved already exists in the specified [Destination Path][DestinationPath Property], is read-only and overwrite is `true`. | +| | The user the flow is executing as does not have the required permissions to move the folder or any of its content (e.g. not having read access to the [Folder Path][FolderPath Property] or its content, or write access to the [Destination Path][DestinationPath Property]). | +| | The operation is cyclic (e.g. moving a folder into one of its sub-folders). | +| | An unexpected error occurs when moving the folder or any of its content. | +| [PropertyEmptyException][] | Thrown when [Folder Path][FolderPath Property] or [Destination Path][DestinationPath Property] are empty (i.e. `""`). | +| [PropertyNullException][] | Thrown when [Folder Path][FolderPath Property] or [Destination Path][DestinationPath Property] are `null`. | + +## Remarks + +### Folder Paths + +For information about the supported folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +### Folder Path and Destination Path need escaping + +[Folder Path][FolderPath Property] and [Destination Path][DestinationPath Property] require `\` characters to be escaped, otherwise each unescaped `\` will be reported as an `Invalid property value` message when trying to debug the flow. + +Escaping can be done in two ways: + +* Escaping the `\` character with another `\` character (e.g. `"C:\\Source\\"`), or +* Prepending an `@` character before the start of the [Folder Path][FolderPath Property] (e.g. `@"C:\Source"`) and [Destination Path][DestinationPath Property] (e.g. `@"C:\Destination"`). + +### Folder Attributes + +When moving the folder at the specified [Folder Path][FolderPath Property] or any folder under it to the new [Destination Path][DestinationPath Property], if the folder already exists in the destination its attributes remain unchanged. + +For information about the folder attributes (i.e. ReadOnly, Hidden, Archive etc.), please see [File & Folder Attributes][]. + +### File Attributes + +When moving a file under [Folder Path][FolderPath Property] to the new [Destination Path][DestinationPath Property], all of the file's attributes are also moved. + +For information about the file attributes (i.e. ReadOnly, Hidden, Archive etc.), please see [File & Folder Attributes][]. + +### Handling of Exceptions + +If an exception occurs when trying to move [Folder Path][FolderPath Property], an [OperationFailedException][] will be thrown. + +[FolderPath Property]: {{< ref "#folder-path" >}} +[DestinationPath Property]: {{< ref "#destination-path" >}} +[Overwrite Property]: {{< ref "#overwrite" >}} +[ContentOnly Property]: {{< ref "#content-only" >}} + +[Folder Attributes]: {{< ref "#folder-attributes" >}} +[File Attributes]: {{< ref "#file-attributes" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[InvalidPathException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.InvalidPathException.MainDoc" >}} +[OperationFailedException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.MainDoc" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[File & Folder Attributes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Attributes.MainDoc" >}} +[File & Folder Paths]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Paths.MainDoc" >}} + +[Rename Folder]: {{< url path="Cortex.Reference.Blocks.FilesAndFolders.RenameFolder.RenameFolder.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/move-folder/move-folders-block.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/move-folder/move-folders-block.md new file mode 100644 index 000000000..8ebdd0aee --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/move-folder/move-folders-block.md @@ -0,0 +1,496 @@ +--- +title: "Move Folders" +linkTitle: "Move Folders" +description: "Moves folders at the specified folder paths to the given destination path." +--- + +{{< figure src="/blocks/folders-move-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.FilesAndFolders.MoveFolder.MoveFoldersBlock)
+ +## Description + +Moves folders at the specified [Folder Paths][FolderPaths Property] to the given [Destination Path][DestinationPath Property], with an option to move the folders and their content, or just their [Content Only][ContentOnly Property]. + +An option can also be specified to [Overwrite][Overwrite Property] anything being moved that already exists in the [Destination Path][DestinationPath Property]. + +## Examples + +### Move folders and their content + +This example will move `["C:\Source\Folder1", "C:\Source\Folder2"]` and their content to `"C:\Destination"`. + +In this example assume: + +* `"C:\Source\Folder1"` contains: + * An empty sub-folder named `"SubFolder1"`. + * A file named `"File1.txt"`. +* `"C:\Source\Folder2"` contains: + * An empty sub-folder named `"SubFolder2"`. + * A file named `"File2.txt"`. +* `"C:\Destination"` does not already contain a folder named `"Folder1"` or `"Folder2"`, so overwrite can be set to either `true` or `false` and it will still work. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Paths][FolderPaths Property] | `($)FolderPaths`, with value `[@"C:\Source\Folder1", @"C:\Source\Folder2"]` | `($)FolderPaths` is a variable of type [IEnumerable][]<[String][]> | +| [Destination Path][DestinationPath Property] | `($)DestinationPath`, with value `@"C:\Destination"` | `($)DestinationPath` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `false` | `($)Overwrite` is a variable of type [Boolean][] | +| [Content Only][ContentOnly Property] | `($)ContentOnly`, with value `false` | `($)ContentOnly` is a variable of type [Boolean][] | + +#### Result + +Moving `["C:\Source\Folder1", "C:\Source\Folder2"]` and their content to `"C:\Destination"` that does not already contain folders named `"Folder1"` and `"Folder2"` will: + +* Move `"C:\Source\Folder1"` to `"C:\Destination\Folder1"` with: + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Move `"C:\Source\Folder1\SubFolder1"` to `"C:\Destination\Folder1\SubFolder1"` with: + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Move `"C:\Source\Folder1\File1.txt"` to `"C:\Destination\Folder1\File1.txt"` with: + * The content left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [File attributes][] left unchanged. +* Move `"C:\Source\Folder2"` to `"C:\Destination\Folder2"` with: + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Move `"C:\Source\Folder2\SubFolder2"` to `"C:\Destination\Folder2\SubFolder2"` with: + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Move `"C:\Source\Folder2\File2.txt"` to `"C:\Destination\Folder2\File2.txt"` with: + * The content left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [File attributes][] left unchanged. + +*** + +### Move folders and their content, overwriting any content that already exists + +This example will move `["C:\Source\Folder1", "C:\Source\Folder2"]` and their content to `"C:\Destination"`, overwriting any content that already exists. + +In this example assume: + +* `"C:\Source\Folder1"` contains: + * An empty sub-folder named `"SubFolder1"`. + * An empty sub-folder named `"SubFolderAlreadyExists1"`. + * A file named `"File1.txt"`. + * A file named `"FileAlreadyExists1.txt"`. +* `"C:\Source\Folder2"` contains: + * An empty sub-folder named `"SubFolder2"`. + * An empty sub-folder named `"SubFolderAlreadyExists2"`. + * A file named `"File2.txt"`. + * A file named `"FileAlreadyExists2.txt"`. +* `"C:\Destination"` already contains: + * A folder named `"Folder1"`, which already contains: + * A folder named `"SubFolderAlreadyExists1"`. + * A file named `"FileAlreadyExists1.txt"`. + * A folder named `"Folder2"`, which already contains: + * A folder named `"SubFolderAlreadyExists2"`. + * A file named `"FileAlreadyExists2.txt"`. + +Therefore, overwrite must be set to `true` to ensure the existing folders and files can be overwritten. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Paths][FolderPaths Property] | `($)FolderPaths`, with value `[@"C:\Source\Folder1", @"C:\Source\Folder2"]` | `($)FolderPaths` is a variable of type [IEnumerable][]<[String][]> | +| [Destination Path][DestinationPath Property] | `($)DestinationPath`, with value `@"C:\Destination"` | `($)DestinationPath` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `true` | `($)Overwrite` is a variable of type [Boolean][] | +| [Content Only][ContentOnly Property] | `($)ContentOnly`, with value `false` | `($)ContentOnly` is a variable of type [Boolean][] | + +#### Result + +Moving `["C:\Source\Folder1", "C:\Source\Folder2"]` and their content to `"C:\Destination"` with the [Overwrite][Overwrite Property] option set to `true`, and where `"C:\Destination\Folder1"`, `"C:\Destination\Folder1\SubFolderAlreadyExists1"`, `"C:\Destination\Folder1\FileAlreadyExists1.txt"`, `"C:\Destination\Folder2"`, `"C:\Destination\Folder2\SubFolderAlreadyExists2"` and `"C:\Destination\Folder2\FileAlreadyExists2.txt"` already exist will: + +* Overwrite the existing folder at `"C:\Destination\Folder1"` with: + * The `Date Created` left unchanged. + * The `Date Accessed` set to the time the move occurred. + * The `Date Modified` set to the time the move occurred. + * The [Folder attributes][] left unchanged. +* Move `"C:\Source\Folder1\SubFolder1"` to `"C:\Destination\Folder1\SubFolder1"` with: + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Overwrite the existing folder at `"C:\Destination\Folder1\SubFolderAlreadyExists1"` with: + * The content left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Move `"C:\Source\Folder1\File1.txt"` to `"C:\Destination\Folder1\File1.txt"` with: + * The content left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [File attributes][] left unchanged. +* Overwrite the existing file at `"C:\Destination\Folder1\FileAlreadyExists1.txt"` with: + * The content copied from `"C:\Source\Folder1\FileAlreadyExists1.txt"`. + * The `Date Created` copied from `"C:\Source\Folder1\FileAlreadyExists1.txt"`. + * The `Date Accessed` copied from `"C:\Source\Folder1\FileAlreadyExists1.txt"`. + * The `Date Modified` copied from `"C:\Source\Folder1\FileAlreadyExists1.txt"`. + * The [File attributes][] copied from `"C:\Source\Folder1\FileAlreadyExists1.txt"`. +* Overwrite the existing folder at `"C:\Destination\Folder2"` with: + * The `Date Created` left unchanged. + * The `Date Accessed` set to the time the move occurred. + * The `Date Modified` set to the time the move occurred. + * The [Folder attributes][] left unchanged. +* Move `"C:\Source\Folder2\SubFolder2"` to `"C:\Destination\Folder2\SubFolder2"` with: + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Overwrite the existing folder at `"C:\Destination\Folder2\SubFolderAlreadyExists2"` with: + * The content left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Move `"C:\Source\Folder2\File2.txt"` to `"C:\Destination\Folder2\File2.txt"` with: + * The content left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [File attributes][] left unchanged. +* Overwrite the existing file at `"C:\Destination\Folder2\FileAlreadyExists2.txt"` with: + * The content copied from `"C:\Source\Folder2\FileAlreadyExists2.txt"`. + * The `Date Created` copied from `"C:\Source\Folder2\FileAlreadyExists2.txt"`. + * The `Date Accessed` copied from `"C:\Source\Folder2\FileAlreadyExists2.txt"`. + * The `Date Modified` copied from `"C:\Source\Folder2\FileAlreadyExists2.txt"`. + * The [File attributes][] copied from `"C:\Source\Folder2\FileAlreadyExists2.txt"`. + +*** + +### Move the folders' content only + +This example will move `["C:\Source\Folder1", "C:\Source\Folder2"]` content only to `"C:\Destination"`. + +In this example assume: + +* `"C:\Source\Folder1"` contains: + * An empty sub-folder named `"SubFolder1"`. + * A file named `"File1.txt"`. +* `"C:\Source\Folder2"` contains: + * An empty sub-folder named `"SubFolder2"`. + * A file named `"File2.txt"`. +* `"C:\Destination"` does not already contain a folder named `"SubFolder1"` or `"SubFolder2"` or a file named `"File1.txt"` or `"File2.txt"`, so overwrite can be set to either `true` or `false` and it will still work. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Paths][FolderPaths Property] | `($)FolderPaths`, with value `[@"C:\Source\Folder1", @"C:\Source\Folder2"]` | `($)FolderPaths` is a variable of type [IEnumerable][]<[String][]> | +| [Destination Path][DestinationPath Property] | `($)DestinationPath`, with value `@"C:\Destination"` | `($)DestinationPath` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `false` | `($)Overwrite` is a variable of type [Boolean][] | +| [Content Only][ContentOnly Property] | `($)ContentOnly`, with value `true` | `($)ContentOnly` is a variable of type [Boolean][] | + +#### Result + +Moving `["C:\Source\Folder1", "C:\Source\Folder2"]` content only to `"C:\Destination"` that does not already contain a folder named `"SubFolder1"` or `"SubFolder2"` or a file named `"File1.txt"` or `"File2.txt"` will: + +* Move `"C:\Source\Folder1\SubFolder1"` to `"C:\Destination\SubFolder1"` with: + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Move `"C:\Source\Folder1\File1.txt"` to `"C:\Destination\File1.txt"` with: + * The content left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [File attributes][] left unchanged. +* Move `"C:\Source\Folder2\SubFolder2"` to `"C:\Destination\SubFolder2"` with: + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Move `"C:\Source\Folder2\File2.txt"` to `"C:\Destination\File2.txt"` with: + * The content left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [File attributes][] left unchanged. + +*** + +### Move folders' content only, overwriting any content that already exists + +This example will move `["C:\Source\Folder1", "C:\Source\Folder2"]` content only to `"C:\Destination"`, overwriting any content that already exists. + +In this example assume: + +* `"C:\Source\Folder1"` contains: + * An empty sub-folder named `"SubFolder1"`. + * An empty sub-folder named `"SubFolderAlreadyExists1"`. + * A file named `"File1.txt"`. + * A file named `"FileAlreadyExists1.txt"`. +* `"C:\Source\Folder2"` contains: + * An empty sub-folder named `"SubFolder2"`. + * An empty sub-folder named `"SubFolderAlreadyExists2"`. + * A file named `"File2.txt"`. + * A file named `"FileAlreadyExists2.txt"`. +* `"C:\Destination"` already contains: + * A folder named `"SubFolderAlreadyExists1"`. + * A folder named `"SubFolderAlreadyExists2"`. + * A file named `"FileAlreadyExists1.txt"`. + * A file named `"FileAlreadyExists2.txt"`. + +Therefore, overwrite must be set to `true` to ensure the existing folders and files can be overwritten. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Paths][FolderPaths Property] | `($)FolderPaths`, with value `[@"C:\Source\Folder1", @"C:\Source\Folder2"]` | `($)FolderPaths` is a variable of type [IEnumerable][]<[String][]> | +| [Destination Path][DestinationPath Property] | `($)DestinationPath`, with value `@"C:\Destination"` | `($)DestinationPath` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `true` | `($)Overwrite` is a variable of type [Boolean][] | +| [Content Only][ContentOnly Property] | `($)ContentOnly`, with value `true` | `($)ContentOnly` is a variable of type [Boolean][] | + +#### Result + +Moving `["C:\Source\Folder1", "C:\Source\Folder2"]` content only to `"C:\Destination"` with the [Overwrite][Overwrite Property] option set to `true`, and where `"C:\Destination\SubFolderAlreadyExists1"`, `"C:\Destination\SubFolderAlreadyExists2"`, `"C:\Destination\FileAlreadyExists1.txt"` and `"C:\Destination\FileAlreadyExists2.txt"` already exist will: + +* Move `"C:\Source\Folder1\SubFolder1"` to `"C:\Destination\SubFolder1"` with: + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Overwrite the existing folder at `"C:\Destination\SubFolderAlreadyExists1"` with: + * The content left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Move `"C:\Source\Folder1\File1.txt"` to `"C:\Destination\File1.txt"` with: + * The content copied left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [File attributes][] left unchanged. +* Overwrite the existing file at `"C:\Destination\FileAlreadyExists1.txt"` with: + * The content copied from `"C:\Source\Folder1\FileAlreadyExists1.txt"`. + * The `Date Created` copied from `"C:\Source\Folder1\FileAlreadyExists1.txt"`. + * The `Date Accessed` copied from `"C:\Source\Folder1\FileAlreadyExists1.txt"`. + * The `Date Modified` copied from `"C:\Source\Folder1\FileAlreadyExists1.txt"`. + * The [File attributes][] copied from `"C:\Source\Folder1\FileAlreadyExists1.txt"`. +* Move `"C:\Source\Folder2\SubFolder2"` to `"C:\Destination\SubFolder2"` with: + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Overwrite the existing folder at `"C:\Destination\SubFolderAlreadyExists2"` with: + * The content left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* Move `"C:\Source\Folder2\File2.txt"` to `"C:\Destination\File2.txt"` with: + * The content copied left unchanged. + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [File attributes][] left unchanged. +* Overwrite the existing file at `"C:\Destination\FileAlreadyExists2.txt"` with: + * The content copied from `"C:\Source\Folder2\FileAlreadyExists2.txt"`. + * The `Date Created` copied from `"C:\Source\Folder2\FileAlreadyExists2.txt"`. + * The `Date Accessed` copied from `"C:\Source\Folder2\FileAlreadyExists2.txt"`. + * The `Date Modified` copied from `"C:\Source\Folder2\FileAlreadyExists2.txt"`. + * The [File attributes][] copied from `"C:\Source\Folder2\FileAlreadyExists2.txt"`. + +*** + +### Move folders and their content to the same location but with a different name + +If it is required to move folders and their content into the same folder they are currently located in, but with a different name, then it is not possible to do with this block; the [Rename Folder][] block must be used instead. + +*** + +### Move folders and their content to a different location but with a different name + +If it is required to move folders and their content into a different folder than the one they are currently located in, but with a different name, it is not possible to do with a single block; you must use a combination of this block and the [Rename Folder][] block. + +*** + +## Properties + +### Folder Paths + +The [Folder Paths][FolderPaths Property] to move the folders and/or their content from. + +Each folder path in [Folder Paths][FolderPaths Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +For information about the supported folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FolderPaths` with no value | + +### Destination Path + +The [Destination Path][DestinationPath Property] to move the folders and/or their content to. + +The [Destination Path][DestinationPath Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +The [Destination Path][DestinationPath Property] must point to a folder, otherwise an [InvalidPathException][] will be thrown. + +The moved folders and files will have the same names as the folders and files copied. + +Any non-existing folders within the [Destination Path][DestinationPath Property] will be automatically created. + +For information about the supported file and folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | No value (defaults to `""`) | + +### Overwrite + +Option to [Overwrite][Overwrite Property] the folders and/or contents being moved to in the [Destination Path][DestinationPath Property] if they already exist. + +If any of the folders and/or contents exists, [Overwrite][Overwrite Property] must be set to `true`, otherwise an [OperationFailedException][] will be thrown. By default, this is set to `false` to avoid implicit and accidental overwriting of existing folders and files. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `false` | + +### Content Only + +Option to specify whether to move the folders and their content or just the [Content Only][ContentOnly Property]. + +To move the folders and their content, [Content Only][ContentOnly Property] must be set to `false`; to move just the content, [Content Only][ContentOnly Property] must be set to `true`. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `false` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [InvalidPathException][] | The [Destination Path][DestinationPath Property] points to a file. | +| | The [Destination Path][DestinationPath Property] contains leading spaces. | +| | The [Destination Path][DestinationPath Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any folder names. | +| | The [Destination Path][DestinationPath Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| [OperationFailedException][] | Any folder path in [Folder Paths][FolderPaths Property] is `null` or empty (i.e. `""`). For more information, see [Null or Empty Folder Paths][]| +| | Any folder path in [Folder Paths][FolderPaths Property] is duplicated. For more information, see [Duplicate Folder Paths][] | +| | Any folder path in [Folder Paths][FolderPaths Property] does not exist. | +| | Any folder path in [Folder Paths][FolderPaths Property] points to a file. | +| | Any folder path in [Folder Paths][FolderPaths Property] contains leading spaces. | +| | Any folder path in [Folder Paths][FolderPaths Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any folder names. | +| | Any folder path in [Folder Paths][FolderPaths Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| | Any folder path in [Folder Paths][FolderPaths Property] or [Destination Path][DestinationPath Property] is a win32 device path (i.e starts with a `"\\.\"`). | +| | Any folder path in [Folder Paths][FolderPaths Property] or [Destination Path][DestinationPath Property] is invalid (for example, it is on an unmapped drive). | +| | Any folder path in [Folder Paths][FolderPaths Property] and [Destination Path][DestinationPath Property] point to the same folder and [Content Only][ContentOnly Property] is `true`. | +| | Any folder path in [Folder Paths][FolderPaths Property] is a child folder in the [Destination Path][DestinationPath Property] and [Content Only][ContentOnly Property] is `false`. | +| | Any file being moved already exists in the specified [Destination Path][DestinationPath Property] and overwrite is `false`. | +| | Any file being moved already exists in the specified [Destination Path][DestinationPath Property], is read-only and overwrite is `true`. | +| | The user the flow is executing as does not have the required permissions to move the folder or any of its content (e.g. not having read access to any of the folders in [Folder Paths][FolderPaths Property] or its content, or write access to the [Destination Path][DestinationPath Property]). | +| | The operation is cyclic (e.g. moving a folder into one of its sub-folders). | +| | An unexpected error occurs when moving a folder or any of its content. | +| [PropertyEmptyException][] | Thrown when [Folder Paths][FolderPaths Property] does not contain any items, or [Destination Path][DestinationPath Property] are empty (i.e. `""`). | +| [PropertyNullException][] | Thrown when [Folder Paths][FolderPaths Property] or [Destination Path][DestinationPath Property] are `null`. | + +## Remarks + +### Folder Paths + +For information about the supported folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +### Folder Path and Destination Path need escaping + +Each folder paths in [Folder Paths][FolderPaths Property] and [Destination Path][DestinationPath Property] require `\` characters to be escaped, otherwise each unescaped `\` will be reported as an `Invalid property value` message when trying to debug the flow. + +Escaping can be done in two ways: + +* Escaping the `\` character with another `\` character (e.g. `"C:\\Source\\"`), or +* Prepending an `@` character before the start of the folder path (e.g. `@"C:\Source"`) and [Destination Path][DestinationPath Property] (e.g. `@"C:\Destination"`). + +### Folder Attributes + +When moving the folders at the specified [Folder Paths][FolderPaths Property] or any folder under them to the new [Destination Path][DestinationPath Property], if the folder already exists in the destination its attributes remain unchanged. + +For information about the folder attributes (i.e. ReadOnly, Hidden, Archive etc.), please see [File & Folder Attributes][]. + +### File Attributes + +When moving a file under any of the [Folder Paths][FolderPaths Property] to the new [Destination Path][DestinationPath Property], all of the file's attributes are also moved. + +For information about the file attributes (i.e. ReadOnly, Hidden, Archive etc.), please see [File & Folder Attributes][]. + +### Conflicting Content + +If two or more paths in the specified [Folder Paths][FolderPaths Property] contain content (folders or files) with the same name, and [Overwrite][Overwrite Property] and [Content Only][ContentOnly Property] are `true`: + +* The attributes of the folder/file in the [Destination Path][DestinationPath Property] will be that of the first one moved. +* For files, the content of the file in the [Destination Path][DestinationPath Property] will be that of the last one moved. + +### Handling of Exceptions + +If an exception occurs when trying to move a folder in [Folder Paths][FolderPaths Property], it will be recorded and the block will continue processing the remaining folders. Once all folders are processed, recorded exceptions will be thrown within an [OperationFailedException][]. + +[FolderPaths Property]: {{< ref "#folder-paths" >}} +[DestinationPath Property]: {{< ref "#destination-path" >}} +[Overwrite Property]: {{< ref "#overwrite" >}} +[ContentOnly Property]: {{< ref "#content-only" >}} + +[Folder Attributes]: {{< ref "#folder-attributes" >}} +[File Attributes]: {{< ref "#file-attributes" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[InvalidPathException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.InvalidPathException.MainDoc" >}} +[OperationFailedException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.MainDoc" >}} +[Duplicate Folder Paths]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.IndexesOfDuplicatePaths" >}} +[Null Or Empty Folder Paths]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.IndexesOfNullOrEmptyPaths" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[File & Folder Attributes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Attributes.MainDoc" >}} +[File & Folder Paths]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Paths.MainDoc" >}} + +[Rename Folder]: {{< url path="Cortex.Reference.Blocks.FilesAndFolders.RenameFolder.RenameFolder.MainDoc" >}} + +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/read-file/_index.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/read-file/_index.md new file mode 100644 index 000000000..172a52744 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/read-file/_index.md @@ -0,0 +1,5 @@ +--- +title: "Read File" +linkTitle: "Read File" +description: "Read the content of a file." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/read-file/read-all-lines-block.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/read-file/read-all-lines-block.md new file mode 100644 index 000000000..b67d546b1 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/read-file/read-all-lines-block.md @@ -0,0 +1,178 @@ +--- +title: "Read All Lines" +linkTitle: "Read All Lines" +description: "Reads all lines from a file at the specified file path." +--- + +{{< figure src="/blocks/files-read-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.FilesAndFolders.ReadFile.ReadAllLinesBlock)
+ +## Description + +Reads all [Lines][Lines Property] from a file at the specified [File Path][FilePath Property], with an option to explicitly specify the [Encoding][Encoding Property] of the file if needed. + +## Examples + +### Read all lines + +This example will read all lines from `"C:\Source\File.txt"`, automatically detecting the encoding. + +In this example assume `"C:\Source\File.txt"` is a UTF-8 encoded file containing 10 lines: + +```plaintext +This is Line 1 +This is Line 2 +This is Line 3 +This is Line 4 +This is Line 5 +This is Line 6 +This is Line 7 +This is Line 8 +This is Line 9 +This is Line 10 +``` + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [File Path][FilePath Property] | `($)FilePath`, with value `@"C:\Source\File.txt"` | `($)FilePath` is a variable of type [String][] | +| [Encoding][Encoding Property] | `($)Encoding`, with value `null` | `($)Encoding` is a variable of type [Encoding][] | +| [Lines][Lines Property] | `($)Lines`, with no value | `($)Lines` is a variable that will be set to an [IList][]<[String][]> | + +#### Result + +Reading all lines from `"C:\Source\File.txt"` results in the variable `($)Lines` being updated to the following: + +```json +[ + "This is Line 1", + "This is Line 2", + "This is Line 3", + "This is Line 4", + "This is Line 5", + "This is Line 6", + "This is Line 7", + "This is Line 8", + "This is Line 9", + "This is Line 10" +] +``` + +*** + +## Properties + +### File Path + +The [File Path][FilePath Property] to read all lines of the file from. + +The [File Path][FilePath Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +For information about the supported file path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FilePath` with no value | + +### Encoding + +Option to specify the [Encoding][Encoding Property] that should be used to read the file. + +Most of the time [Encoding][Encoding Property] can be left as `null`; allowing the block to automatically attempt to detect the encoding of the file based on the presence of byte order marks. However, if it is found that the returned [Lines][Lines Property] are not in the correct format because the block was unable to detect the encoding of the file, it is possible to specify the [Encoding][Encoding Property] explicitly using this property. + +For information about encoding, examples of available encodings and using them, please see [Encoding][Working with Text - Encoding]. + +| | | +|--------------------|---------------------------| +| Data Type | [Encoding][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Lines + +All [Lines][Lines Property] that were read from the file. + +A line is defined as a sequence of characters followed by a carriage return (i.e. `\r`), a line feed (i.e. `\n`), or a carriage return immediately followed by a line feed. The resulting [Lines][Lines Property] do not contain the terminating carriage returns and/or line feeds. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[String][]> | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Lines` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [InvalidPropertyValueException][] | Thrown when [Encoding][Encoding Property] is invalid (e.g. `Encoding.GetEncoding(-1)`). See [Value Is Invalid][]. | +| [OperationFailedException][] | The [File Path][FilePath Property] does not exist. | +| | The [File Path][FilePath Property] points to a folder. | +| | The [File Path][FilePath Property] contains leading spaces. | +| | The [File Path][FilePath Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any file or folder names. | +| | The [File Path][FilePath Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| | The [File Path][FilePath Property] is invalid (for example, it is on an unmapped drive). | +| | The user the flow is executing as does not have the required permissions to read the file. | +| | An unexpected error occurs when reading the file. | +| [PropertyEmptyException][] | Thrown when [File Path][FilePath Property] is empty (i.e. `""`). | +| [PropertyNullException][] | Thrown when [File Path][FilePath Property] is `null`. | + +## Remarks + +### File Paths + +For information about the supported file path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +### File Path needs escaping + +[File Path][FilePath Property] requires `\` characters to be escaped, otherwise each unescaped `\` will be reported as an `Invalid property value` message when trying to debug the flow. + +Escaping can be done in two ways: + +* Escaping the `\` character with another `\` character (e.g. `"C:\\Source\\File.txt"`), or +* Prepending an `@` character before the start of the [File Path][FilePath Property] (e.g. `@"C:\Source\File.txt"`). + +### Encoding of text + +For information about encoding of text, examples of available encodings and using them, please see [Encoding][Working with Text - Encoding]. + +[FilePath Property]: {{< ref "#file-path" >}} +[Encoding Property]: {{< ref "#encoding" >}} +[Lines Property]: {{< ref "#lines" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Working with Text - Encoding]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Encoding.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[OperationFailedException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.MainDoc" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[File & Folder Paths]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Paths.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Encoding]: {{< url path="Cortex.Reference.DataTypes.Text.Encoding.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/read-file/read-all-text-block.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/read-file/read-all-text-block.md new file mode 100644 index 000000000..15e3e33d1 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/read-file/read-all-text-block.md @@ -0,0 +1,173 @@ +--- +title: "Read All Text" +linkTitle: "Read All Text" +description: "Reads all text from a file at the specified file path." +--- + +{{< figure src="/blocks/files-read-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.FilesAndFolders.ReadFile.ReadAllTextBlock)
+ +## Description + +Reads all [Text][Text Property] from a file at the specified [File Path][FilePath Property], with an option to explicitly specify the [Encoding][Encoding Property] of the file if needed. + +## Examples + +### Read all text + +This example will read all text from `"C:\Source\File.txt"`, automatically detecting the encoding. + +In this example assume `"C:\Source\File.txt"` is a UTF-8 encoded file containing the following text: + +```plaintext +This is Line 1 +This is Line 2 +This is Line 3 +This is Line 4 +This is Line 5 +This is Line 6 +This is Line 7 +This is Line 8 +This is Line 9 +This is Line 10 +``` + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [File Path][FilePath Property] | `($)FilePath`, with value `@"C:\Source\File.txt"` | `($)FilePath` is a variable of type [String][] | +| [Encoding][Encoding Property] | `($)Encoding`, with value `null` | `($)Encoding` is a variable of type [Encoding][] | +| [Text][Text Property] | `($)Text`, with no value | `($)Text` is a variable that will be set to a [String][] | + +#### Result + +Reading all text from `"C:\Source\File.txt"` results in the variable `($)Text` being updated to the following: + +```json +"This is Line 1 +This is Line 2 +This is Line 3 +This is Line 4 +This is Line 5 +This is Line 6 +This is Line 7 +This is Line 8 +This is Line 9 +This is Line 10" +``` + +*** + +## Properties + +### File Path + +The [File Path][FilePath Property] to read all text of the file from. + +The [File Path][FilePath Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +For information about the supported file path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FilePath` with no value | + +### Encoding + +Option to specify the [Encoding][Encoding Property] that should be used to read the file. + +Most of the time [Encoding][Encoding Property] can be left as `null`; allowing the block to automatically attempt to detect the encoding of the file based on the presence of byte order marks. However, if it is found that the returned [Text][Text Property] are not in the correct format because the block was unable to detect the encoding of the file, it is possible to specify the [Encoding][Encoding Property] explicitly using this property. + +For information about encoding, examples of available encodings and using them, please see [Encoding][Working with Text - Encoding]. + +| | | +|--------------------|---------------------------| +| Data Type | [Encoding][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Text + +All [Text][Text Property] that was read from the file. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [InvalidPropertyValueException][] | Thrown when [Encoding][Encoding Property] is invalid (e.g. `Encoding.GetEncoding(-1)`). See [Value Is Invalid][]. | +| [OperationFailedException][] | The [File Path][FilePath Property] does not exist. | +| | The [File Path][FilePath Property] points to a folder. | +| | The [File Path][FilePath Property] contains leading spaces. | +| | The [File Path][FilePath Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any file or folder names. | +| | The [File Path][FilePath Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| | The [File Path][FilePath Property] is invalid (for example, it is on an unmapped drive). | +| | The user the flow is executing as does not have the required permissions to read the file. | +| | An unexpected error occurs when reading the file. | +| [PropertyEmptyException][] | Thrown when [File Path][FilePath Property] is empty (i.e. `""`). | +| [PropertyNullException][] | Thrown when [File Path][FilePath Property] is `null`. | + +## Remarks + +### File Paths + +For information about the supported file path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +### File Path needs escaping + +[File Path][FilePath Property] requires `\` characters to be escaped, otherwise each unescaped `\` will be reported as an `Invalid property value` message when trying to debug the flow. + +Escaping can be done in two ways: + +* Escaping the `\` character with another `\` character (e.g. `"C:\\Source\\File.txt"`), or +* Prepending an `@` character before the start of the [File Path][FilePath Property] (e.g. `@"C:\Source\File.txt"`). + +### Encoding of text + +For information about encoding of text, examples of available encodings and using them, please see [Encoding][Working with Text - Encoding]. + +[FilePath Property]: {{< ref "#file-path" >}} +[Encoding Property]: {{< ref "#encoding" >}} +[Text Property]: {{< ref "#text" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Working with Text - Encoding]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Encoding.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[OperationFailedException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.MainDoc" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[File & Folder Paths]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Paths.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Encoding]: {{< url path="Cortex.Reference.DataTypes.Text.Encoding.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/rename-folder/_index.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/rename-folder/_index.md new file mode 100644 index 000000000..e4b6c16b7 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/rename-folder/_index.md @@ -0,0 +1,5 @@ +--- +title: "Rename Folder" +linkTitle: "Rename Folder" +description: "Rename a folder." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/rename-folder/rename-folder-block.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/rename-folder/rename-folder-block.md new file mode 100644 index 000000000..b3a86a7b4 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/rename-folder/rename-folder-block.md @@ -0,0 +1,158 @@ +--- +title: "Rename Folder" +linkTitle: "Rename Folder" +description: "Renames a folder at the specified folder path to a new name." +--- + +{{< figure src="/blocks/folders-rename-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.FilesAndFolders.RenameFolder.RenameFolderBlock)
+ +## Description + +Renames a folder at the specified [Folder Path][FolderPath Property] to a [New Name][NewName Property]. + +## Examples + +### Rename a folder + +This example will rename `"C:\Source\Folder"` to `"C:\Source\RenamedFolder"`. + +In this example assume: + +* `"C:\Source\Folder"` contains: + * An empty sub-folder named `"SubFolder"`. + * A file named `"File.txt"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Folder Path][FolderPath Property] | `($)FolderPath`, with value `@"C:\Source\Folder"` | `($)FolderPath` is a variable of type [String][] | +| [New Name][NewName Property] | `($)NewName`, with value `"RenamedFolder"` | `($)NewName` is a variable of type [String][] | + +#### Result + +Renaming `"C:\Source\Folder"` to `"RenamedFolder"` will: + +* Rename the existing folder at `"C:\Source\Folder"` to `"C:\Source\RenamedFolder"` with: + * The `Date Created` left unchanged. + * The `Date Accessed` left unchanged. + * The `Date Modified` left unchanged. + * The [Folder attributes][] left unchanged. +* `"SubFolder"` and `"File.txt"` will be located under `"C:\Source\RenamedFolder"` and their names, dates, attributes and content will be left unchanged. + +*** + +### Other Move Operations + +If any other folder move operation is required, the [Move Folder][] or [Move Folders][] blocks must be used instead. + +*** + +## Properties + +### Folder Path + +The [Folder Path][FolderPath Property] of the folder to rename. + +The [Folder Path][FolderPath Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +For information about the supported folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FolderPath` with no value | + +### New Name + +The [New Name][NewName Property] to rename the folder to. + +The [New Name][NewName Property] is case-insensitive and any trailing spaces will be automatically removed. + +The [New Name][NewName Property] must be a valid folder name, otherwise an [InvalidFolderNameException][] will be thrown. + +For information about valid folder names, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | No value (defaults to `""`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [InvalidFolderNameException][] | A folder or file with the [New Name][NewName Property] already exists. | +| | The [New Name][NewName Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`). | +| | The [New Name][NewName Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| [OperationFailedException][] | The [Folder Path][FolderPath Property] does not exist. | +| | The [Folder Path][FolderPath Property] points to a file. | +| | The [Folder Path][FolderPath Property] contains leading spaces. | +| | The [Folder Path][FolderPath Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any folder names. | +| | The [Folder Path][FolderPath Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| | The [Folder Path][FolderPath Property] is a win32 device path (i.e starts with a `"\\.\"`). | +| | The [Folder Path][FolderPath Property] is invalid (for example, it is on an unmapped drive). | +| | The user the flow is executing as does not have the required permissions to rename the folder or any of its content (e.g. not having read access to the [Folder Path][FolderPath Property] or its content, or write access to the parent of [Folder Path][FolderPath Property]. | +| | An unexpected error occurs when renaming the folder. | +| [PropertyEmptyException][] | Thrown when [Folder Path][FolderPath Property] or [New Name][NewName Property] are empty (i.e. `""`). | +| [PropertyNullException][] | Thrown when [Folder Path][FolderPath Property] or [New Name][NewName Property] are `null`. | + +## Remarks + +### Folder Paths + +For information about the supported folder path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +### Folder Path needs escaping + +[Folder Path][FolderPath Property] requires `\` characters to be escaped, otherwise each unescaped `\` will be reported as an `Invalid property value` message when trying to debug the flow. + +Escaping can be done in two ways: + +* Escaping the `\` character with another `\` character (e.g. `"C:\\Source\\"`), or +* Prepending an `@` character before the start of the [Folder Path][FolderPath Property] (e.g. `@"C:\Source"`). + +### Folder Attributes + +When renaming the folder at the specified [Folder Path][FolderPath Property] all of the folder's attributes are left unchanged. + +For information about the folder attributes (i.e. ReadOnly, Hidden, Archive etc.), please see [File & Folder Attributes][]. + +[FolderPath Property]: {{< ref "#folder-path" >}} +[NewName Property]: {{< ref "#new-name" >}} + +[Folder Attributes]: {{< ref "#folder-attributes" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[InvalidFolderNameException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.InvalidFolderNameException.MainDoc" >}} +[OperationFailedException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.MainDoc" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[File & Folder Attributes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Attributes.MainDoc" >}} +[File & Folder Paths]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Paths.MainDoc" >}} + +[Move Folder]: {{< url path="Cortex.Reference.Blocks.FilesAndFolders.MoveFolder.MoveFolder.MainDoc" >}} +[Move Folders]: {{< url path="Cortex.Reference.Blocks.FilesAndFolders.MoveFolder.MoveFolders.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/search-file/_index.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/search-file/_index.md new file mode 100644 index 000000000..5bdc44c30 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/search-file/_index.md @@ -0,0 +1,5 @@ +--- +title: "Search File(s)" +linkTitle: "Search File(s)" +description: "Search a file or multiple files." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/search-file/search-file-block.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/search-file/search-file-block.md new file mode 100644 index 000000000..9738bf1d3 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/search-file/search-file-block.md @@ -0,0 +1,406 @@ +--- +title: "Search File" +linkTitle: "Search File" +description: "Searches a file at a specified file path for a matching search pattern." +--- + +{{< figure src="/blocks/files-search-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.FilesAndFolders.SearchFile.SearchFileBlock)
+ +## Description + +Searches the file at the specified [File Path][FilePath Property] for text that matches a given [Search Pattern][SearchPattern Property]. + +Results are returned as a list of [Matches][Matches Property]. + +Additional options can be specified: + +* [Search Options][SearchOptions Property] can be specified to choose whether to use a ContainsText, PatternMatching or Regex search. +* [Encoding][Encoding Property] can be specified if needed to explicitly state the encoding that should be used to read and search the file. +* A [Comparison Type][ComparisonType Property] option can specified to choose how it is determined whether text matches the [Search Pattern][SearchPattern Property] (e.g. whether the search is case-sensitive or case-insensitive). + +## Examples + +### Get matches for a given text + +This example will get all matches in the file `"C:\Source\File.txt"` that match the text `"error"`. + +It will perform a case-insensitive search, and let the block determine the encoding of the file automatically. + +In this example assume `"C:\Source\File.txt"` contains the following text: + +```plaintext +Error: Failed to determine uptime. +Information: Uptime is 2 hours. +Information: Uptime is 3 hours. +Error: An terminal error has occurred. The service will restart now. +``` + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [File Path][FilePath Property] | `($)FilePath`, with value `@"C:\Source\File.txt"` | `($)FilePath` is a variable of type [String][] | +| [Search Pattern][SearchPattern Property] | `($)SearchPattern`, with value `"error"` | `($)SearchPattern` is a variable of type [String][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Encoding][Encoding Property] | `($)Encoding`, with value `null` | `($)Encoding` is a variable of type [Encoding][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.OrdinalIgnoreCase` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Matches][Matches Property] | `($)Matches`, with no value | `($)Matches` is a variable that will be set to an [IList][]<[FileMatch][]> value | + +#### Result + +Searching `"C:\Source\File.txt"` for all text matching `"error"` (case-insensitive), results in the variable `($)Matches` being updated to the following: + +```json +[ + { + "FilePath": "C:\\Source\\File.txt", + "Line": 1, + "Value": "Error", + "Index": 0, + "Length": 5, + "Groups": {} + }, + { + "FilePath": "C:\\Source\\File.txt", + "Line": 4, + "Value": "Error", + "Index": 0, + "Length": 5, + "Groups": {} + }, + { + "FilePath": "C:\\Source\\File.txt", + "Line": 4, + "Value": "error", + "Index": 19, + "Length": 5, + "Groups": {} + } +] +``` + +*** + +### Get matches for a given pattern + +This example will get all matches in the file `"C:\Source\File.txt"` that match the pattern `"Uptime is * hours."`. + +It will perform a case-sensitive search, and let the block determine the encoding of the file automatically. + +In this example assume `"C:\Source\File.txt"` contains the following text: + +```plaintext +Error: Failed to determine uptime. +Information: Uptime is 2 hours. +Information: Uptime is 3 hours. +Error: An terminal error has occurred. The service will restart now. +``` + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [File Path][FilePath Property] | `($)FilePath`, with value `@"C:\Source\File.txt"` | `($)FilePath` is a variable of type [String][] | +| [Search Pattern][SearchPattern Property] | `($)SearchPattern`, with value `"Uptime is * hours."` | `($)SearchPattern` is a variable of type [String][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.PatternMatching` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Encoding][Encoding Property] | `($)Encoding`, with value `null` | `($)Encoding` is a variable of type [Encoding][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Matches][Matches Property] | `($)Matches`, with no value | `($)Matches` is a variable that will be set to an [IList][]<[FileMatch][]> value | + +#### Result + +Searching `"C:\Source\File.txt"` for all text matching the pattern `"Uptime is * hours."` (case-sensitive), results in the variable `($)Matches` being updated to the following: + +```json +[ + { + "FilePath": "C:\\Source\\File.txt", + "Line": 2, + "Value": "Uptime is 2 hours.", + "Index": 13, + "Length": 18, + "Groups": {} + }, + { + "FilePath": "C:\\Source\\File.txt", + "Line": 3, + "Value": "Uptime is 3 hours.", + "Index": 13, + "Length": 18, + "Groups": {} + } +] +``` + +*** + +### Get matches for a given regex + +This example will get all matches in the file `"C:\Source\File.txt"` that match the regex `"^Error:.*$"`. + +It will perform a case-sensitive search, explicitly specify the encoding of the file as UTF-8 and will match any line that starts with `"Error:"`. + +In this example assume `"C:\Source\File.txt"` contains the following text: + +```plaintext +Error: Failed to determine uptime. +Information: Uptime is 2 hours. +Information: Uptime is 3 hours. +Error: An terminal error has occurred. The service will restart now. +``` + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [File Path][FilePath Property] | `($)FilePath`, with value `@"C:\Source\File.txt"` | `($)FilePath` is a variable of type [String][] | +| [Search Pattern][SearchPattern Property] | `($)SearchPattern`, with value `"^Error:.*$"` | `($)SearchPattern` is a variable of type [String][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Encoding][Encoding Property] | `($)Encoding`, with value `Encoding.UTF8` | `($)Encoding` is a variable of type [Encoding][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Matches][Matches Property] | `($)Matches`, with no value | `($)Matches` is a variable that will be set to an [IList][]<[FileMatch][]> value | + +#### Result + +Searching `"C:\Source\File.txt"` for all text matching the regex `"^Error:.*$"` (case-sensitive), results in the variable `($)Matches` being updated to the following: + +```json +[ + { + "FilePath": "C:\\Source\\File.txt", + "Line": 1, + "Value": "Error: Failed to determine uptime.", + "Index": 0, + "Length": 34, + "Groups": {} + }, + { + "FilePath": "C:\\Source\\File.txt", + "Line": 4, + "Value": "Error: An terminal error has occurred. The service will restart now.", + "Index": 0, + "Length": 68, + "Groups": {} + } +] +``` + +*** + +## Properties + +### File Path + +The [File Path][FilePath Property] to search for text that matches a given [Search Pattern][SearchPattern Property]. + +The [File Path][FilePath Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +For information about the supported file path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FilePath` with no value | + +### Search Pattern + +The [Search Pattern][SearchPattern Property] which text must match to be included in the returned [Matches][Matches Property]. + +A `null` or empty (i.e. `""`) [Search Pattern][SearchPattern Property] means match anything; all additional block options such as [Search Options][SearchOptions Property] etc. still take effect. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | No value (defaults to `""`) | + +### Search Options + +[Search Options][SearchOptions Property] can be specified to choose whether [Search Pattern][SearchPattern Property] should be interpreted as a ContainsText, PatternMatching or Regex search: + +* `SearchOptions.ContainsText` matches text exactly. +* `SearchOptions.PatternMatching` allows wildcard text matching using [Pattern Matching Syntax][]: + * `*` wildcard character can be used to match `0` or more characters. + * `?` wildcard character can be used to match `0` or `1` character. + * All other characters are treated as a literal character. +* `SearchOptions.Regex` allows regex text matching using [.Net Regex Syntax][Regex Syntax]. + +Please note that with `SearchOptions.ContainsText` overlapping matches are detected (e.g. searching for `"aa"` in `"aaa"` matches `"aa"` at index `0` and `"aa"` at index `1`). With `SearchOptions.Regex` only `"aa"` at index `0` will be matched. + +| | | +|--------------------|---------------------------| +| Data Type | [SearchOptions][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Literal][] | +| Default Value | `ContainsText` | + +### Encoding + +Option to specify the [Encoding][Encoding Property] that should be used to read and search the file. + +Most of the time [Encoding][Encoding Property] can be left as `null`; allowing the block to automatically attempt to detect the encoding of the file based on the presence of byte order marks. However, if it is found that the returned [Matches][Matches Property] are not correct because the block was unable to detect the encoding of the file, it is possible to specify the [Encoding][Encoding Property] explicitly using this property. + +For information about encoding, examples of available encodings and using them, please see [Encoding][Working with Text - Encoding]. + +| | | +|--------------------|---------------------------| +| Data Type | [Encoding][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Comparison Type + +The [Comparison Type][ComparisonType Property] specifying the rules used to match text against the given [Search Pattern][SearchPattern Property]. + +For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [StringComparison][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Literal][] | +| Default Value | `Ordinal` | + +### Matches + +[Matches][Matches Property] containing a [FileMatch][] for every text that matches the specified [Search Pattern][SearchPattern Property] based on the other specified options. + +A basic example with a single [FileMatch][] can be seen below: + +```json +[ + { + "FilePath": "C:\\Source\\File.txt", + "Line": 1, + "Value": "Error: Failed to determine uptime.", + "Index": 0, + "Length": 34, + "Groups": {} + } +] +``` + +For more information see the [example][] above, or the [FileMatch][] data type. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[FileMatch][]> | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Matches` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [ArgumentException][] | Thrown when [Search Options][SearchOptions Property] is not one of the specified [SearchOptions][] types (e.g. `(SearchOptions)10`). | +| | Thrown when [Comparison Type][ComparisonType Property] is not one of the specified [StringComparison][] types (e.g. `(StringComparison)10`). | +| [InvalidPropertyValueException][] | Thrown when [Encoding][Encoding Property] is invalid (e.g. `Encoding.GetEncoding(-1)`). See [Value Is Invalid][]. | +| [OperationFailedException][] | The [File Path][FilePath Property] does not exist. | +| | The [File Path][FilePath Property] points to a folder. | +| | The [File Path][FilePath Property] contains leading spaces. | +| | The [File Path][FilePath Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any file or folder names. | +| | The [File Path][FilePath Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| | The [File Path][FilePath Property] is invalid (for example, it is on an unmapped drive). | +| | The user the flow is executing as does not have the required permissions to search the [File Path][FilePath Property]. | +| | An unexpected error occurs when searching the [File Path][FilePath Property]. | +| [PropertyEmptyException][] | Thrown when [File Path][FilePath Property] is empty (i.e. `""`). | +| [PropertyNullException][] | Thrown when [File Path][FilePath Property] is `null`. | +| [RegexMatchTimeoutException][] | Thrown when using [Search Options][SearchOptions Property] is either `SearchOptions.Regex` or `SearchOptions.PatternMatching` and the execution time of the search exceeds `30` seconds. | +| [RegexParsingFailedException][] | Thrown when [Search Options][SearchOptions Property] is `SearchOptions.Regex` and the [Search Pattern][SearchPattern Property] is not a valid regex (e.g. `(`). | + +## Remarks + +### File Paths + +For information about the supported file path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +### File Path needs escaping + +[File Path][FilePath Property] requires `\` characters to be escaped, otherwise each unescaped `\` will be reported as an `Invalid property value` message when trying to debug the flow. + +Escaping can be done in two ways: + +* Escaping the `\` character with another `\` character (e.g. `"C:\\Source\\File.txt"`), or +* Prepending an `@` character before the start of the [File Path][FilePath Property] (e.g. `@"C:\Source\File.txt"`). + +### Null or empty Search Pattern + +A `null` or empty (i.e. `""`) [Search Pattern][SearchPattern Property] means match anything; all additional block options such as [Search Options][SearchOptions Property] etc. still take effect. + +### Encoding of text + +For information about encoding of text, examples of available encodings and using them, please see [Encoding][Working with Text - Encoding]. + +### Comparison Types + +For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. + +### Known Limitations + +* The text in the file at the specified [File Path][FilePath Property] is searched line-by-line. As a result, when using `SearchOptions.Regex` the in-line `s` regex character is not supported. +* If the text in the file at the specified [File Path][FilePath Property] ends with a blank line (`0` length) that line will not be read and therefore not matched against. +* If [Search Options][SearchOptions Property] is set to `SearchOptions.Regex` or `SearchOptions.PatternMatching` and [Comparison Type][ComparisonType Property] is set to `StringComparison.CurrentCulture`, some characters such as `æ` that is equivalent to `ae` may not evaluate as equal. + +[FilePath Property]: {{< ref "#file-path" >}} +[SearchPattern Property]: {{< ref "#search-pattern" >}} +[SearchOptions Property]: {{< ref "#search-options" >}} +[Encoding Property]: {{< ref "#encoding" >}} +[ComparisonType Property]: {{< ref "#comparison-type" >}} +[Matches Property]: {{< ref "#matches" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.MainDoc" >}} +[ComparisonTypes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.MainDoc" >}} +[Ordinal]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.Ordinal" >}} +[OrdinalIgnoreCase]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.OrdinalIgnoreCase" >}} + +[Working with Text - Encoding]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Encoding.MainDoc" >}} + +[ArgumentException]: {{< url path="MSDocs.DotNet.Api.System.ArgumentException" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[OperationFailedException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.MainDoc" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} +[RegexMatchTimeoutException]: {{< url path="MSDocs.DotNet.Api.System.Text.RegularExpressions.RegexMatchTimeoutException" >}} +[RegexParsingFailedException]: {{< url path="Cortex.Reference.Exceptions.Text.Regex.RegexParsingFailedException.MainDoc" >}} + +[Example]: {{< ref "#get-matches-for-a-given-text" >}} + +[File & Folder Paths]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Paths.MainDoc" >}} +[Pattern Matching Syntax]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.PatternMatchingSyntax.MainDoc" >}} +[Regex Syntax]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.RegexSyntax.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[SearchOptions]: {{< url path="Cortex.Reference.DataTypes.Text.SearchOptions.MainDoc" >}} +[Encoding]: {{< url path="Cortex.Reference.DataTypes.Text.Encoding.MainDoc" >}} +[StringComparison]: {{< url path="Cortex.Reference.DataTypes.Text.StringComparison.MainDoc" >}} +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[FileMatch]: {{< url path="Cortex.Reference.DataTypes.FilesAndFolders.FileMatch.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/search-file/search-files-block.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/search-file/search-files-block.md new file mode 100644 index 000000000..eedddd278 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/search-file/search-files-block.md @@ -0,0 +1,529 @@ +--- +title: "Search Files" +linkTitle: "Search Files" +description: "Searches files at the specified file paths for a matching search pattern." +--- + +{{< figure src="/blocks/files-search-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.FilesAndFolders.SearchFile.SearchFilesBlock)
+ +## Description + +Searches the files at the specified [File Paths][FilePaths Property] for text that matches a given [Search Pattern][SearchPattern Property]. + +Results are returned as [Matches][Matches Property]. + +Additional options can be specified: + +* [Search Options][SearchOptions Property] can be specified to choose whether to use a ContainsText, PatternMatching or Regex search. +* [Encoding][Encoding Property] can be specified if needed to explicitly state the encoding that should be used to read and search the files. +* A [Comparison Type][ComparisonType Property] option can specified to choose how it is determined whether text matches the [Search Pattern][SearchPattern Property] (e.g. whether the search is case-sensitive or case-insensitive). + +## Examples + +### Get matches for a given text + +This example will get all matches in the files `["C:\Source\File1.txt", "C:\Source\File2.txt"]` that match the text `"error"`. + +It will perform a case-insensitive search, and let the block determine the encoding of the files automatically. + +In this example assume `"C:\Source\File1.txt"` contains the following text: + +```plaintext +Error: Failed to determine uptime. +Information: Uptime is 2 hours. +Information: Uptime is 3 hours. +Error: An terminal error has occurred. The service will restart now. +``` + +and `"C:\Source\File2.txt"` contains the following text: + +```plaintext +Information: Uptime is 1 hour. +Information: Uptime is 2 hours. +Information: Uptime is 3 hours. +Error: Failed to determine uptime. +Error: Failed to determine uptime. +Information: Uptime is 6 hours. +``` + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [File Paths][FilePaths Property] | `($)FilePaths`, with value `[@"C:\Source\File1.txt", @"C:\Source\File2.txt"]` | `($)FilePaths` is a variable of type [IEnumerable]<[String][]> | +| [Search Pattern][SearchPattern Property] | `($)SearchPattern`, with value `"error"` | `($)SearchPattern` is a variable of type [String][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Encoding][Encoding Property] | `($)Encoding`, with value `null` | `($)Encoding` is a variable of type [Encoding][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.OrdinalIgnoreCase` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Matches][Matches Property] | `($)Matches`, with no value | `($)Matches` is a variable that will be set to an [IDictionary][]<[String][], [IList][]<[FileMatch][]>> value | + +#### Result + +Searching `"C:\Source\File.txt"` for all text matching `"error"` (case-insensitive), results in the variable `($)Matches` being updated to the following: + +```json +{ + "C:\\Source\\File1.txt" : [ + { + "FilePath": "C:\\Source\\File1.txt", + "Line": 1, + "Value": "Error", + "Index": 0, + "Length": 5, + "Groups": {} + }, + { + "FilePath": "C:\\Source\\File1.txt", + "Line": 4, + "Value": "Error", + "Index": 0, + "Length": 5, + "Groups": {} + }, + { + "FilePath": "C:\\Source\\File1.txt", + "Line": 4, + "Value": "error", + "Index": 19, + "Length": 5, + "Groups": {} + } + ], + "C:\\Source\\File2.txt" : [ + { + "FilePath": "C:\\Source\\File2.txt", + "Line": 4, + "Value": "Error", + "Index": 0, + "Length": 5, + "Groups": {} + }, + { + "FilePath": "C:\\Source\\File2.txt", + "Line": 5, + "Value": "Error", + "Index": 0, + "Length": 5, + "Groups": {} + } + ] +} +``` + +*** + +### Get matches for a given pattern + +This example will get all matches in the files `["C:\Source\File1.txt", "C:\Source\File2.txt"]` that match the pattern `"Uptime is * hour?."`. + +It will perform a case-sensitive search, and let the block determine the encoding of the files automatically. + +In this example assume `"C:\Source\File1.txt"` contains the following text: + +```plaintext +Error: Failed to determine uptime. +Information: Uptime is 2 hours. +Information: Uptime is 3 hours. +Error: An terminal error has occurred. The service will restart now. +``` + +and `"C:\Source\File2.txt"` contains the following text: + +```plaintext +Information: Uptime is 1 hour. +Information: Uptime is 2 hours. +Information: Uptime is 3 hours. +Error: Failed to determine uptime. +Error: Failed to determine uptime. +Information: Uptime is 6 hours. +``` + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [File Paths][FilePaths Property] | `($)FilePaths`, with value `[@"C:\Source\File1.txt", @"C:\Source\File2.txt"]` | `($)FilePaths` is a variable of type [IEnumerable]<[String][]> | +| [Search Pattern][SearchPattern Property] | `($)SearchPattern`, with value `"Uptime is * hour?."` | `($)SearchPattern` is a variable of type [String][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.PatternMatching` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Encoding][Encoding Property] | `($)Encoding`, with value `null` | `($)Encoding` is a variable of type [Encoding][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Matches][Matches Property] | `($)Matches`, with no value | `($)Matches` is a variable that will be set to an [IDictionary][]<[String][], [IList][]<[FileMatch][]>> value | + +#### Result + +Searching the files `["C:\Source\File1.txt", "C:\Source\File2.txt"]` for all text matching the pattern `"Uptime is * hour?."` (case-sensitive), results in the variable `($)Matches` being updated to the following: + +```json +{ + "C:\\Source\\File1.txt" : [ + { + "FilePath": "C:\\Source\\File1.txt", + "Line": 2, + "Value": "Uptime is 2 hours.", + "Index": 13, + "Length": 18, + "Groups": {} + }, + { + "FilePath": "C:\\Source\\File1.txt", + "Line": 3, + "Value": "Uptime is 3 hours.", + "Index": 13, + "Length": 18, + "Groups": {} + } + ], + "C:\\Source\\File2.txt" : [ + { + "FilePath": "C:\\Source\\File2.txt", + "Line": 1, + "Value": "Uptime is 1 hour.", + "Index": 13, + "Length": 17, + "Groups": {} + }, + { + "FilePath": "C:\\Source\\File2.txt", + "Line": 2, + "Value": "Uptime is 2 hours.", + "Index": 13, + "Length": 18, + "Groups": {} + }, + { + "FilePath": "C:\\Source\\File2.txt", + "Line": 3, + "Value": "Uptime is 3 hours.", + "Index": 13, + "Length": 18, + "Groups": {} + }, + { + "FilePath": "C:\\Source\\File2.txt", + "Line": 6, + "Value": "Uptime is 6 hours.", + "Index": 13, + "Length": 18, + "Groups": {} + } + ] +} +``` + +*** + +### Get matches for a given regex + +This example will get all matches in the files `["C:\Source\File1.txt", "C:\Source\File2.txt"]` that match the regex `"^Error:.*$"`. + +It will perform a case-sensitive search, explicitly specify the encoding of the files as UTF-8 and will match any lines that start with `"Error:"`. + +In this example assume `"C:\Source\File1.txt"` contains the following text: + +```plaintext +Error: Failed to determine uptime. +Information: Uptime is 2 hours. +Information: Uptime is 3 hours. +Error: An terminal error has occurred. The service will restart now. +``` + +and `"C:\Source\File2.txt"` contains the following text: + +```plaintext +Information: Uptime is 1 hour. +Information: Uptime is 2 hours. +Information: Uptime is 3 hours. +Error: Failed to determine uptime. +Error: Failed to determine uptime. +Information: Uptime is 6 hours. +``` + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [File Paths][FilePaths Property] | `($)FilePaths`, with value `[@"C:\Source\File1.txt", @"C:\Source\File2.txt"]` | `($)FilePaths` is a variable of type [IEnumerable]<[String][]> | +| [Search Pattern][SearchPattern Property] | `($)SearchPattern`, with value `"^Error:.*$"` | `($)SearchPattern` is a variable of type [String][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Encoding][Encoding Property] | `($)Encoding`, with value `Encoding.UTF8` | `($)Encoding` is a variable of type [Encoding][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Matches][Matches Property] | `($)Matches`, with no value | `($)Matches` is a variable that will be set to an [IDictionary][]<[String][], [IList][]<[FileMatch][]>> value | + +#### Result + +Searching the files `["C:\Source\File1.txt", "C:\Source\File2.txt"]` for all text matching the regex `"^Error:.*$"` (case-sensitive), results in the variable `($)Matches` being updated to the following: + +```json +{ + "C:\\Source\\File1.txt" : [ + { + "FilePath": "C:\\Source\\File1.txt", + "Line": 1, + "Value": "Error: Failed to determine uptime.", + "Index": 0, + "Length": 34, + "Groups": {} + }, + { + "FilePath": "C:\\Source\\File1.txt", + "Line": 4, + "Value": "Error: An terminal error has occurred. The service will restart now.", + "Index": 0, + "Length": 68, + "Groups": {} + } + ], + "C:\\Source\\File2.txt" : [ + { + "FilePath": "C:\\Source\\File2.txt", + "Line": 4, + "Value": "Error: Failed to determine uptime.", + "Index": 0, + "Length": 34, + "Groups": {} + }, + { + "FilePath": "C:\\Source\\File2.txt", + "Line": 5, + "Value": "Error: Failed to determine uptime.", + "Index": 0, + "Length": 34, + "Groups": {} + } + ] +} +``` + +*** + +## Properties + +### File Paths + +The [File Paths][FilePaths Property] to search for text that matches a given [Search Pattern][SearchPattern Property]. + +Each file path in [File Paths][FilePaths Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +For information about the supported file path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[String][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FilePaths` with no value | + +### Search Pattern + +The [Search Pattern][SearchPattern Property] which text must match to be included in the returned [Matches][Matches Property]. + +A `null` or empty (i.e. `""`) [Search Pattern][SearchPattern Property] means match anything; all additional block options such as [Search Options][SearchOptions Property] etc. still take effect. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | No value (defaults to `""`) | + +### Search Options + +[Search Options][SearchOptions Property] can be specified to choose whether [Search Pattern][SearchPattern Property] should be interpreted as a ContainsText, PatternMatching or Regex search: + +* `SearchOptions.ContainsText` matches text exactly. +* `SearchOptions.PatternMatching` allows wildcard text matching using [Pattern Matching Syntax][]: + * `*` wildcard character can be used to match `0` or more characters. + * `?` wildcard character can be used to match `0` or `1` character. + * All other characters are treated as a literal character. +* `SearchOptions.Regex` allows regex text matching using [.Net Regex Syntax][Regex Syntax]. + +Please note that with `SearchOptions.ContainsText` overlapping matches are detected (e.g. searching for `"aa"` in `"aaa"` matches `"aa"` at index `0` and `"aa"` at index `1`). With `SearchOptions.Regex` only `"aa"` at index `0` will be matched. + +| | | +|--------------------|---------------------------| +| Data Type | [SearchOptions][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Literal][] | +| Default Value | `ContainsText` | + +### Encoding + +Option to specify the [Encoding][Encoding Property] that should be used to read and search the files. + +Most of the time [Encoding][Encoding Property] can be left as `null`; allowing the block to automatically attempt to detect the encoding of the files based on the presence of byte order marks. However, if it is found that the returned [Matches][Matches Property] are not correct because the block was unable to detect the encoding of the files, it is possible to specify the [Encoding][Encoding Property] explicitly using this property. + +For information about encoding, examples of available encodings and using them, please see [Encoding][Working with Text - Encoding]. + +| | | +|--------------------|---------------------------| +| Data Type | [Encoding][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Comparison Type + +The [Comparison Type][ComparisonType Property] specifying the rules used to match text against the given [Search Pattern][SearchPattern Property]. + +For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [StringComparison][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Literal][] | +| Default Value | `Ordinal` | + +### Matches + +[Matches][Matches Property] containing an entry for each file in [File Paths][FilePaths Property]. + +The key of each entry is the file path, and the value contains a [FileMatch][] for every text in the file path that matches the specified [Search Pattern][SearchPattern Property] based on the other specified options. + +A basic example with a single file path and a single [FileMatch][] can be seen below: + +```json +{ + "C:\\Source\\File1.txt" : [ + { + "FilePath": "C:\\Source\\File1.txt", + "Line": 1, + "Value": "Error: Failed to determine uptime.", + "Index": 0, + "Length": 34, + "Groups": {} + } + ] +} +``` + +For more information see the [example][] above, or the [FileMatch][] data type. + +| | | +|--------------------|---------------------------| +| Data Type | [IDictionary][]<[String][], [IList][]<[FileMatch][]>> | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Matches` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [ArgumentException][] | Thrown when [Search Options][SearchOptions Property] is not one of the specified [SearchOptions][] types (e.g. `(SearchOptions)10`). | +| | Thrown when [Comparison Type][ComparisonType Property] is not one of the specified [StringComparison][] types (e.g. `(StringComparison)10`). | +| [InvalidPropertyValueException][] | Thrown when [Encoding][Encoding Property] is invalid (e.g. `Encoding.GetEncoding(-1)`). See [Value Is Invalid][]. | +| [OperationFailedException][] | Any file path in [File Paths][FilePaths Property] is `null` or empty (i.e. `""`). For more information, see [Null or Empty File Paths][]| +| | Any file path in [File Paths][FilePaths Property] is duplicated. For more information, see [Duplicate File Paths][] | +| | Any file path in [File Paths][FilePaths Property] does not exist. | +| | Any file path in [File Paths][FilePaths Property] points to a folder. | +| | Any file path in [File Paths][FilePaths Property] contains leading spaces. | +| | Any file path in [File Paths][FilePaths Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any file or folder names. | +| | Any file path in [File Paths][FilePaths Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| | Any file path in [File Paths][FilePaths Property] is invalid (for example, it is on an unmapped drive). | +| | The user the flow is executing as does not have the required permissions to search a file path in [File Paths][FilePaths Property]. | +| | An unexpected error occurs when searching any file path in [File Paths][FilePaths Property]. | +| [PropertyEmptyException][] | Thrown when [File Paths][FilePaths Property] does not contain any items. | +| [PropertyNullException][] | Thrown when [File Paths][FilePaths Property] is `null`. | +| [RegexMatchTimeoutException][] | Thrown when using [Search Options][SearchOptions Property] is either `SearchOptions.Regex` or `SearchOptions.PatternMatching` and the execution time of the search exceeds `30` seconds. | +| [RegexParsingFailedException][] | Thrown when [Search Options][SearchOptions Property] is `SearchOptions.Regex` and the [Search Pattern][SearchPattern Property] is not a valid regex (e.g. `(`). | + +## Remarks + +### File Paths + +For information about the supported file path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +### File Paths needs escaping + +Each file path in [File Paths][FilePaths Property] requires `\` characters to be escaped, otherwise each unescaped `\` will be reported as an `Invalid property value` message when trying to debug the flow. + +Escaping can be done in two ways: + +* Escaping the `\` character with another `\` character (e.g. `"C:\\Source\\File.txt"`), or +* Prepending an `@` character before the start of the [File Paths][FilePaths Property] (e.g. `@"C:\Source\File.txt"`). + +### Null or empty Search Pattern + +A `null` or empty (i.e. `""`) [Search Pattern][SearchPattern Property] means match anything; all additional block options such as [Search Options][SearchOptions Property] etc. still take effect. + +### Encoding of text + +For information about encoding of text, examples of available encodings and using them, please see [Encoding][Working with Text - Encoding]. + +### Comparison Types + +For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. + +### Handling of Exceptions + +If an exception occurs when trying to search a file in the [File Paths][FilePaths Property], it will be recorded and the block will continue processing the remaining files. Once all files are processed, recorded exceptions will be thrown within an [OperationFailedException][]. + +### Known Limitations + +* The text in the files at the specified [File Paths][FilePaths Property] is searched line-by-line. As a result, when using `SearchOptions.Regex` the in-line `s` regex character is not supported. +* If the text in the files at the specified [File Paths][FilePaths Property] ends with a blank line (`0` length) that line will not be read and therefore not matched against. +* If [Search Options][SearchOptions Property] is set to `SearchOptions.Regex` or `SearchOptions.PatternMatching` and [Comparison Type][ComparisonType Property] is set to `StringComparison.CurrentCulture`, some characters such as `æ` that is equivalent to `ae` may not evaluate as equal. + +[FilePaths Property]: {{< ref "#file-paths" >}} +[SearchPattern Property]: {{< ref "#search-pattern" >}} +[SearchOptions Property]: {{< ref "#search-options" >}} +[Encoding Property]: {{< ref "#encoding" >}} +[ComparisonType Property]: {{< ref "#comparison-type" >}} +[Matches Property]: {{< ref "#matches" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.MainDoc" >}} +[ComparisonTypes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.MainDoc" >}} +[Ordinal]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.Ordinal" >}} +[OrdinalIgnoreCase]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.OrdinalIgnoreCase" >}} + +[Working with Text - Encoding]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Encoding.MainDoc" >}} + +[ArgumentException]: {{< url path="MSDocs.DotNet.Api.System.ArgumentException" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[OperationFailedException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.MainDoc" >}} +[Duplicate File Paths]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.IndexesOfDuplicatePaths" >}} +[Null Or Empty File Paths]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.IndexesOfNullOrEmptyPaths" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} +[RegexMatchTimeoutException]: {{< url path="MSDocs.DotNet.Api.System.Text.RegularExpressions.RegexMatchTimeoutException" >}} +[RegexParsingFailedException]: {{< url path="Cortex.Reference.Exceptions.Text.Regex.RegexParsingFailedException.MainDoc" >}} + +[Example]: {{< ref "#get-matches-for-a-given-text" >}} + +[File & Folder Paths]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Paths.MainDoc" >}} +[Pattern Matching Syntax]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.PatternMatchingSyntax.MainDoc" >}} +[Regex Syntax]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.RegexSyntax.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[SearchOptions]: {{< url path="Cortex.Reference.DataTypes.Text.SearchOptions.MainDoc" >}} +[Encoding]: {{< url path="Cortex.Reference.DataTypes.Text.Encoding.MainDoc" >}} +[StringComparison]: {{< url path="Cortex.Reference.DataTypes.Text.StringComparison.MainDoc" >}} +[IDictionary]: {{< url path="Cortex.Reference.DataTypes.Collections.IDictionary.MainDoc" >}} +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[FileMatch]: {{< url path="Cortex.Reference.DataTypes.FilesAndFolders.FileMatch.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/write-file/_index.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/write-file/_index.md new file mode 100644 index 000000000..bcadbe7f5 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/write-file/_index.md @@ -0,0 +1,5 @@ +--- +title: "Write File" +linkTitle: "Write File" +description: "Write the content of a file." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/write-file/write-all-lines-block.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/write-file/write-all-lines-block.md new file mode 100644 index 000000000..e83c5026e --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/write-file/write-all-lines-block.md @@ -0,0 +1,226 @@ +--- +title: "Write All Lines" +linkTitle: "Write All Lines" +description: "Writes all specified lines to a file at the given file path." +--- + +{{< figure src="/blocks/files-write-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.FilesAndFolders.WriteFile.WriteAllLinesBlock)
+ +## Description + +Writes all specified [Lines][Lines Property] to the end of the file at the given [File Path][FilePath Property], with an option to explicitly specify the [Encoding][Encoding Property] to write the file as if needed. + +An option can also be specified to [Overwrite][Overwrite Property] rather than append to the file. + +## Examples + +### Write all lines, appending to the end of the file + +This example will append `["New Line 1", "New Line 2"]` to `"C:\Source\File.txt"`, using UTF-8 encoding without a byte order mark. + +In this example assume `"C:\Source\File.txt"` contains 2 lines: + +```plaintext +Original Line 1 +Original Line 2 +``` + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [File Path][FilePath Property] | `($)FilePath`, with value `@"C:\Source\File.txt"` | `($)FilePath` is a variable of type [String][] | +| [Lines][Lines Property] | `($)Lines`, with value `["New Line 1", "New Line 2"]` | `($)Lines` is a variable of type [IEnumerable][]<[String][]> | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `false` | `($)Overwrite` is a variable of type [Boolean][] | +| [Encoding][Encoding Property] | `($)Encoding`, with value `null` | `($)Encoding` is a variable of type [Encoding][] | + +#### Result + +Writing `["New Line 1", "New Line 2"]` to `"C:\Source\File.txt"` results in the content being updated to the following: + +```plaintext +Original Line 1 +Original Line 2 +New Line 1 +New Line 2 +``` + +*** + +### Write all lines, overwriting the file content + +This example will overwrite the content of `"C:\Source\File.txt"` with `["New Line 1", "New Line 2"]`, using UTF-8 encoding without a byte order mark. + +In this example assume `"C:\Source\File.txt"` contains 2 lines: + +```plaintext +Original Line 1 +Original Line 2 +``` + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [File Path][FilePath Property] | `($)FilePath`, with value `@"C:\Source\File.txt"` | `($)FilePath` is a variable of type [String][] | +| [Lines][Lines Property] | `($)Lines`, with value `["New Line 1", "New Line 2"]` | `($)Lines` is a variable of type [IEnumerable][]<[String][]> | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `true` | `($)Overwrite` is a variable of type [Boolean][] | +| [Encoding][Encoding Property] | `($)Encoding`, with value `null` | `($)Encoding` is a variable of type [Encoding][] | + +#### Result + +Overwriting `"C:\Source\File.txt"` with `["New Line 1", "New Line 2"]` results in the content being updated to the following: + +```plaintext +New Line 1 +New Line 2 +``` + +*** + +## Properties + +### File Path + +The [File Path][FilePath Property] to write all [Lines][Lines Property] to. + +The [File Path][FilePath Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +If the file does not exist at the [File Path][FilePath Property], a new file is created, and any non-existing folders will also be created. + +If the file already exists at the [File Path][FilePath Property] and [Overwrite][Overwrite Property] is: + +* `true`, the [Lines][Lines Property] overwrite the existing file content. +* `false`, the [Lines][Lines Property] are appended to the existing file content. + +For information about the supported file path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FilePath` with no value | + +### Lines + +The [Lines][Lines Property] to write to the file. + +[Lines][Lines Property] can be `null` or empty (i.e. `""`). + +If [Lines][Lines Property] is `null` or empty (i.e. `""`) and [Overwrite][Overwrite Property] is: + +* `true`, a blank file will be written. +* `false`, nothing is written. + +If [Lines][Lines Property] contains an entry that is `null` or empty (i.e. `""`) a blank line will be written for that entry. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[String][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Lines` with no value | + +### Overwrite + +Option to [Overwrite][Overwrite Property] the file content with the [Lines][Lines Property], rather than appending them. + +By default, this is set to `false` to avoid implicit and accidental overwriting of the file content. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `false` | + +### Encoding + +Option to specify the [Encoding][Encoding Property] that should be used to write the file. + +If the [Encoding][Encoding Property] is left as `null`, the [Lines][Lines Property] will be written using UTF-8 encoding without a byte order mark. + +For information about encoding, examples of available encodings and using them, please see [Encoding][Working with Text - Encoding]. + +| | | +|--------------------|---------------------------| +| Data Type | [Encoding][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [InvalidPropertyValueException][] | Thrown when [Encoding][Encoding Property] is invalid (e.g. `Encoding.GetEncoding(-1)`). See [Value Is Invalid][]. | +| [OperationFailedException][] | The [File Path][FilePath Property] points to a folder. | +| | The [File Path][FilePath Property] contains leading spaces. | +| | The [File Path][FilePath Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any file or folder names. | +| | The [File Path][FilePath Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| | The [File Path][FilePath Property] is invalid (for example, it is on an unmapped drive). | +| | The file at the specified [File Path][FilePath Property] is hidden or is a System file, and overwrite is `true`. | +| | The file at the specified [File Path][FilePath Property] is a read-only file. | +| | The user the flow is executing as does not have the required permissions to write to the file. | +| | An unexpected error occurs when writing the file. | +| [PropertyEmptyException][] | Thrown when [File Path][FilePath Property] is empty (i.e. `""`). | +| [PropertyNullException][] | Thrown when [File Path][FilePath Property] is `null`. | + +## Remarks + +### File Paths + +For information about the supported file path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +### File Path needs escaping + +[File Path][FilePath Property] requires `\` characters to be escaped, otherwise each unescaped `\` will be reported as an `Invalid property value` message when trying to debug the flow. + +Escaping can be done in two ways: + +* Escaping the `\` character with another `\` character (e.g. `"C:\\Source\\File.txt"`), or +* Prepending an `@` character before the start of the [File Path][FilePath Property] (e.g. `@"C:\Source\File.txt"`). + +### Encoding of text + +For information about encoding of text, examples of available encodings and using them, please see [Encoding][Working with Text - Encoding]. + +[FilePath Property]: {{< ref "#file-path" >}} +[Lines Property]: {{< ref "#lines" >}} +[Overwrite Property]: {{< ref "#overwrite" >}} +[Encoding Property]: {{< ref "#encoding" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[Working with Text - Encoding]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Encoding.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[OperationFailedException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.MainDoc" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[File & Folder Paths]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Paths.MainDoc" >}} + +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Encoding]: {{< url path="Cortex.Reference.DataTypes.Text.Encoding.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/write-file/write-all-text-block.md b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/write-file/write-all-text-block.md new file mode 100644 index 000000000..4b9ebd6b4 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Files-And-Folders/write-file/write-all-text-block.md @@ -0,0 +1,223 @@ +--- +title: "Write All Text" +linkTitle: "Write All Text" +description: "Writes all specified text to a file at the given file path." +--- + +{{< figure src="/blocks/files-write-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.FilesAndFolders.WriteFile.WriteAllTextBlock)
+ +## Description + +Writes all specified [Text][Text Property] to the end of the file at the given [File Path][FilePath Property], with an option to explicitly specify the [Encoding][Encoding Property] to write the file as if needed. + +An option can also be specified to [Overwrite][Overwrite Property] rather than append to the file. + +## Examples + +### Write all text, appending to the end of the file + +This example will append `"New Line 1\r\nNew Line 2"` to `"C:\Source\File.txt"`, using UTF-8 encoding without a byte order mark. + +In this example assume `"C:\Source\File.txt"` contains the following text: + +```plaintext +Original Line 1 +Original Line 2 +``` + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [File Path][FilePath Property] | `($)FilePath`, with value `@"C:\Source\File.txt"` | `($)FilePath` is a variable of type [String][] | +| [Text][Text Property] | `($)Text`, with value `"New Line 1\r\nNew Line 2"` | `($)Text` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `false` | `($)Overwrite` is a variable of type [Boolean][] | +| [Encoding][Encoding Property] | `($)Encoding`, with value `null` | `($)Encoding` is a variable of type [Encoding][] | + +#### Result + +Writing `"New Line 1\r\nNew Line 2"` to `"C:\Source\File.txt"` results in the content being updated to the following: + +```plaintext +Original Line 1 +Original Line 2 +New Line 1 +New Line 2 +``` + +*** + +### Write all text, overwriting the file content + +This example will overwrite the content of `"C:\Source\File.txt"` with `"New Line 1\r\nNew Line 2"`, using UTF-8 encoding without a byte order mark. + +In this example assume `"C:\Source\File.txt"` contains the following text: + +```plaintext +Original Line 1 +Original Line 2 +``` + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [File Path][FilePath Property] | `($)FilePath`, with value `@"C:\Source\File.txt"` | `($)FilePath` is a variable of type [String][] | +| [Text][Text Property] | `($)Text`, with value `"New Line 1\r\nNew Line 2"` | `($)Text` is a variable of type [String][] | +| [Overwrite][Overwrite Property] | `($)Overwrite`, with value `true` | `($)Overwrite` is a variable of type [Boolean][] | +| [Encoding][Encoding Property] | `($)Encoding`, with value `null` | `($)Encoding` is a variable of type [Encoding][] | + +#### Result + +Overwriting `"C:\Source\File.txt"` with `"New Line 1\r\nNew Line 2"` results in the content being updated to the following: + +```plaintext +New Line 1 +New Line 2 +``` + +*** + +## Properties + +### File Path + +The [File Path][FilePath Property] to write the [Text][Text Property] to. + +The [File Path][FilePath Property] is case-insensitive, cannot contain any wildcard characters, and any trailing spaces will be automatically removed. + +If the file does not exist at the [File Path][FilePath Property], a new file is created, and any non-existing folders will also be created. + +If the file already exists at the [File Path][FilePath Property] and [Overwrite][Overwrite Property] is: + +* `true`, the [Text][Text Property] overwrites the existing file content. +* `false`, the [Text][Text Property] is appended to the existing file content. + +For information about the supported file path formats (i.e. absolute, relative, UNC etc.) and examples of each, please see [File & Folder Paths][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)FilePath` with no value | + +### Text + +The [Text][Text Property] to write to the file. + +[Text][Text Property] can be `null` or empty (i.e. `""`). + +If [Text][Text Property] is `null` or empty (i.e. `""`) and [Overwrite][Overwrite Property] is: + +* `true`, a blank file will be written. +* `false`, nothing is written. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Overwrite + +Option to [Overwrite][Overwrite Property] the file content with the [Text][Text Property], rather than appending it. + +By default, this is set to `false` to avoid implicit and accidental overwriting of the file content. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `false` | + +### Encoding + +Option to specify the [Encoding][Encoding Property] that should be used to write the file. + +If the [Encoding][Encoding Property] is left as `null`, the [Text][Text Property] will be written using UTF-8 encoding without a byte order mark. + +For information about encoding, examples of available encodings and using them, please see [Encoding][Working with Text - Encoding]. + +| | | +|--------------------|---------------------------| +| Data Type | [Encoding][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [InvalidPropertyValueException][] | Thrown when [Encoding][Encoding Property] is invalid (e.g. `Encoding.GetEncoding(-1)`). See [Value Is Invalid][]. | +| [OperationFailedException][] | The [File Path][FilePath Property] points to a folder. | +| | The [File Path][FilePath Property] contains leading spaces. | +| | The [File Path][FilePath Property] contains only whitespace, or the NUL character (i.e. `\0`), or contains one or more invalid characters (i.e. `"`, `*`, `?`, `\|`, `<`, `>`, `:`, `\`, `/`) in any file or folder names. | +| | The [File Path][FilePath Property] exceeds the system-defined maximum length (typically 32,767 characters). | +| | The [File Path][FilePath Property] is invalid (for example, it is on an unmapped drive). | +| | The file at the specified [File Path][FilePath Property] is hidden or is a System file, and overwrite is `true`. | +| | The file at the specified [File Path][FilePath Property] is a read-only file. | +| | The user the flow is executing as does not have the required permissions to write to the file. | +| | An unexpected error occurs when writing the file. | +| [PropertyEmptyException][] | Thrown when [File Path][FilePath Property] is empty (i.e. `""`). | +| [PropertyNullException][] | Thrown when [File Path][FilePath Property] is `null`. | + +## Remarks + +### File Paths + +For information about the supported file path formats (i.e. absolute, relative, UNC etc.) and examples of each, including how it is determined if a path points to a folder or a file, please see [File & Folder Paths][]. + +### File Path needs escaping + +[File Path][FilePath Property] requires `\` characters to be escaped, otherwise each unescaped `\` will be reported as an `Invalid property value` message when trying to debug the flow. + +Escaping can be done in two ways: + +* Escaping the `\` character with another `\` character (e.g. `"C:\\Source\\File.txt"`), or +* Prepending an `@` character before the start of the [File Path][FilePath Property] (e.g. `@"C:\Source\File.txt"`). + +### Encoding of text + +For information about encoding of text, examples of available encodings and using them, please see [Encoding][Working with Text - Encoding]. + +[FilePath Property]: {{< ref "#file-path" >}} +[Text Property]: {{< ref "#text" >}} +[Overwrite Property]: {{< ref "#overwrite" >}} +[Encoding Property]: {{< ref "#encoding" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[Working with Text - Encoding]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Encoding.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[OperationFailedException]: {{< url path="Cortex.Reference.Exceptions.FilesAndFolders.OperationFailedException.MainDoc" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[File & Folder Paths]: {{< url path="Cortex.Reference.Concepts.WorkingWith.FilesAndFolders.Paths.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Encoding]: {{< url path="Cortex.Reference.DataTypes.Text.Encoding.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/Get-Count/_index.md b/content/en/docs/2023.9/Reference/Blocks/Lists/Get-Count/_index.md new file mode 100644 index 000000000..6e11b63ca --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/Get-Count/_index.md @@ -0,0 +1,5 @@ +--- +title: "Get Count(s) of Items" +linkTitle: "Get Count(s) of Items" +description: "Get the count(s) of items in a list." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/Get-Count/get-count-of-all-items-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/Get-Count/get-count-of-all-items-block-2.md new file mode 100644 index 000000000..1c31ce973 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/Get-Count/get-count-of-all-items-block-2.md @@ -0,0 +1,115 @@ +--- +title: "Get Count Of All Items" +linkTitle: "Get Count Of All Items" +description: "Gets the count of all items in a List." +--- + +{{< figure src="/blocks/lists-get-count-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.GetCount.GetCountOfAllItemsBlock`2)
+ +## Description + +Gets the [Count][Count Property] of all items in a [List][List Property]. + +## Examples + +### Get Count of all items in a List + +This example will get the count of all items in `["Some Text", 1]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Count][Count Property] | `($)Count`, with no value | `($)Count` is a variable that will be set to an [Int32][] value | + +#### Result + +Getting the count of all items in `["Some Text", 1]` results in the variable `($)Count` being updated to the following: + +```json +2 +``` + +*** + +## Properties + +### List + +The [List][List Property] to get the [Count][Count Property] of all items for. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items in the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Count + +The [Count][Count Property] of all items in [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Count` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | + +## Remarks + +### Empty List + +If [List][List Property] is empty (i.e. `[]`), the variable specified in the [Count][Count Property] property is set to `0`. + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Count Property]: {{< ref "#count" >}} + +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/Get-Count/get-count-of-items-with-value-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/Get-Count/get-count-of-items-with-value-block-2.md new file mode 100644 index 000000000..209b5523e --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/Get-Count/get-count-of-items-with-value-block-2.md @@ -0,0 +1,145 @@ +--- +title: "Get Count Of Items With Value" +linkTitle: "Get Count Of Items With Value" +description: "Gets the count of items in a List with the specified value." +--- + +{{< figure src="/blocks/lists-get-count-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.GetCount.GetCountOfItemsWithValueBlock`2)
+ +## Description + +Gets the [Count][Count Property] of items in a [List][List Property] with the specified [Value][Value Property]. + +## Examples + +### Get Count of items in a List with a Value + +This example will get the count of items in `["Some Text", 1]` with the value `1`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Value][Value Property] | `($)Value`, with value `1` | `($)Value` is a variable of type [Int32][] | +| [Count][Count Property] | `($)Count`, with no value | `($)Count` is a variable that will be set to an [Int32][] value | + +#### Result + +Getting the count of items in `["Some Text", 1]` with the value `1` results in the variable `($)Count` being updated to the following: + +```json +1 +``` + +*** + +## Properties + +### List + +The [List][List Property] to get the [Count][Count Property] of items with the specified [Value][Value Property] for. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items in the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Value + +The [Value][Value Property] items must match to be included in the [Count][Count Property]. + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Count + +The [Count][Count Property] of items in [List][List Property] with the specified [Value][Value Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Count` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [InvalidPropertyValueException][] | Thrown when [Value][Value Property] is `null` and [List][List Property] only accepts non-nullable value types. See [Value Is Invalid][]. | +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | + +## Remarks + +### Item Equality + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +### Empty List + +If [List][List Property] is empty (i.e. `[]`), the variable specified in the [Count][Count Property] property is set to `0`. + +### No items matching Value + +If [List][List Property] does not contain items matching the specified [Value][Value Property], the variable specified in the [Count][Count Property] property is set to `0`. + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Value Property]: {{< ref "#value" >}} +[Count Property]: {{< ref "#count" >}} + +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/Get-Count/get-count-of-items-with-values-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/Get-Count/get-count-of-items-with-values-block-2.md new file mode 100644 index 000000000..256866b3c --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/Get-Count/get-count-of-items-with-values-block-2.md @@ -0,0 +1,149 @@ +--- +title: "Get Counts Of Items With Values" +linkTitle: "Get Counts Of Items With Values" +description: "Gets the counts of items in a List matching each of the specified values." +--- + +{{< figure src="/blocks/lists-get-count-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.GetCount.GetCountsOfItemsWithValuesBlock`2)
+ +## Description + +Gets the [Counts][Counts Property] of items in a [List][List Property] matching each of the specified [Values][Values Property]. + +## Examples + +### Get Counts of items in a List matching each of the Values + +This example will get the counts of items in `["Some Text", 1]` matching each of the values `[1, 2, 3]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Values][Values Property] | `($)Values`, with value `[1, 2, 3]` | `($)Values` is a variable of type [IEnumerable][]<[Int32][]> | +| [Counts][Counts Property] | `($)Counts`, with no value | `($)Counts` is a variable that will be set to an [IList][]<[Int32][]> value | + +#### Result + +Getting the counts of items in `["Some Text", 1]` matching each of the values `[1, 2, 3]` results in the variable `($)Counts` being updated to the following: + +```json +[1, 0, 0] +``` + +The counts of items matching each value are added to `($)Counts` at the same [index][Indexes] the value is in `($)Values`. In this example, there is one item matching the first value `1`, zero items matching the second value `2` and zero items matching the third value `3`, resulting in `($)Counts` being set to `[1, 0, 0]`. + +*** + +## Properties + +### List + +The [List][List Property] to get the [Counts][Counts Property] of items matching each of the specified [Values][Values Property] for. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items in the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Values + +The [Values][Values Property] items must match to be included in the [Counts][Counts Property]. + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Counts + +The [Counts][Counts Property] of items in [List][List Property] matching each of the specified [Values][Values Property]. + +For each value in [Values][Values Property], [Counts][Counts Property] will have a corresponding item whose value is the count of items in [List][List Property] matching the value. + +I.e. The count of items matching the first value in [Values][Values Property] will be saved as the first item in [Counts][Counts Property]; the count of items matching the second value in [Values][Values Property] will be saved as the second item in [Counts][Counts Property] etc. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[Int32][]> | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Counts` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyNullException][] | Thrown when [List][List Property] or [Values][Values Property] are `null`. | + +## Remarks + +### Item Equality + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +### Empty Values + +If [Values][Values Property] is empty (i.e. `[]`), the variable specified in the [Counts][Counts Property] property is set to empty (i.e. `[]`). + +### No items matching a specified value in Values + +If [List][List Property] does not contain items matching one of the specified [Values][Values Property], `0` is written to the corresponding item in [Counts][Counts Property] for that value. + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Values Property]: {{< ref "#values" >}} +[Counts Property]: {{< ref "#counts" >}} + +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} +[Indexes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Indexes.MainDoc" >}} + +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/Get-Index/_index.md b/content/en/docs/2023.9/Reference/Blocks/Lists/Get-Index/_index.md new file mode 100644 index 000000000..f76c2f371 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/Get-Index/_index.md @@ -0,0 +1,5 @@ +--- +title: "Get Index(es) of Items" +linkTitle: "Get Index(es) of Items" +description: "Get the index of an item or indexes of multiple items contained in a list." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/Get-Index/get-index-of-item-with-value-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/Get-Index/get-index-of-item-with-value-block-2.md new file mode 100644 index 000000000..15a2b1dac --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/Get-Index/get-index-of-item-with-value-block-2.md @@ -0,0 +1,207 @@ +--- +title: "Get Index Of Item With Value" +linkTitle: "Get Index Of Item With Value" +description: "Gets the index of the specified occurrence of an item in a List matching a value." +--- + +{{< figure src="/blocks/lists-get-index-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.GetIndex.GetIndexOfItemWithValueBlock`2)
+ +## Description + +Gets the [Index][Index Property] of the specified [Occurrence][Occurrence Property] of an item in a [List][List Property] matching a [Value][Value Property]. + +## Examples + +### Get the Index of the first Occurrence of an item in a List matching a Value + +This example will attempt to get the index of the first occurrence of an item matching the value `1` from `[1, 2, 3, 3, 2, 1]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[1, 2, 3, 3, 2, 1]` | `($)List` is a variable of type [IList][]<[Int32][]> | +| [Value][Value Property] | `($)Value`, with value `1` | `($)Value` is a variable of type [Int32][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | +| [Index][Index Property] | `($)Index`, with no value | `($)Index` is a variable that will be set to an [Int32][] value | + +#### Result + +An [Occurrence][Occurrence Property] of `1` means the first occurrence; `2` means second etc. + +Attempting to get the index of the first occurrence of an item matching the value `1` from `[1, 2, 3, 3, 2, 1]` results in the variable `($)Index` being updated to the following: + +```json +0 +``` + +*** + +### Get the Index of the last Occurrence of an item in a List matching a Value + +This example will attempt to get the index of the last occurrence of an item matching the value `1` from `[1, 2, 3, 3, 2, 1]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[1, 2, 3, 3, 2, 1]` | `($)List` is a variable of type [IList][]<[Int32][]> | +| [Value][Value Property] | `($)Value`, with value `1` | `($)Value` is a variable of type [Int32][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `-1` | `($)Occurrence` is a variable of type [Int32][] | +| [Index][Index Property] | `($)Index`, with no value | `($)Index` is a variable that will be set to an [Int32][] value | + +#### Result + +An [Occurrence][Occurrence Property] of `-1`, means the last occurrence; `-2` means second last etc. + +Attempting to get the index of the last occurrence of an item matching the value `1` from `[1, 2, 3, 3, 2, 1]` results in the variable `($)List` being updated to the following: + +```json +5 +``` + +*** + +## Properties + +### List + +The [List][List Property] to get the [Index][Index Property] of the specified [Occurrence][Occurrence Property] of matching item from. + +Items are considered matching if they have the specified [Value][Value Property]. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items in the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Value + +The [Value][Value Property] the item to get the [Index][Index Property] of the specified [Occurrence][Occurrence Property] must match. + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Occurrence + +The [Occurrence][Occurrence Property] of matching item to get the [Index][Index Property] of. + +Items are considered matching if they have the specified [Value][Value Property]. + +For information about [supported values][Occurrences] for the [Occurrence][Occurrence Property] property and examples of how it can be used, please see [Occurrences][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `1` | + +### Index + +[Int32][] indicating the [Index][Index Property] of the specified [Occurrence][Occurrence Property] of item matching [Value][Value Property] in [List][List Property]. + +If there is no specified [Occurrence][Occurrence Property] of item matching [Value][Value Property] in [List][List Property], the specified variable will be set to `-1`. + +For information about what an index is, please see [Indexes][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Index` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|-------------| +| [InvalidPropertyValueException][] | Thrown when [Value][Value Property] is `null` and [List][List Property] only accepts non-nullable value types. See [Value Is Invalid][]. | +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | + +## Remarks + +### Item Equality + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +### Occurrences + +For information about [supported values][Occurrences] for the [Occurrence][Occurrence Property] property and examples of how it can be used, please see [Occurrences][]. + +### Empty List + +If [List][List Property] is empty (i.e. `[]`), the variable specified in the [Index][Index Property] property is set to `-1`. + +### No items matching Value, or Occurrence is not present + +If [List][List Property] does not contain items matching the specified [Value][Value Property] or the specified [Occurrence][Occurrence Property] is not present, the variable specified in the [Index][Index Property] property is set to `-1`. + +### Occurrence is zero + +If the [Occurrence][Occurrence Property] is set to `0`, the variable specified in the [Index][Index Property] property is set to `-1`. + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Value Property]: {{< ref "#value" >}} +[Occurrence Property]: {{< ref "#occurrence" >}} +[Index Property]: {{< ref "#index" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Indexes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Indexes.MainDoc" >}} +[Occurrences]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Occurrences.MainDoc" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/Get-Index/get-indexes-of-items-with-value-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/Get-Index/get-indexes-of-items-with-value-block-2.md new file mode 100644 index 000000000..db2ee6f45 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/Get-Index/get-indexes-of-items-with-value-block-2.md @@ -0,0 +1,153 @@ +--- +title: "Get Indexes Of Items With Value" +linkTitle: "Get Indexes Of Items With Value" +description: "Gets the indexes of all items in a List matching a value." +--- + +{{< figure src="/blocks/lists-get-index-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.GetIndex.GetIndexesOfItemsWithValueBlock`2)
+ +## Description + +Gets the [Indexes][Indexes Property] of all items in a [List][List Property] matching a [Value][Value Property]. + +## Examples + +### Get the Indexes of all items in a List matching a Value + +This example will attempt to get the indexes of all items matching the value `1` from `[1, 2, 3, 3, 2, 1]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[1, 2, 3, 3, 2, 1]` | `($)List` is a variable of type [IList][]<[Int32][]> | +| [Value][Value Property] | `($)Value`, with value `1` | `($)Value` is a variable of type [Int32][] | +| [Indexes][Indexes Property] | `($)Indexes`, with no value | `($)Indexes` is a variable that will be set to an [IList][]<[Int32][]> value | + +#### Result + +Attempting to get the indexes of all items matching the value `1` from `[1, 2, 3, 3, 2, 1]` results in the variable `($)Indexes` being updated to the following: + +```json +[0, 5] +``` + +*** + +## Properties + +### List + +The [List][List Property] to get the [Indexes][Indexes Property] of matching items from. + +Items are considered matching if they have the specified [Value][Value Property]. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items in the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Value + +The [Value][Value Property] the items to get the [Indexes][Indexes Property] of must match. + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Indexes + +[IList][]<[Int32][]> containing the [Indexes][Indexes Property] of items matching [Value][Value Property] in [List][List Property]. + +If there are no items matching [Value][Value Property] in [List][List Property], the specified variable will be set to `[-1]`. + +For information about what an index is, please see [Indexes][]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[Int32][]> | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Indexes` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|-------------| +| [InvalidPropertyValueException][] | Thrown when [Value][Value Property] is `null` and [List][List Property] only accepts non-nullable value types. See [Value Is Invalid][]. | +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | + +## Remarks + +### Item Equality + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +### Empty List + +If [List][List Property] is empty (i.e. `[]`), the variable specified in the [Indexes][Indexes Property] property is set to `[-1]`. + +### No items matching Value + +If [List][List Property] does not contain items matching the specified [Value][Value Property], the variable specified in the [Indexes][Indexes Property] property is set to `[-1]`. + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Value Property]: {{< ref "#value" >}} +[Indexes Property]: {{< ref "#indexes" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Indexes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Indexes.MainDoc" >}} +[Occurrences]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Occurrences.MainDoc" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/_index.md b/content/en/docs/2023.9/Reference/Blocks/Lists/_index.md new file mode 100644 index 000000000..81c3fb421 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/_index.md @@ -0,0 +1,5 @@ +--- +title: "Lists" +linkTitle: "Lists" +description: "Blocks related to working with Lists." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/add-item/_index.md b/content/en/docs/2023.9/Reference/Blocks/Lists/add-item/_index.md new file mode 100644 index 000000000..46346dea3 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/add-item/_index.md @@ -0,0 +1,5 @@ +--- +title: "Add Item(s)" +linkTitle: "Add Item(s)" +description: "Add an item or multiple items to a list." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/add-item/add-item-at-beginning-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/add-item/add-item-at-beginning-block-2.md new file mode 100644 index 000000000..c8b95f5da --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/add-item/add-item-at-beginning-block-2.md @@ -0,0 +1,137 @@ +--- +title: "Add Item At Beginning" +linkTitle: "Add Item At Beginning" +description: "Adds an Item at the beginning of a List." +--- + +{{< figure src="/blocks/lists-add-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.AddItem.AddItemAtBeginningBlock`2)
+ +## Description + +Adds an [Item][Item Property] at the beginning of a [List][List Property]. + +## Examples + +### Add an Item at the beginning of an empty List + +This example will add `"New Item"` at the beginning of `[]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Item][Item Property] | `($)Item`, with value `"New Item"` | `($)Item` is a variable of type [String][] | + +#### Result + +Adding `"New Item"` at the beginning of `[]` results in the variable `($)List` being updated to the following: + +```json +["New Item"] +``` + +*** + +### Add an Item at the beginning of a List + +This example will add `"New Item"` at the beginning of `["Some Text", 1]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Item][Item Property] | `($)Item`, with value `"New Item"` | `($)Item` is a variable of type [String][] | + +#### Result + +Adding `"New Item"` at the beginning of `["Some Text", 1]` results in the variable `($)List` being updated to the following: + +```json +["New Item", "Some Text", 1] +``` + +*** + +## Properties + +### List + +The [List][List Property] where the [Item][Item Property] is added. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items that can be added to the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Item + +The [Item][Item Property] to be added at the beginning of the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyListException][] | Thrown when [List][List Property] is read-only. | +| [InvalidPropertyValueException][] | Thrown when [Item][Item Property] is `null` and [List][List Property] only accepts non-nullable value types. See [Value Is Invalid][]. | +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | + +## Remarks + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Item Property]: {{< ref "#item" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/add-item/add-item-at-end-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/add-item/add-item-at-end-block-2.md new file mode 100644 index 000000000..6343dc1f4 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/add-item/add-item-at-end-block-2.md @@ -0,0 +1,138 @@ +--- +title: "Add Item At End" +linkTitle: "Add Item At End" +description: "Adds an Item at the end of a List." +--- + +{{< figure src="/blocks/lists-add-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.AddItem.AddItemAtEndBlock`2)
+ +## Description + +Adds an [Item][Item Property] at the end of a [List][List Property]. + +## Examples + +### Add an Item at the end of an empty List + +This example will add `"New Item"` at the end of `[]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Item][Item Property] | `($)Item`, with value `"New Item"` | `($)Item` is a variable of type [String][] | + +#### Result + +Adding `"New Item"` at the end of `[]` results in the variable `($)List` being updated to the following: + +```json +["New Item"] +``` + +*** + +### Add an Item at the end of a List + +This example will add `"New Item"` at the end of `["Some Text", 1]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Item][Item Property] | `($)Item`, with value `"New Item"` | `($)Item` is a variable of type [String][] | + +#### Result + +Adding `"New Item"` at the end of `["Some Text", 1]` results in the variable `($)List` being updated to the following: + +```json +["Some Text", 1, "New Item"] +``` + +*** + +## Properties + +### List + +The [List][List Property] where the [Item][Item Property] is added. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items that can be added to the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Item + +The [Item][Item Property] to be added at the end of the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyListException][] | Thrown when [List][List Property] is read-only. | +| [InvalidPropertyValueException][] | Thrown when [Item][Item Property] is `null` and [List][List Property] only accepts non-nullable value types. See [Value Is Invalid][]. | +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | + +## Remarks + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Item Property]: {{< ref "#item" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/add-item/add-item-at-index-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/add-item/add-item-at-index-block-2.md new file mode 100644 index 000000000..bd220f095 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/add-item/add-item-at-index-block-2.md @@ -0,0 +1,186 @@ +--- +title: "Add Item At Index" +linkTitle: "Add Item At Index" +description: "Adds an Item at the specified Index of a List." +--- + +{{< figure src="/blocks/lists-add-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.AddItem.AddItemAtIndexBlock`2)
+ +## Description + +Adds an [Item][Item Property] at the specified [Index][Index Property] of a [List][List Property]. + +## Examples + +### Add an Item at the first Index (i.e. `0`) of an empty List + +This example will add `"New Item"` at index `0` of `[]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Item][Item Property] | `($)Item`, with value `"New Item"` | `($)Item` is a variable of type [String][] | +| [Index][Index Property] | `($)Index`, with value `0` | `($)Index` is a variable of type [Int32][] | + +#### Result + +Adding `"New Item"` at index `0` of `[]` results in the variable `($)List` being updated to the following: + +```json +["New Item"] +``` + +*** + +### Add an Item at the first Index (i.e. `0`) of a List + +This example will add `"New Item"` at index `0` of `["Some Text", 1]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Item][Item Property] | `($)Item`, with value `"New Item"` | `($)Item` is a variable of type [String][] | +| [Index][Index Property] | `($)Index`, with value `0` | `($)Index` is a variable of type [Int32][] | + +#### Result + +Adding `"New Item"` at index `0` of `["Some Text", 1]` results in the variable `($)List` being updated to the following: + +```json +["New Item", "Some Text", 1] +``` + +*** + +### Add an Item at the end (i.e. Index equals count of items) of a List + +This example will add `"New Item"` at index `2` of `["Some Text", 1]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Item][Item Property] | `($)Item`, with value `"New Item"` | `($)Item` is a variable of type [String][] | +| [Index][Index Property] | `($)Index`, with value `2` | `($)Index` is a variable of type [Int32][] | + +#### Result + +Adding `"New Item"` at index `2` of `["Some Text", 1]` results in the variable `($)List` being updated to the following: + +```json +["Some Text", 1, "New Item"] +``` + +*** + +## Properties + +### List + +The [List][List Property] where the [Item][Item Property] is added. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items that can be added to the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Item + +The [Item][Item Property] to be added at the specified [Index][Index Property] of the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Index + +The [Index][Index Property] to add the [Item][Item Property] at. + +Valid values are between and including `0` and the total count of items in the [List][List Property]. + +For information about what an index is, please see [Indexes][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `0` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyListException][] | Thrown when [List][List Property] is read-only. | +| [InvalidPropertyValueException][] | Thrown when [Item][Item Property] is `null` and [List][List Property] only accepts non-nullable value types. See [Value Is Invalid][]. | +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | +| [PropertyValueOutOfRangeException][] | Thrown when [Index][Index Property] is out of the range of the list indexes. Valid indexes are between and including `0` and the count of items in the [List][List Property]. | + +## Remarks + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Item Property]: {{< ref "#item" >}} +[Index Property]: {{< ref "#index" >}} + +[Indexes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Indexes.MainDoc" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[PropertyValueOutOfRangeException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyValueOutOfRangeException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/add-item/add-items-at-beginning-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/add-item/add-items-at-beginning-block-2.md new file mode 100644 index 000000000..c3217127d --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/add-item/add-items-at-beginning-block-2.md @@ -0,0 +1,139 @@ +--- +title: "Add Items At Beginning" +linkTitle: "Add Items At Beginning" +description: "Adds Items at the beginning of a List." +--- + +{{< figure src="/blocks/lists-add-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.AddItem.AddItemsAtBeginningBlock`2)
+ +## Description + +Adds [Items][Items Property] at the beginning of a [List][List Property]. + +## Examples + +### Add Items at the beginning of an empty List + +This example will add `["New Item 1", "New Item 2"]` at the beginning of `[]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Items][Items Property] | `($)Items`, with value `["New Item 1", "New Item 2"]` | `($)Items` is a variable of type [IEnumerable][]<[String][]> | + +#### Result + +Adding `["New Item 1", "New Item 2"]` at the beginning of `[]` results in the variable `($)List` being updated to the following: + +```json +["New Item 1", "New Item 2"] +``` + +*** + +### Add Items at the beginning of a List + +This example will add `["New Item 1", "New Item 2"]` at the beginning of `["Some Text", 1]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Items][Items Property] | `($)Items`, with value `["New Item 1", "New Item 2"]` | `($)Items` is a variable of type [IEnumerable][]<[String][]> | + +#### Result + +Adding `["New Item 1", "New Item 2"]` at the beginning of `["Some Text", 1]` results in the variable `($)List` being updated to the following: + +```json +["New Item 1", "New Item 2", "Some Text", 1] +``` + +*** + +## Properties + +### List + +The [List][List Property] where the [Items][Items Property] are added. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items that can be added to the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Items + +The [Items][Items Property] to be added at the beginning of the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyListException][] | Thrown when [List][List Property] is read-only. | +| [PropertyNullException][] | Thrown when [List][List Property] or [Items][Items Property] is `null`. | + +## Remarks + +### Empty Items + +If [Items][Items Property] is empty (i.e. `[]`) there is nothing to add, so no operation is performed. + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Items Property]: {{< ref "#items" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/add-item/add-items-at-end-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/add-item/add-items-at-end-block-2.md new file mode 100644 index 000000000..47cdbcb01 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/add-item/add-items-at-end-block-2.md @@ -0,0 +1,139 @@ +--- +title: "Add Items At End" +linkTitle: "Add Items At End" +description: "Adds Items at the end of a List." +--- + +{{< figure src="/blocks/lists-add-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.AddItem.AddItemsAtEndBlock`2)
+ +## Description + +Adds [Items][Items Property] at the end of a [List][List Property]. + +## Examples + +### Add Items at the end of an empty List + +This example will add `["New Item 1", "New Item 2"]` at the end of `[]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Items][Items Property] | `($)Items`, with value `["New Item 1", "New Item 2"]` | `($)Items` is a variable of type [IEnumerable][]<[String][]> | + +#### Result + +Adding `["New Item 1", "New Item 2"]` at the end of `[]` results in the variable `($)List` being updated to the following: + +```json +["New Item 1", "New Item 2"] +``` + +*** + +### Add Items at the end of a List + +This example will add `["New Item 1", "New Item 2"]` at the end of `["Some Text", 1]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Items][Items Property] | `($)Items`, with value `["New Item 1", "New Item 2"]` | `($)Items` is a variable of type [IEnumerable][]<[String][]> | + +#### Result + +Adding `["New Item 1", "New Item 2"]` at the end of `["Some Text", 1]` results in the variable `($)List` being updated to the following: + +```json +["Some Text", 1, "New Item 1", "New Item 2"] +``` + +*** + +## Properties + +### List + +The [List][List Property] where the [Items][Items Property] are added. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items that can be added to the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Items + +The [Items][Items Property] to be added at the end of the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyListException][] | Thrown when [List][List Property] is read-only. | +| [PropertyNullException][] | Thrown when [List][List Property] or [Items][Items Property] is `null`. | + +## Remarks + +### Empty Items + +If [Items][Items Property] is empty (i.e. `[]`) there is nothing to add, so no operation is performed. + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Items Property]: {{< ref "#items" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/add-item/add-items-at-index-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/add-item/add-items-at-index-block-2.md new file mode 100644 index 000000000..85614e718 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/add-item/add-items-at-index-block-2.md @@ -0,0 +1,185 @@ +--- +title: "Add Items At Index" +linkTitle: "Add Items At Index" +description: "Adds Items at the specified Index of a List." +--- + +{{< figure src="/blocks/lists-add-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.AddItem.AddItemsAtIndexBlock`2)
+ +## Description + +Adds [Items][Items Property] at the specified [Index][Index Property] of a [List][List Property]. + +## Examples + +### Add Items at the first index (i.e. `0`) of an empty List + +This example will add `["New Item 1", "New Item 2"]` at index `0` of `[]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Items][Items Property] | `($)Items`, with value `["New Item 1", "New Item 2"]` | `($)Items` is a variable of type [IEnumerable][]<[String][]> | +| [Index][Index Property] | `($)Index`, with value `0` | `($)Index` is a variable of type [Int32][] | + +#### Result + +Adding `["New Item 1", "New Item 2"]` at index `0` of `[]` results in the variable `($)List` being updated to the following: + +```json +["New Item 1", "New Item 2"] +``` + +*** + +### Add Items at the first Index (i.e. `0`) of a List + +This example will add `["New Item 1", "New Item 2"]` at index `0` of `["Some Text", 1]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Items][Items Property] | `($)Items`, with value `["New Item 1", "New Item 2"]` | `($)Items` is a variable of type [IEnumerable][]<[String][]> | +| [Index][Index Property] | `($)Index`, with value `0` | `($)Index` is a variable of type [Int32][] | + +#### Result + +Adding `["New Item 1", "New Item 2"]` at index `0` of `["Some Text", 1]` results in the variable `($)List` being updated to the following: + +```json +["New Item 1", "New Item 2", "Some Text", 1] +``` + +*** + +### Add Items at the end (i.e. Index equals count of items) of a List + +This example will add `["New Item 1", "New Item 2"]` at index `2` of `["Some Text", 1]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Items][Items Property] | `($)Items`, with value `["New Item 1", "New Item 2"]` | `($)Items` is a variable of type [IEnumerable][]<[String][]> | +| [Index][Index Property] | `($)Index`, with value `2` | `($)Index` is a variable of type [Int32][] | + +#### Result + +Adding `["New Item 1", "New Item 2"]` at index `2` of `["Some Text", 1]` results in the variable `($)List` being updated to the following: + +```json +["Some Text", 1, "New Item 1", "New Item 2"] +``` + +*** + +## Properties + +### List + +The [List][List Property] where the [Items][Items Property] are added. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items that can be added to the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Items + +The [Items][Items Property] to be added at the specified [Index][Index Property] of the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Index + +The [Index][Index Property] to add the [Items][Items Property] at. + +Valid values are between and including `0` and the total count of items in the [List][List Property]. + +For information about what an index is, please see [Indexes][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `0` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyListException][] | Thrown when [List][List Property] is read-only. | +| [PropertyNullException][] | Thrown when [List][List Property] or [Items][Items Property] is `null`. | +| [PropertyValueOutOfRangeException][] | Thrown when [Index][Index Property] is out of the range of the list indexes. Valid indexes are between and including `0` and the count of items in the [List][List Property]. | + +## Remarks + +### Empty Items + +If [Items][Items Property] is empty (i.e. `[]`) there is nothing to add, so no operation is performed. + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Items Property]: {{< ref "#items" >}} +[Index Property]: {{< ref "#index" >}} + +[Indexes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Indexes.MainDoc" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} +[PropertyValueOutOfRangeException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyValueOutOfRangeException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/contains-item/_index.md b/content/en/docs/2023.9/Reference/Blocks/Lists/contains-item/_index.md new file mode 100644 index 000000000..30f4fc7df --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/contains-item/_index.md @@ -0,0 +1,5 @@ +--- +title: "Contains Item(s)" +linkTitle: "Contains Item(s)" +description: "Check if an item or multiple items are contained in a list." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/contains-item/contains-item-with-value-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/contains-item/contains-item-with-value-block-2.md new file mode 100644 index 000000000..9f91f15b2 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/contains-item/contains-item-with-value-block-2.md @@ -0,0 +1,167 @@ +--- +title: "Contains Item With Value" +linkTitle: "Contains Item With Value" +description: "Checks if a List contains at least one item matching the specified value." +--- + +{{< figure src="/blocks/lists-contains-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.ContainsItem.ContainsItemWithValueBlock`2)
+ +## Description + +Checks if [List][List Property] contains at least one item matching [Value][Value Property]. + +## Examples + +### List contains item with Value + +This example will check whether `[1, 2, 3, 3, 2, 1]` contains the value `1`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[1, 2, 3, 3, 2, 1]` | `($)List` is a variable of type [IList][]<[Int32][]> | +| [Value][Value Property] | `($)Value`, with value `1` | `($)Value` is a variable of type [Int32][] | +| [Contains Item][ContainsItem Property] | `($)ContainsItem`, with no value | `($)ContainsItem` is a variable that will be set to a [Boolean][] value | + +#### Result + +`[1, 2, 3, 3, 2, 1]` contains two items with the value `1`. Therefore, the variable `($)ContainsItem` will be updated to the following: + +```json +true +``` + +*** + +### List does not contain item with Value + +This example will check whether `[1, 2, 3, 3, 2, 1]` contains the value `10`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[1, 2, 3, 3, 2, 1]` | `($)List` is a variable of type [IList][]<[Int32][]> | +| [Value][Value Property] | `($)Value`, with value `10` | `($)Value` is a variable of type [Int32][] | +| [Contains Item][ContainsItem Property] | `($)ContainsItem`, with no value | `($)ContainsItem` is a variable that will be set to a [Boolean][] value | + +#### Result + +`[1, 2, 3, 3, 2, 1]` does not contain any items with the value `10`. Therefore, the variable `($)ContainsItem` will be updated to the following: + +```json +false +``` + +*** + +## Properties + +### List + +The [List][List Property] to check whether it contains at least one item matching the specified [Value][Value Property]. + +Items are considered matching if they have the specified [Value][Value Property]. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items in the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Value + +The [Value][Value Property] to check for matching items. + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Contains Item + +The result of the contains item check. + +If [List][List Property] contains at least one item matching the specified [Value][Value Property], the specified variable will be set to `true`, otherwise it will be set to `false`. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)ContainsItem` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [InvalidPropertyValueException][] | Thrown when [Value][Value Property] is `null` and [List][List Property] only accepts non-nullable value types. See [Value Is Invalid][]. | +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | + +## Remarks + +### Item Equality + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +### Empty List + +If [List][List Property] is empty (i.e. `[]`), the variable specified in the [Contains Item][ContainsItem Property] property is set to `false`. + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Value Property]: {{< ref "#value" >}} +[ContainsItem Property]: {{< ref "#contains-item" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/contains-item/contains-items-with-values-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/contains-item/contains-items-with-values-block-2.md new file mode 100644 index 000000000..a8ca644ee --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/contains-item/contains-items-with-values-block-2.md @@ -0,0 +1,168 @@ +--- +title: "Contains Items With Values" +linkTitle: "Contains Items With Values" +description: "Checks if a List contains at least one item matching each of the specified values." +--- + +{{< figure src="/blocks/lists-contains-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.ContainsItem.ContainsItemsWithValuesBlock`2)
+ +## Description + +Checks if [List][List Property] contains at least one item matching each of the specified [Values][Values Property]. + +## Examples + +### List contains items with Values + +This example will check whether `[1, 2, 3, 3, 2, 1]` contains at least one item matching each of the values in `[1, 2, 3]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[1, 2, 3, 3, 2, 1]` | `($)List` is a variable of type [IList][]<[Int32][]> | +| [Values][Values Property] | `($)Values`, with value `[1, 2, 3]` | `($)Values` is a variable of type [IEnumerable][]<[Int32][]> | +| [Contains Items][ContainsItems Property] | `($)ContainsItems`, with no value | `($)ContainsItems` is a variable that will be set to a [Boolean][] value | + +#### Result + +`[1, 2, 3, 3, 2, 1]` contains at least one item matching each of the values in `[1, 2, 3]`; it contains two items with the value `1`, two items with the value `2` and two items with the value `3`. Therefore, the variable `($)ContainsItems` will be updated to the following: + +```json +true +``` + +*** + +### List does not contain items with Values + +This example will check whether `[1, 2, 3, 3, 2, 1]` contains at least one item matching each of the values in `[1, 2, 3, 10]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[1, 2, 3, 3, 2, 1]` | `($)List` is a variable of type [IList][]<[Int32][]> | +| [Values][Values Property] | `($)Values`, with value `[1, 2, 3, 10]` | `($)Values` is a variable of type [IEnumerable][]<[Int32][]> | +| [Contains Items][ContainsItems Property] | `($)ContainsItems`, with no value | `($)ContainsItems` is a variable that will be set to a [Boolean][] value | + +#### Result + +`[1, 2, 3, 3, 2, 1]` does not contain at least one item matching each of the values in `[1, 2, 3, 10]`; it contains two items with the value `1`, two items with the value `2` and two items with the value `3`, but no items with the value `10`. Therefore, the variable `($)ContainsItems` will be updated to the following: + +```json +false +``` + +*** + +## Properties + +### List + +The [List][List Property] to check whether it contains at least one item matching each of the specified [Values][Values Property]. + +Items are considered matching if they have a value matching one of the specified [Values][Values Property]. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items in the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Values + +The [Values][Values Property] to check for matching items. + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Contains Items + +The result of the contains items check. + +If [List][List Property] contains at least one item matching each of the specified [Values][Values Property], the specified variable will be set to `true`, otherwise it will be set to `false`. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)ContainsItems` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyNullException][] | Thrown when [List][List Property] or [Values][Values Property] are `null`. | + +## Remarks + +### Item Equality + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +### Empty List + +If [List][List Property] is empty (i.e. `[]`), the variable specified in the [Contains Items][ContainsItems Property] property is set to `false`. + +### Empty Values + +If [Values][Values Property] is empty (i.e. `[]`), the variable specified in the [Contains Items][ContainsItems Property] property is set to `false`. + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Values Property]: {{< ref "#values" >}} +[ContainsItems Property]: {{< ref "#contains-items" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/get-item/_index.md b/content/en/docs/2023.9/Reference/Blocks/Lists/get-item/_index.md new file mode 100644 index 000000000..cb3bb09ff --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/get-item/_index.md @@ -0,0 +1,5 @@ +--- +title: "Get Item(s)" +linkTitle: "Get Item(s)" +description: "Get an item or multiple items from a list." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-item-at-beginning-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-item-at-beginning-block-2.md new file mode 100644 index 000000000..b107fc830 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-item-at-beginning-block-2.md @@ -0,0 +1,113 @@ +--- +title: "Get Item At Beginning" +linkTitle: "Get Item At Beginning" +description: "Gets the item at the beginning of a List." +--- + +{{< figure src="/blocks/lists-get-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.GetItem.GetItemAtBeginningBlock`2)
+ +## Description + +Gets the [Item][Item Property] at the beginning of a [List][List Property]. + +## Examples + +### Get the Item at the beginning of a List + +This example will get the item at the beginning of `["Some Text", 1]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Item][Item Property] | `($)Item`, with no value | `($)Item` is a variable that will be set to the type of the item (i.e. [String]) | + +#### Result + +Getting the item at the beginning of `["Some Text", 1]` results in the variable `($)Item` being updated to the following: + +```json +"Some Text" +``` + +*** + +## Properties + +### List + +The [List][List Property] to get the item from. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items in the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Item + +The [Item][Item Property] at the beginning of [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyEmptyException][] | Thrown when [List][List Property] contains no items. | +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | + +## Remarks + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Item Property]: {{< ref "#item" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-item-at-end-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-item-at-end-block-2.md new file mode 100644 index 000000000..72c195e61 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-item-at-end-block-2.md @@ -0,0 +1,113 @@ +--- +title: "Get Item At End" +linkTitle: "Get Item At End" +description: "Gets the item at the end of a List." +--- + +{{< figure src="/blocks/lists-get-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.GetItem.GetItemAtEndBlock`2)
+ +## Description + +Gets the [Item][Item Property] at the end of a [List][List Property]. + +## Examples + +### Get the Item at the end of a List + +This example will get the item at the end of `["Some Text", 1]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Item][Item Property] | `($)Item`, with no value | `($)Item` is a variable that will be set to the type of the item (i.e. [Int32]) | + +#### Result + +Getting the item at the end of `["Some Text", 1]` results in the variable `($)Item` being updated to the following: + +```json +1 +``` + +*** + +## Properties + +### List + +The [List][List Property] to get the item from. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items in the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Item + +The [Item][Item Property] at the end of [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyEmptyException][] | Thrown when [List][List Property] contains no items. | +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | + +## Remarks + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Item Property]: {{< ref "#item" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-item-at-index-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-item-at-index-block-2.md new file mode 100644 index 000000000..4a9000a42 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-item-at-index-block-2.md @@ -0,0 +1,157 @@ +--- +title: "Get Item At Index" +linkTitle: "Get Item At Index" +description: "Gets the item at the specified index of a List." +--- + +{{< figure src="/blocks/lists-get-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.GetItem.GetItemAtIndexBlock`2)
+ +## Description + +Gets the [Item][Item Property] at the specified [Index][Index Property] of a [List][List Property]. + +## Examples + +### Get the Item at the first Index (i.e. `0`) of a List + +This example will get the item at index `0` of `["Some Text", 1]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Index][Index Property] | `($)Index`, with value `0` | `($)Index` is a variable of type [Int32][] | +| [Item][Item Property] | `($)Item`, with no value | `($)Item` is a variable that will be set to the type of the item (i.e. [String]) | + +#### Result + +Getting the item at index `0` of `["Some Text", 1]` results in the variable `($)Item` being updated to the following: + +```json +"Some Text" +``` + +*** + +### Get the Item at the last Index (i.e. Index equals count of items - `1`) of a List + +This example will get the item at index `1` of `["Some Text", 1]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Index][Index Property] | `($)Index`, with value `1` | `($)Index` is a variable of type [Int32][] | +| [Item][Item Property] | `($)Item`, with no value | `($)Item` is a variable that will be set to the type of the item (i.e. [Int32]) | + +#### Result + +Getting the item at index `1` of `["Some Text", 1]` results in the variable `($)Item` being updated to the following: + +```json +1 +``` + +*** + +## Properties + +### List + +The [List][List Property] to get the item from. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items in the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Index + +The [Index][Index Property] to get the item at. + +Valid values are between and including `0` and the total count of items in the [List][List Property] - `1`. + +For information about what an index is, please see [Indexes][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `0` | + +### Item + +The [Item][Item Property] at the specified [Index][Index Property] of [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Item` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | +| [PropertyValueOutOfRangeException][] | Thrown when [List][List Property] contains no items. | +| | Thrown when [Index][Index Property] is out of the range of the list indexes. Valid indexes are between and including `0` and the count of items in the [List][List Property] - `1`. | + +## Remarks + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Index Property]: {{< ref "#index" >}} +[Item Property]: {{< ref "#item" >}} + +[Indexes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Indexes.MainDoc" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} +[PropertyValueOutOfRangeException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyValueOutOfRangeException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-items-at-beginning-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-items-at-beginning-block-2.md new file mode 100644 index 000000000..2e3dc1817 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-items-at-beginning-block-2.md @@ -0,0 +1,137 @@ +--- +title: "Get Items At Beginning" +linkTitle: "Get Items At Beginning" +description: "Gets a count of items at the beginning of a List." +--- + +{{< figure src="/blocks/lists-get-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.GetItem.GetItemsAtBeginningBlock`2)
+ +## Description + +Gets the specified [Count][Count Property] of [Items][Items Property] at the beginning of a [List][List Property]. + +## Examples + +### Get Count of Items at the beginning of a List + +This example will get `2` items at the beginning of `["Some Text", 1, "Some More Text", 2]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1, "Some More Text", 2]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Count][Count Property] | `($)Count`, with value `2` | `($)Count` is a variable of type [Int32][] | +| [Items][Items Property] | `($)Items`, with no value | `($)Items` is a variable that will be set to an [IList][]<[dynamic][]> value | + +#### Result + +Getting `2` items from the beginning of `["Some Text", 1, "Some More Text", 2]` results in the variable `($)Items` being updated to the following: + +```json +["Some Text", 1] +``` + +*** + +## Properties + +### List + +The [List][List Property] to get the [Items][Items Property] from. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items in the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Count + +The [Count][Count Property] of [Items][Items Property] to get. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `-1` | + +### Items + +The [Items][Items Property] at the beginning of [List][List Property]. + +[Items][Items Property] will be in the same order they are defined in [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Items` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | +| [PropertyValueOutOfRangeException][] | Thrown when [Count][Count Property] is greater than the count of items in the [List][List Property] - `1`. | + +## Remarks + +### Negative Count + +If [Count][Count Property] is negative, [Items][Items Property] contains all items in the [List][List Property]. + +### Zero Count + +If [Count][Count Property] is `0`, [Items][Items Property] is set to an empty list (i.e. `[]`). + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Count Property]: {{< ref "#count" >}} +[Items Property]: {{< ref "#items" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} +[PropertyValueOutOfRangeException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyValueOutOfRangeException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-items-at-end-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-items-at-end-block-2.md new file mode 100644 index 000000000..3bbe88f0c --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-items-at-end-block-2.md @@ -0,0 +1,137 @@ +--- +title: "Get Items At End" +linkTitle: "Get Items At End" +description: "Gets a count of items at the end of a List." +--- + +{{< figure src="/blocks/lists-get-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.GetItem.GetItemsAtEndBlock`2)
+ +## Description + +Gets the specified [Count][Count Property] of [Items][Items Property] at the end of a [List][List Property]. + +## Examples + +### Get Count of Items at the end of a List + +This example will get `2` items at the end of `["Some Text", 1, "Some More Text", 2]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1, "Some More Text", 2]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Count][Count Property] | `($)Count`, with value `2` | `($)Count` is a variable of type [Int32][] | +| [Items][Items Property] | `($)Items`, with no value | `($)Items` is a variable that will be set to an [IList][]<[dynamic][]> value | + +#### Result + +Getting `2` items from the end of `["Some Text", 1, "Some More Text", 2]` results in the variable `($)Items` being updated to the following: + +```json +["Some More Text", 2] +``` + +*** + +## Properties + +### List + +The [List][List Property] to get the [Items][Items Property] from. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items in the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Count + +The [Count][Count Property] of [Items][Items Property] to get. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `-1` | + +### Items + +The [Items][Items Property] at the end of [List][List Property]. + +[Items][Items Property] will be in the same order they are defined in [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Items` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | +| [PropertyValueOutOfRangeException][] | Thrown when [Count][Count Property] is greater than the count of items in the [List][List Property] - `1`. | + +## Remarks + +### Negative Count + +If [Count][Count Property] is negative, [Items][Items Property] contains all items in the [List][List Property]. + +### Zero Count + +If [Count][Count Property] is `0`, [Items][Items Property] is set to an empty list (i.e. `[]`). + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Count Property]: {{< ref "#count" >}} +[Items Property]: {{< ref "#items" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} +[PropertyValueOutOfRangeException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyValueOutOfRangeException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-items-at-index-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-items-at-index-block-2.md new file mode 100644 index 000000000..ca52461af --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-items-at-index-block-2.md @@ -0,0 +1,162 @@ +--- +title: "Get Items At Index" +linkTitle: "Get Items At Index" +description: "Gets a count of items starting at the specified index of a List." +--- + +{{< figure src="/blocks/lists-get-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.GetItem.GetItemsAtIndexBlock`2)
+ +## Description + +Gets the specified [Count][Count Property] of [Items][Items Property] starting at the given [Index][Index Property] of a [List][List Property]. + +## Examples + +### Get Count of Items at the first Index (i.e. `0`) of a List + +This example will get `2` items at index `0` of `["Some Text", 1, "Some More Text", 2]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1, "Some More Text", 2]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Index][Index Property] | `($)Index`, with value `0` | `($)Index` is a variable of type [Int32][] | +| [Count][Count Property] | `($)Count`, with value `2` | `($)Count` is a variable of type [Int32][] | +| [Items][Items Property] | `($)Items`, with no value | `($)Items` is a variable that will be set to an [IList][]<[dynamic][]> value | + +#### Result + +Getting `2` items at index `0` of `["Some Text", 1, "Some More Text", 2]` results in the variable `($)Items` being updated to the following: + +```json +["Some Text", 1] +``` + +*** + +## Properties + +### List + +The [List][List Property] to get the [Items][Items Property] from. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items in the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Index + +The [Index][Index Property] to get the [Count][Count Property] of [Items][Items Property] at. This is an inclusive index, which means the item at the specified index will be included. + +Valid values are between and including `0` and the total count of items in the [List][List Property] - `1`. + +For information about what an index is, please see [Indexes][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `0` | + +### Count + +The [Count][Count Property] of [Items][Items Property] to get. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `-1` | + +### Items + +The [Items][Items Property] at the specified [Index][Index Property] of [List][List Property]. + +[Items][Items Property] will be in the same order they are defined in [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Items` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | +| [PropertyValueOutOfRangeException][] | Thrown when [Index][Index Property] is less than `0` or greater than the count of items in [List][List Property] - `1`. | +| | Thrown when [Index][Index Property] + [Count][Count Property] is greater than the count of items in the [List][List Property] - `1`. | + +## Remarks + +### Index is inclusive + +The [Index][Index Property] is an inclusive [index][Indexes], which means the item at the index will be included in [Items][Items Property]. + +### Negative Count + +If [Count][Count Property] is negative, [Items][Items Property] contains all items after and including the item at the specified [Index][Index Property] in the [List][List Property]. + +### Zero Count + +If [Count][Count Property] is `0`, [Items][Items Property] is set to an empty list (i.e. `[]`). + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Index Property]: {{< ref "#index" >}} +[Count Property]: {{< ref "#count" >}} +[Items Property]: {{< ref "#items" >}} + +[Indexes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Indexes.MainDoc" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} +[PropertyValueOutOfRangeException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyValueOutOfRangeException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-items-at-indexes-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-items-at-indexes-block-2.md new file mode 100644 index 000000000..50d62f8a4 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/get-item/get-items-at-indexes-block-2.md @@ -0,0 +1,139 @@ +--- +title: "Get Items At Indexes" +linkTitle: "Get Items At Indexes" +description: "Gets the items at each of the specified indexes of a List." +--- + +{{< figure src="/blocks/lists-get-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.GetItem.GetItemsAtIndexesBlock`2)
+ +## Description + +Gets the [Items][Items Property] at each of the specified [Indexes][Indexes Property] of a [List][List Property]. + +## Examples + +### Get Items at the first and third Indexes (i.e. [`0`, `2`]) of a List + +This example will get items at indexes `0` and `2` of `["Some Text", 1, "Some More Text", 2]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1, "Some More Text", 2]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Indexes][Indexes Property] | `($)Indexes`, with value [`0`, `2`] | `($)Indexes` is a variable of type [IEnumerable][]<[Int32][]> | +| [Items][Items Property] | `($)Items`, with no value | `($)Items` is a variable that will be set to an [IList][]<[dynamic][]> value | + +#### Result + +Getting items at indexes `0` and `2` of `["Some Text", 1, "Some More Text", 2]` results in the variable `($)Items` being updated to the following: + +```json +["Some Text", "Some More Text"] +``` + +*** + +## Properties + +### List + +The [List][List Property] to get the [Items][Items Property] from. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items in the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Indexes + +The [Indexes][Indexes Property] of the [Items][Items Property] to get. + +Valid values are between and including `0` and the total count of items in the [List][List Property] - `1`. + +For information about what an index is, please see [Indexes][]. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[Int32][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | `new List(Cortex.Blocks.Lists.RemoveItem.RemoveAllItemsBlock`2)
+ +## Description + +Removes all items from a [List][List Property]. + +## Examples + +### Remove all items from an empty List + +This example will attempt to remove all items from `[]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[]` | `($)List` is a variable of type [IList][]<[dynamic][]> | + +#### Result + +Attempting to remove all items from `[]` results in no operation, as there is nothing to remove. Therefore, the variable `($)List` remains: + +```json +[] +``` + +*** + +### Remove all items from a List + +This example will remove all items from `["Some Text", 1]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1]` | `($)List` is a variable of type [IList][]<[dynamic][]> | + +#### Result + +Removing all items from `["Some Text", 1]` results in the variable `($)List` being updated to the following: + +```json +[] +``` + +*** + +## Properties + +### List + +The [List][List Property] where all items are removed from. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items that can be removed from the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyListException][] | Thrown when [List][List Property] is read-only. | +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | + +## Remarks + +### Empty List + +If [List][List Property] is empty (i.e. `[]`) there is nothing to remove, so no operation is performed. + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} + +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-duplicate-items-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-duplicate-items-block-2.md new file mode 100644 index 000000000..d0b3803bc --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-duplicate-items-block-2.md @@ -0,0 +1,153 @@ +--- +title: "Remove Duplicate Items" +linkTitle: "Remove Duplicate Items" +description: "Removes duplicate items from a List." +--- + +{{< figure src="/blocks/lists-remove-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.RemoveItem.RemoveDuplicateItemsBlock`2)
+ +## Description + +Removes duplicate items from a [List][List Property]. + +## Examples + +### Remove duplicate items from an empty List + +This example will attempt to remove duplicate items from `[]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[]` | `($)List` is a variable of type [IList][]<[dynamic][]> | + +#### Result + +Attempting to remove duplicate items from `[]` results in no operation, as there is nothing to remove. Therefore, the variable `($)List` remains: + +```json +[] +``` + +*** + +### Remove duplicate items from a List without duplicates + +This example will attempt to remove duplicate items from `["Some Text", 1]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1]` | `($)List` is a variable of type [IList][]<[dynamic][]> | + +#### Result + +Attempting to remove duplicate items from `["Some Text", 1]` results in no operation, as there are no duplicates to remove. Therefore, the variable `($)List` remains: + +```json +["Some Text", 1] +``` + +*** + +### Remove duplicate items from a List containing duplicates + +This example will remove duplicate items from `["Some Text", 1, "Some Text", 1]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1, "Some Text", 1]` | `($)List` is a variable of type [IList][]<[dynamic][]> | + +#### Result + +Removing duplicate items from `["Some Text", 1, "Some Text", 1]` results in the second occurrences of `"Some Text"` and `1` being removed; with the variable `($)List` being updated to the following: + +```json +["Some Text", 1] +``` + +*** + +## Properties + +### List + +The [List][List Property] where duplicate items are removed from. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items that can be removed from the [List][List Property]. + +For information and examples of how it is determined whether two items are considered the same, please see [Object Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyListException][] | Thrown when [List][List Property] is read-only. | +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | + +## Remarks + +### Empty List + +If [List][List Property] is empty (i.e. `[]`) there is nothing to remove, so no operation is performed. + +### List with no duplicates + +If [List][List Property] does not contain duplicates there is nothing to remove, so no operation is performed. + +### Which duplicates are removed? + +If [List][List Property] contains duplicates, the first occurrences of the duplicated items are kept; all other occurrences are removed. + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} + +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-item-at-beginning-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-item-at-beginning-block-2.md new file mode 100644 index 000000000..88032c710 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-item-at-beginning-block-2.md @@ -0,0 +1,121 @@ +--- +title: "Remove Item At Beginning" +linkTitle: "Remove Item At Beginning" +description: "Removes the item at the beginning of a List." +--- + +{{< figure src="/blocks/lists-remove-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.RemoveItem.RemoveItemAtBeginningBlock`2)
+ +## Description + +Removes the item at the beginning of a [List][List Property]. + +## Examples + +### Remove the Item at the beginning of an empty List + +This example will attempt to remove the item at the beginning of `[]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[]` | `($)List` is a variable of type [IList][]<[dynamic][]> | + +#### Result + +Attempting to remove the item at the beginning of `[]` results in no operation, as there is nothing to remove. Therefore, the variable `($)List` remains: + +```json +[] +``` + +*** + +### Remove the Item at the beginning of a List + +This example will remove the item at the beginning of `["Some Text", 1]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1]` | `($)List` is a variable of type [IList][]<[dynamic][]> | + +#### Result + +Removing the item at the beginning of `["Some Text", 1]` results in the variable `($)List` being updated to the following: + +```json +[1] +``` + +*** + +## Properties + +### List + +The [List][List Property] where the item is removed from. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items that can be removed from the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyListException][] | Thrown when [List][List Property] is read-only. | +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | + +## Remarks + +### Empty List + +If [List][List Property] is empty (i.e. `[]`) there is nothing to remove, so no operation is performed. + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} + +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-item-at-end-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-item-at-end-block-2.md new file mode 100644 index 000000000..a128b122d --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-item-at-end-block-2.md @@ -0,0 +1,121 @@ +--- +title: "Remove Item At End" +linkTitle: "Remove Item At End" +description: "Removes the item at the end of a List." +--- + +{{< figure src="/blocks/lists-remove-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.RemoveItem.RemoveItemAtEndBlock`2)
+ +## Description + +Removes the item at the end of a [List][List Property]. + +## Examples + +### Remove the Item at the end of an empty List + +This example will attempt to remove the item at the end of `[]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[]` | `($)List` is a variable of type [IList][]<[dynamic][]> | + +#### Result + +Attempting to remove the item at the end of `[]` results in no operation, as there is nothing to remove. Therefore, the variable `($)List` remains: + +```json +[] +``` + +*** + +### Remove the Item at the end of a List + +This example will remove the item at the end of `["Some Text", 1]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1]` | `($)List` is a variable of type [IList][]<[dynamic][]> | + +#### Result + +Removing the item at the end of `["Some Text", 1]` results in the variable `($)List` being updated to the following: + +```json +["Some Text"] +``` + +*** + +## Properties + +### List + +The [List][List Property] where the item is removed from. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items that can be removed from the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyListException][] | Thrown when [List][List Property] is read-only. | +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | + +## Remarks + +### Empty List + +If [List][List Property] is empty (i.e. `[]`) there is nothing to remove, so no operation is performed. + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} + +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-item-at-index-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-item-at-index-block-2.md new file mode 100644 index 000000000..20c7208c9 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-item-at-index-block-2.md @@ -0,0 +1,163 @@ +--- +title: "Remove Item At Index" +linkTitle: "Remove Item At Index" +description: "Removes the item at the specified index of a List." +--- + +{{< figure src="/blocks/lists-remove-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.RemoveItem.RemoveItemAtIndexBlock`2)
+ +## Description + +Removes the item at the specified [Index][Index Property] of a [List][List Property]. + +## Examples + +### Remove the Item at the first Index (i.e. `0`) of an empty List + +This example will attempt to remove the item at index `0` of `[]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Index][Index Property] | `($)Index`, with value `0` | `($)Index` is a variable of type [Int32][] | + +#### Result + +Attempting to remove the item at index `0` of `[]` results in no operation, as there is nothing to remove. Therefore, the variable `($)List` remains: + +```json +[] +``` + +*** + +### Remove the Item at the first Index (i.e. `0`) of a List + +This example will remove the item at index `0` of `["Some Text", 1]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Index][Index Property] | `($)Index`, with value `0` | `($)Index` is a variable of type [Int32][] | + +#### Result + +Removing the item at index `0` of `["Some Text", 1]` results in the variable `($)List` being updated to the following: + +```json +[1] +``` + +*** + +### Remove the Item at the last Index (i.e. Index equals count of items - `1`) of a List + +This example will remove the item at index `1` of `["Some Text", 1]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Index][Index Property] | `($)Index`, with value `1` | `($)Index` is a variable of type [Int32][] | + +#### Result + +Remove the item at index `1` of `["Some Text", 1]` results in the variable `($)List` being updated to the following: + +```json +["Some Text"] +``` + +*** + +## Properties + +### List + +The [List][List Property] where the item is removed from. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items that can be removed from the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Index + +The [Index][Index Property] to remove the item at. + +Valid values are between and including `0` and the total count of items in the [List][List Property] - `1`. + +For information about what an index is, please see [Indexes][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `0` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyListException][] | Thrown when [List][List Property] is read-only. | +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | +| [PropertyValueOutOfRangeException][] | Thrown when [Index][Index Property] is out of the range of the list indexes. Valid indexes are between and including `0` and the count of items in the [List][List Property] - `1`. | + +## Remarks + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Index Property]: {{< ref "#index" >}} + +[Indexes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Indexes.MainDoc" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} +[PropertyValueOutOfRangeException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyValueOutOfRangeException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-item-with-value-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-item-with-value-block-2.md new file mode 100644 index 000000000..52864c8bc --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-item-with-value-block-2.md @@ -0,0 +1,207 @@ +--- +title: "Remove Item With Value" +linkTitle: "Remove Item With Value" +description: "Removes the specified occurrence of an item matching a value from a List." +--- + +{{< figure src="/blocks/lists-remove-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.RemoveItem.RemoveItemWithValueBlock`2)
+ +## Description + +Removes the specified [Occurrence][Occurrence Property] of an item matching a [Value][Value Property] from a [List][List Property]. + +## Examples + +### Remove the first Occurrence of an item matching a Value from an empty List + +This example will attempt to remove the first occurrence of an item matching the value `1` from `[]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Value][Value Property] | `($)Value`, with value `1` | `($)Value` is a variable of type [Int32][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | + +#### Result + +Attempting to remove the first occurrence of an item matching the value `1` from `[]` results in no operation, as there is nothing to remove. Therefore, the variable `($)List` remains: + +```json +[] +``` + +*** + +### Remove the first Occurrence of an item matching a Value from a List + +This example will attempt to remove the first occurrence of an item matching the value `1` from `[1, 2, 3, 3, 2, 1]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[1, 2, 3, 3, 2, 1]` | `($)List` is a variable of type [IList][]<[Int32][]> | +| [Value][Value Property] | `($)Value`, with value `1` | `($)Value` is a variable of type [Int32][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | + +#### Result + +An [Occurrence][Occurrence Property] of `1` means remove the first occurrence; `2` means second etc. + +Attempting to remove the first occurrence of an item matching the value `1` from `[1, 2, 3, 3, 2, 1]` results in the variable `($)List` being updated to the following: + +```json +[2, 3, 3, 2, 1] +``` + +*** + +### Remove the last Occurrence of an item matching a Value from a List + +This example will attempt to remove the last occurrence of an item matching the value `1` from `[1, 2, 3, 3, 2, 1]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[1, 2, 3, 3, 2, 1]` | `($)List` is a variable of type [IList][]<[Int32][]> | +| [Value][Value Property] | `($)Value`, with value `1` | `($)Value` is a variable of type [Int32][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `-1` | `($)Occurrence` is a variable of type [Int32][] | + +#### Result + +An [Occurrence][Occurrence Property] of `-1`, means remove the last occurrence; `-2` means second last etc. + +Attempting to remove the last occurrence of an item matching the value `1` from `[1, 2, 3, 3, 2, 1]` results in the variable `($)List` being updated to the following: + +```json +[1, 2, 3, 3, 2] +``` + +*** + +## Properties + +### List + +The [List][List Property] to remove the specified [Occurrence][Occurrence Property] of matching item from. + +Items are considered matching if they have the specified [Value][Value Property]. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items that can be removed from the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Value + +The [Value][Value Property] the item to remove must match. + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Occurrence + +The [Occurrence][Occurrence Property] of matching item to remove from the [List][List Property]. + +Items are considered matching if they have the specified [Value][Value Property]. + +For information about [supported values][Occurrences] for the [Occurrence][Occurrence Property] property and examples of how it can be used, please see [Occurrences][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `1` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyListException][] | Thrown when [List][List Property] is read-only. | +| [InvalidPropertyValueException][] | Thrown when [Value][Value Property] is `null` and [List][List Property] only accepts non-nullable value types. See [Value Is Invalid][]. | +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | + +## Remarks + +### Item Equality + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +### Occurrences + +For information about [supported values][Occurrences] for the [Occurrence][Occurrence Property] property and examples of how it can be used, please see [Occurrences][]. + +### Empty List + +If [List][List Property] is empty (i.e. `[]`) there is nothing to remove, so no operation is performed. + +### No items matching Value, or Occurrence is not present + +If [List][List Property] does not contain items matching the specified [Value][Value Property] or the specified [Occurrence][Occurrence Property] is not present, there is nothing to remove, so no operation is performed. + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Value Property]: {{< ref "#value" >}} +[Occurrence Property]: {{< ref "#occurrence" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Occurrences]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Occurrences.MainDoc" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-items-at-beginning-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-items-at-beginning-block-2.md new file mode 100644 index 000000000..fd75051bd --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-items-at-beginning-block-2.md @@ -0,0 +1,123 @@ +--- +title: "Remove Items At Beginning" +linkTitle: "Remove Items At Beginning" +description: "Removes a count of items from the beginning of a List." +--- + +{{< figure src="/blocks/lists-remove-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.RemoveItem.RemoveItemsAtBeginningBlock`2)
+ +## Description + +Removes the specified [Count][Count Property] of items from the beginning of a [List][List Property]. + +## Examples + +### Remove Count of items from the beginning of a List + +This example will remove `2` items from the beginning of `["Some Text", 1, "Some More Text", 2]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1, "Some More Text", 2]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Count][Count Property] | `($)Count`, with value `2` | `($)Count` is a variable of type [Int32][] | + +#### Result + +Removing `2` items from the beginning of `["Some Text", 1, "Some More Text", 2]` results in the variable `($)List` being updated to the following: + +```json +["Some More Text", 2] +``` + +*** + +## Properties + +### List + +The [List][List Property] where the items are removed from. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items that can be removed from the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Count + +The [Count][Count Property] of items to remove. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `0` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyListException][] | Thrown when [List][List Property] is read-only. | +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | +| [PropertyValueOutOfRangeException][] | Thrown when [Count][Count Property] is greater than the count of items in the [List][List Property] - `1`. | + +## Remarks + +### Negative Count + +If [Count][Count Property] is negative all items in the [List][List Property] are removed. + +### Zero Count + +If [Count][Count Property] is `0` there is nothing to remove, so no operation is performed. + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Count Property]: {{< ref "#count" >}} + +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} +[PropertyValueOutOfRangeException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyValueOutOfRangeException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-items-at-end-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-items-at-end-block-2.md new file mode 100644 index 000000000..7a1deefb6 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-items-at-end-block-2.md @@ -0,0 +1,123 @@ +--- +title: "Remove Items At End" +linkTitle: "Remove Items At End" +description: "Removes a count of items from the end of a List." +--- + +{{< figure src="/blocks/lists-remove-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.RemoveItem.RemoveItemsAtEndBlock`2)
+ +## Description + +Removes the specified [Count][Count Property] of items from the end of a [List][List Property]. + +## Examples + +### Remove Count of items from the end of a List + +This example will remove `2` items from the end of `["Some Text", 1, "Some More Text", 2]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1, "Some More Text", 2]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Count][Count Property] | `($)Count`, with value `2` | `($)Count` is a variable of type [Int32][] | + +#### Result + +Removing `2` items from the end of `["Some Text", 1, "Some More Text", 2]` results in the variable `($)List` being updated to the following: + +```json +["Some Text", 1] +``` + +*** + +## Properties + +### List + +The [List][List Property] where the items are removed from. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items that can be removed from the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Count + +The [Count][Count Property] of items to remove. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `0` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyListException][] | Thrown when [List][List Property] is read-only. | +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | +| [PropertyValueOutOfRangeException][] | Thrown when [Count][Count Property] is greater than the count of items in the [List][List Property] - `1`. | + +## Remarks + +### Negative Count + +If [Count][Count Property] is negative all items in the [List][List Property] are removed. + +### Zero Count + +If [Count][Count Property] is `0` there is nothing to remove, so no operation is performed. + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Count Property]: {{< ref "#count" >}} + +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} +[PropertyValueOutOfRangeException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyValueOutOfRangeException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-items-at-index-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-items-at-index-block-2.md new file mode 100644 index 000000000..688e116b8 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-items-at-index-block-2.md @@ -0,0 +1,148 @@ +--- +title: "Remove Items At Index" +linkTitle: "Remove Items At Index" +description: "Removes a count of items starting at the specified index of a List." +--- + +{{< figure src="/blocks/lists-remove-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.RemoveItem.RemoveItemsAtIndexBlock`2)
+ +## Description + +Removes the specified [Count][Count Property] of items starting at the given [Index][Index Property] of a [List][List Property]. + +## Examples + +### Remove Count of items at the first Index (i.e. `0`) of a List + +This example will remove `2` items at index `0` of `["Some Text", 1, "Some More Text", 2]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1, "Some More Text", 2]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Index][Index Property] | `($)Index`, with value `0` | `($)Index` is a variable of type [Int32][] | +| [Count][Count Property] | `($)Count`, with value `2` | `($)Count` is a variable of type [Int32][] | + +#### Result + +Removing `2` items at index `0` of `["Some Text", 1, "Some More Text", 2]` results in the variable `($)List` being updated to the following: + +```json +["Some More Text", 2] +``` + +*** + +## Properties + +### List + +The [List][List Property] where the items are removed from. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items that can be removed from the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Index + +The [Index][Index Property] to remove the [Count][Count Property] of items at. This is an inclusive index, which means the item at the specified index will be included. + +Valid values are between and including `0` and the total count of items in the [List][List Property] - `1`. + +For information about what an index is, please see [Indexes][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `0` | + +### Count + +The [Count][Count Property] of items to remove. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `0` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyListException][] | Thrown when [List][List Property] is read-only. | +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | +| [PropertyValueOutOfRangeException][] | Thrown when [Index][Index Property] is less than `0` or greater than the count of items in [List][List Property] - `1`. | +| | Thrown when [Index][Index Property] + [Count][Count Property] is greater than the count of items in the [List][List Property] - `1`. | + +## Remarks + +### Index is inclusive + +The [Index][Index Property] is an inclusive [index][Indexes], which means the item at the index will be included in the removed items. + +### Negative Count + +If [Count][Count Property] is negative all items after and including the specified [Index][Index property] in the [List][List Property] are removed. + +### Zero Count + +If [Count][Count Property] is `0` there is nothing to remove, so no operation is performed. + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Index Property]: {{< ref "#index" >}} +[Count Property]: {{< ref "#count" >}} + +[Indexes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Indexes.MainDoc" >}} + +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} +[PropertyValueOutOfRangeException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyValueOutOfRangeException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-items-at-indexes-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-items-at-indexes-block-2.md new file mode 100644 index 000000000..1315b48f6 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-items-at-indexes-block-2.md @@ -0,0 +1,125 @@ +--- +title: "Remove Items At Indexes" +linkTitle: "Remove Items At Indexes" +description: "Removes the items at each of the specified indexes of a List." +--- + +{{< figure src="/blocks/lists-remove-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.RemoveItem.RemoveItemsAtIndexesBlock`2)
+ +## Description + +Removes the items at each of the specified [Indexes][Indexes Property] of a [List][List Property]. + +## Examples + +### Remove items at the first and third Indexes (i.e. [`0`, `2`]) of a List + +This example will remove items at indexes `0` and `2` of `["Some Text", 1, "Some More Text", 2]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1, "Some More Text", 2]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Indexes][Indexes Property] | `($)Indexes`, with value [`0`, `2`] | `($)Indexes` is a variable of type [IEnumerable][]<[Int32][]> | + +#### Result + +Removing items at indexes `0` and `2` of `["Some Text", 1, "Some More Text", 2]` results in the variable `($)List` being updated to the following: + +```json +[1, 2] +``` + +*** + +## Properties + +### List + +The [List][List Property] where the items are removed from. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items that can be removed from the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Indexes + +The [Indexes][Indexes Property] of the items to remove. + +Valid values are between and including `0` and the total count of items in the [List][List Property] - `1`. + +For information about what an index is, please see [Indexes][]. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[Int32][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | `new List(Cortex.Blocks.Lists.RemoveItem.RemoveItemsWithValueBlock`2)
+ +## Description + +Removes all items matching a [Value][Value Property] from a [List][List Property]. + +## Examples + +### Remove all items matching a Value from an empty List + +This example will attempt to remove all items matching the value `1` from `[]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Value][Value Property] | `($)Value`, with value `1` | `($)Value` is a variable of type [Int32][] | + +#### Result + +Attempting to remove all items matching the value `1` from `[]` results in no operation, as there is nothing to remove. Therefore, the variable `($)List` remains: + +```json +[] +``` + +*** + +### Remove all items matching a Value from a List + +This example will attempt to remove all items matching the value `1` from `[1, 2, 3, 3, 2, 1]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[1, 2, 3, 3, 2, 1]` | `($)List` is a variable of type [IList][]<[Int32][]> | +| [Value][Value Property] | `($)Value`, with value `1` | `($)Value` is a variable of type [Int32][] | + +#### Result + +Attempting to remove all items matching the value `1` from `[1, 2, 3, 3, 2, 1]` results in the variable `($)List` being updated to the following: + +```json +[2, 3, 3, 2] +``` + +*** + +## Properties + +### List + +The [List][List Property] to remove all matching items from. + +Items are considered matching if they have the specified [Value][Value Property]. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items that can be removed from the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Value + +The [Value][Value Property] the items to remove must match. + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyListException][] | Thrown when [List][List Property] is read-only. | +| [InvalidPropertyValueException][] | Thrown when [Value][Value Property] is `null` and [List][List Property] only accepts non-nullable value types. See [Value Is Invalid][]. | +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | + +## Remarks + +### Item Equality + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +### Empty List + +If [List][List Property] is empty (i.e. `[]`) there is nothing to remove, so no operation is performed. + +### No items matching Value + +If [List][List Property] does not contain items matching the specified [Value][Value Property], there is nothing to remove, so no operation is performed. + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Value Property]: {{< ref "#value" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-items-with-values-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-items-with-values-block-2.md new file mode 100644 index 000000000..87f4429b0 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/remove-item/remove-items-with-values-block-2.md @@ -0,0 +1,161 @@ +--- +title: "Remove Items With Values" +linkTitle: "Remove Items With Values" +description: "Removes all items matching one of the specified values from a List." +--- + +{{< figure src="/blocks/lists-remove-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.RemoveItem.RemoveItemsWithValuesBlock`2)
+ +## Description + +Removes all items matching one of the specified [Values][Values Property] from a [List][List Property]. + +## Examples + +### Remove all items matching one of the specified Values from an empty List + +This example will attempt to remove all items matching one of the values `[1, 2]` from `[]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [Values][Values Property] | `($)Values`, with value `[1, 2]` | `($)Values` is a variable of type [IEnumerable][]<[Int32][]> | + +#### Result + +Attempting to remove all items matching one of the values `[1, 2]` from `[]` results in no operation, as there is nothing to remove. Therefore, the variable `($)List` remains: + +```json +[] +``` + +*** + +### Remove all items matching one of the specified Values from a List + +This example will attempt to remove all items matching one of the values `[1, 2]` from `[1, 2, 3, 3, 2, 1]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[1, 2, 3, 3, 2, 1]` | `($)List` is a variable of type [IList][]<[Int32][]> | +| [Values][Values Property] | `($)Values`, with value `[1, 2]` | `($)Values` is a variable of type [IEnumerable][]<[Int32][]> | + +#### Result + +Attempting to remove all items matching one of the values `[1, 2]` from `[1, 2, 3, 3, 2, 1]` results in the variable `($)List` being updated to the following: + +```json +[3, 3] +``` + +*** + +## Properties + +### List + +The [List][List Property] to remove all matching items from. + +Items are considered matching if they have one of the specified [Values][Values Property]. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items that can be removed from the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Values + +The [Values][Values Property] the items to remove must match one of. + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyListException][] | Thrown when [List][List Property] is read-only. | +| [PropertyNullException][] | Thrown when [List][List Property] or [Values][Values Property] is `null`. | + +## Remarks + +### Item Equality + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +### Empty List + +If [List][List Property] is empty (i.e. `[]`) there is nothing to remove, so no operation is performed. + +### Empty Values + +If [Values][Values Property] is empty (i.e. `[]`) there are no values to match, therefore nothing can be removed and no operation is performed. + +### No items matching a specified value in Values + +If [List][List Property] does not contain items matching one of the specified [Values][Values Property], there is nothing to remove for that value. + +### No items matching Values + +If [List][List Property] does not contain items matching any of the specified [Values][Values Property], there is nothing to remove, so no operation is performed. + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Values Property]: {{< ref "#values" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/_index.md b/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/_index.md new file mode 100644 index 000000000..1a848c4be --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/_index.md @@ -0,0 +1,5 @@ +--- +title: "Set Item(s)" +linkTitle: "Set Item(s)" +description: "Set an item or multiple items in a list to a new value." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-all-items-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-all-items-block-2.md new file mode 100644 index 000000000..e4439826e --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-all-items-block-2.md @@ -0,0 +1,122 @@ +--- +title: "Set All Items" +linkTitle: "Set All Items" +description: "Sets all items in a List to a new value." +--- + +{{< figure src="/blocks/lists-set-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.SetItem.SetAllItemsBlock`2)
+ +## Description + +Sets all items in a [List][List Property] to a [New Value][NewValue Property]. + +## Examples + +### Set all items in a List to a New Value + +This example will set all items in `["Some Text", 1]` to `"New Value"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [New Value][NewValue Property] | `($)NewValue`, with value `"New Value"` | `($)NewValue` is a variable of type [String] | + +#### Result + +Setting all items in `["Some Text", 1]` to `"New Value"` results in the variable `($)List` being updated to the following: + +```json +["New Value", "New Value"] +``` + +*** + +## Properties + +### List + +The [List][List Property] to set all items in. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items in the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### New Value + +The [New Value][NewValue Property] to set all items in [List][List Property] to. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|-------------| +| [CannotModifyReadOnlyListException][] | Thrown when [List][List Property] is read-only. | +| [InvalidPropertyValueException][] | Thrown when [New Value][NewValue Property] is `null` and [List][List Property] only accepts non-nullable value types. See [Value Is Invalid][]. | +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | + +## Remarks + +### Empty List + +If [List][List Property] is empty (i.e. `[]`) there is nothing to set, so no operation is performed. + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[NewValue Property]: {{< ref "#new-value" >}} + +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-item-at-beginning-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-item-at-beginning-block-2.md new file mode 100644 index 000000000..3e7487761 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-item-at-beginning-block-2.md @@ -0,0 +1,120 @@ +--- +title: "Set Item At Beginning" +linkTitle: "Set Item At Beginning" +description: "Sets the item at the beginning of a List to a new value." +--- + +{{< figure src="/blocks/lists-set-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.SetItem.SetItemAtBeginningBlock`2)
+ +## Description + +Sets the item at the beginning of a [List][List Property] to a [New Value][NewValue Property]. + +## Examples + +### Set the item at the beginning of a List to a New Value + +This example will set the item at the beginning of `["Some Text", 1]` to `"Some Modified Text"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [New Value][NewValue Property] | `($)NewValue`, with value `"Some Modified Text"` | `($)NewValue` is a variable of type [String] | + +#### Result + +Setting the item at the beginning of `["Some Text", 1]` to `"Some Modified Text"` results in the variable `($)List` being updated to the following: + +```json +["Some Modified Text", 1] +``` + +*** + +## Properties + +### List + +The [List][List Property] to set the item in. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items in the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### New Value + +The [New Value][NewValue Property] to set the item at the beginning of [List][List Property] to. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|-------------| +| [CannotModifyReadOnlyListException][] | Thrown when [List][List Property] is read-only. | +| [InvalidPropertyValueException][] | Thrown when [New Value][NewValue Property] is `null` and [List][List Property] only accepts non-nullable value types. See [Value Is Invalid][]. | +| [PropertyEmptyException][] | Thrown when [List][List Property] contains no items. | +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | + +## Remarks + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[NewValue Property]: {{< ref "#new-value" >}} + +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-item-at-end-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-item-at-end-block-2.md new file mode 100644 index 000000000..c63fbffc6 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-item-at-end-block-2.md @@ -0,0 +1,120 @@ +--- +title: "Set Item At End" +linkTitle: "Set Item At End" +description: "Sets the item at the end of a List to a new value." +--- + +{{< figure src="/blocks/lists-set-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.SetItem.SetItemAtEndBlock`2)
+ +## Description + +Sets the item at the end of a [List][List Property] to a [New Value][NewValue Property]. + +## Examples + +### Set the item at the end of a List to a New Value + +This example will set the item at the end of `["Some Text", 1]` to `10`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [New Value][NewValue Property] | `($)NewValue`, with value `10` | `($)NewValue` is a variable of type [Int32] | + +#### Result + +Setting the item at the end of `["Some Text", 1]` to `10` results in the variable `($)List` being updated to the following: + +```json +["Some Text", 10] +``` + +*** + +## Properties + +### List + +The [List][List Property] to set the item in. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items in the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### New Value + +The [New Value][NewValue Property] to set the item at the end of [List][List Property] to. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|-------------| +| [CannotModifyReadOnlyListException][] | Thrown when [List][List Property] is read-only. | +| [InvalidPropertyValueException][] | Thrown when [New Value][NewValue Property] is `null` and [List][List Property] only accepts non-nullable value types. See [Value Is Invalid][]. | +| [PropertyEmptyException][] | Thrown when [List][List Property] contains no items. | +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | + +## Remarks + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[NewValue Property]: {{< ref "#new-value" >}} + +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-item-at-index-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-item-at-index-block-2.md new file mode 100644 index 000000000..6be27b142 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-item-at-index-block-2.md @@ -0,0 +1,163 @@ +--- +title: "Set Item At Index" +linkTitle: "Set Item At Index" +description: "Sets the item at the specified index of a List to a new value." +--- + +{{< figure src="/blocks/lists-set-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.SetItem.SetItemAtIndexBlock`2)
+ +## Description + +Sets the item at the specified [Index][Index Property] of a [List][List Property] to a [New Value][NewValue Property]. + +## Examples + +### Set the Item at the first Index (i.e. `0`) of a List to a New Value + +This example will set the item at index `0` of `["Some Text", 1]` to `10`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [New Value][NewValue Property] | `($)NewValue`, with value `10` | `($)NewValue` is a variable of type [Int32] | +| [Index][Index Property] | `($)Index`, with value `0` | `($)Index` is a variable of type [Int32][] | + +#### Result + +Setting the item at index `0` of `["Some Text", 1]` to `10` results in the variable `($)List` being updated to the following: + +```json +[10, 1] +``` + +*** + +### Set the Item at the last Index (i.e. Index equals count of items - `1`) of a List + +This example will set the item at index `1` of `["Some Text", 1]` to `10`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [New Value][NewValue Property] | `($)NewValue`, with value `10` | `($)NewValue` is a variable of type [Int32] | +| [Index][Index Property] | `($)Index`, with value `1` | `($)Index` is a variable of type [Int32][] | + +#### Result + +Setting the item at index `1` of `["Some Text", 1]` to `10` results in the variable `($)List` being updated to the following: + +```json +["Some Text", 10] +``` + +*** + +## Properties + +### List + +The [List][List Property] to set the item in. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items in the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### New Value + +The [New Value][NewValue Property] to set the item at the specified [Index][Index Property] of [List][List Property] to. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Index + +The [Index][Index Property] to set the item at. + +Valid values are between and including `0` and the total count of items in the [List][List Property] - `1`. + +For information about what an index is, please see [Indexes][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `0` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|-------------| +| [CannotModifyReadOnlyListException][] | Thrown when [List][List Property] is read-only. | +| [InvalidPropertyValueException][] | Thrown when [New Value][NewValue Property] is `null` and [List][List Property] only accepts non-nullable value types. See [Value Is Invalid][]. | +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | +| [PropertyValueOutOfRangeException][] | Thrown when [List][List Property] contains no items. | +| | Thrown when [Index][Index Property] is out of the range of the list indexes. Valid indexes are between and including `0` and the count of items in the [List][List Property] - `1`. | + +## Remarks + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[NewValue Property]: {{< ref "#new-value" >}} +[Index Property]: {{< ref "#index" >}} + +[Indexes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Indexes.MainDoc" >}} + +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} +[PropertyValueOutOfRangeException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyValueOutOfRangeException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-item-with-value-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-item-with-value-block-2.md new file mode 100644 index 000000000..54437ace7 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-item-with-value-block-2.md @@ -0,0 +1,200 @@ +--- +title: "Set Item With Value" +linkTitle: "Set Item With Value" +description: "Sets the specified occurrence of an item matching a value in a List to a new value." +--- + +{{< figure src="/blocks/lists-set-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.SetItem.SetItemWithValueBlock`2)
+ +## Description + +Sets the specified [Occurrence][Occurrence Property] of an item matching a [Value][Value Property] in a [List][List Property] to a [New Value][NewValue Property]. + +## Examples + +### Set the first Occurrence of an item matching a Value in a List to a New Value + +This example will attempt to set the first occurrence of an item matching the value `1` in `[1, 2, 3, 3, 2, 1]` to `10`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[1, 2, 3, 3, 2, 1]` | `($)List` is a variable of type [IList][]<[Int32][]> | +| [Value][Value Property] | `($)Value`, with value `1` | `($)Value` is a variable of type [Int32][] | +| [New Value][NewValue Property] | `($)NewValue`, with value `10` | `($)NewValue` is a variable of type [Int32][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | + +#### Result + +An [Occurrence][Occurrence Property] of `1` means set the first occurrence; `2` means second etc. + +Attempting to set the first occurrence of an item matching the value `1` in `[1, 2, 3, 3, 2, 1]` to `10` results in the variable `($)List` being updated to the following: + +```json +[10, 2, 3, 3, 2, 1] +``` + +*** + +### Set the last Occurrence of an item matching a Value in a List to a New Value + +This example will attempt to set the last occurrence of an item matching the value `1` in `[1, 2, 3, 3, 2, 1]` to `10`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[1, 2, 3, 3, 2, 1]` | `($)List` is a variable of type [IList][]<[Int32][]> | +| [Value][Value Property] | `($)Value`, with value `1` | `($)Value` is a variable of type [Int32][] | +| [New Value][NewValue Property] | `($)NewValue`, with value `10` | `($)NewValue` is a variable of type [Int32][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `-1` | `($)Occurrence` is a variable of type [Int32][] | + +#### Result + +An [Occurrence][Occurrence Property] of `-1`, means set the last occurrence; `-2` means second last etc. + +Attempting to set the last occurrence of an item matching the value `1` in `[1, 2, 3, 3, 2, 1]` to `10` results in the variable `($)List` being updated to the following: + +```json +[1, 2, 3, 3, 2, 10] +``` + +*** + +## Properties + +### List + +The [List][List Property] to set the specified [Occurrence][Occurrence Property] of matching item in. + +Items are considered matching if they have the specified [Value][Value Property]. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items in the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Value + +The [Value][Value Property] the item to set must match. + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### New Value + +The [New Value][NewValue Property] to set the specified [Occurrence][Occurrence Property] of matching item in [List][List Property] to. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Occurrence + +The [Occurrence][Occurrence Property] of matching item to set in the [List][List Property]. + +Items are considered matching if they have the specified [Value][Value Property]. + +For information about [supported values][Occurrences] for the [Occurrence][Occurrence Property] property and examples of how it can be used, please see [Occurrences][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `1` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyListException][] | Thrown when [List][List Property] is read-only. | +| [InvalidPropertyValueException][] | Thrown when [Value][Value Property] or [New Value][NewValue Property] are `null` and [List][List Property] only accepts non-nullable value types. See [Value Is Invalid][]. | +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | + +## Remarks + +### Item Equality + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +### Occurrences + +For information about [supported values][Occurrences] for the [Occurrence][Occurrence Property] property and examples of how it can be used, please see [Occurrences][]. + +### Empty List + +If [List][List Property] is empty (i.e. `[]`) there is nothing to set, so no operation is performed. + +### No items matching Value, or Occurrence is not present + +If [List][List Property] does not contain items matching the specified [Value][Value Property] or the specified [Occurrence][Occurrence Property] is not present, there is nothing to set, so no operation is performed. + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Value Property]: {{< ref "#value" >}} +[NewValue Property]: {{< ref "#new-value" >}} +[Occurrence Property]: {{< ref "#occurrence" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Occurrences]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Occurrences.MainDoc" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-items-at-beginning-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-items-at-beginning-block-2.md new file mode 100644 index 000000000..650f6fcca --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-items-at-beginning-block-2.md @@ -0,0 +1,123 @@ +--- +title: "Set Items At Beginning" +linkTitle: "Set Items At Beginning" +description: "Sets the items at the beginning of a List to new values." +--- + +{{< figure src="/blocks/lists-set-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.SetItem.SetItemsAtBeginningBlock`2)
+ +## Description + +Sets the items at the beginning of a [List][List Property] to [New Values][NewValues Property]. + +## Examples + +### Set the items at the beginning of a List to New Values + +This example will set the first and second items at the beginning of `["Some Text", 1, "Some More Text", 2]` to `["Some Modified Text", 10]` respectively. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1, "Some More Text", 2]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [New Values][NewValues Property] | `($)NewValues`, with value `["Some Modified Text", 10]` | `($)NewValues` is a variable of type [IEnumerable][]<[dynamic][]> | + +#### Result + +Setting the first and second items at the beginning of `["Some Text", 1, "Some More Text", 2]` to `["Some Modified Text", 10]` respectively, results in the variable `($)List` being updated to the following: + +```json +["Some Modified Text", 10, "Some More Text", 2] +``` + +*** + +## Properties + +### List + +The [List][List Property] to set the items in. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items in the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### New Values + +The [New Values][NewValues Property] to set the items at the beginning of [List][List Property] to. + +The number of items in [New Values][NewValues Property] determines the number of items that will be set at the beginning of [List][List Property]. One item means only the first item is set, two items means the first and second items are set etc. + +The first item in [List][List Property] will be set to the first value in [New Values][NewValues Property]; the second item in [List][List Property] will be set to the second value in [New Values][NewValues Property] etc. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|-------------| +| [CannotModifyReadOnlyListException][] | Thrown when [List][List Property] is read-only. | +| [PropertyEmptyException][] | Thrown when [List][List Property] contains no items. | +| [PropertyNullException][] | Thrown when [List][List Property] or [New Values][NewValues Property] is `null`. | + +## Remarks + +### Empty New Values + +If [New Values][NewValues Property] is empty (i.e. `[]`) there is nothing to set, so no operation is performed. + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[NewValues Property]: {{< ref "#new-values" >}} + +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-items-at-end-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-items-at-end-block-2.md new file mode 100644 index 000000000..833702012 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-items-at-end-block-2.md @@ -0,0 +1,123 @@ +--- +title: "Set Items At End" +linkTitle: "Set Items At End" +description: "Sets the items at the end of a List to new values." +--- + +{{< figure src="/blocks/lists-set-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.SetItem.SetItemsAtEndBlock`2)
+ +## Description + +Sets the items at the end of a [List][List Property] to [New Values][NewValues Property]. + +## Examples + +### Set the items at the end of a List to New Values + +This example will set the second last and last items at the end of `["Some Text", 1, "Some More Text", 2]` to `["Some Modified Text", 10]` respectively. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1, "Some More Text", 2]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [New Values][NewValues Property] | `($)NewValues`, with value `["Some Modified Text", 10]` | `($)NewValues` is a variable of type [IEnumerable][]<[dynamic][]> | + +#### Result + +Setting the second last and last items at the end of `["Some Text", 1, "Some More Text", 2]` to `["Some Modified Text", 10]` respectively, results in the variable `($)List` being updated to the following: + +```json +["Some Text", 1, "Some Modified Text", 10] +``` + +*** + +## Properties + +### List + +The [List][List Property] to set the items in. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items in the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### New Values + +The [New Values][NewValues Property] to set the items at the end of [List][List Property] to. + +The number of items in [New Values][NewValues Property] determines the number of items that will be set at the end of [List][List Property]. One item means only the last item is set, two items means the second last and last items are set etc. + +The last item in [List][List Property] will be set to the last value in [New Values][NewValues Property]; the second last item in [List][List Property] will be set to the second last value in [New Values][NewValues Property] etc. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|-------------| +| [CannotModifyReadOnlyListException][] | Thrown when [List][List Property] is read-only. | +| [PropertyEmptyException][] | Thrown when [List][List Property] contains no items. | +| [PropertyNullException][] | Thrown when [List][List Property] or [New Values][NewValues Property] is `null`. | + +## Remarks + +### Empty New Values + +If [New Values][NewValues Property] is empty (i.e. `[]`) there is nothing to set, so no operation is performed. + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[NewValues Property]: {{< ref "#new-values" >}} + +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-items-at-index-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-items-at-index-block-2.md new file mode 100644 index 000000000..091f1f048 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-items-at-index-block-2.md @@ -0,0 +1,146 @@ +--- +title: "Set Items At Index" +linkTitle: "Set Items At Index" +description: "Sets the items at the specified index of a List to new values." +--- + +{{< figure src="/blocks/lists-set-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.SetItem.SetItemsAtIndexBlock`2)
+ +## Description + +Sets the items at the specified [Index][Index Property] of a [List][List Property] to [New Values][NewValues Property]. + +## Examples + +### Set the Items at the first Index (i.e. `0`) of a List to New Values + +This example will set the 2 items starting at index `0` of `["Some Text", 1, "Some More Text", 2]` to `["Some Modified Text", 10]` respectively. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1, "Some More Text", 2]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [New Values][NewValues Property] | `($)NewValues`, with value `["Some Modified Text", 10]` | `($)NewValues` is a variable of type [IEnumerable][]<[dynamic][]> | +| [Index][Index Property] | `($)Index`, with value `0` | `($)Index` is a variable of type [Int32][] | + +#### Result + +Setting the two items at index `0` of `["Some Text", 1, "Some More Text", 2]` to `["Some Modified Text", 10]` respectively, results in the variable `($)List` being updated to the following: + +```json +["Some Modified Text", 10, "Some More Text", 2] +``` + +*** + +## Properties + +### List + +The [List][List Property] to set the items in. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items in the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### New Values + +The [New Values][NewValues Property] to set the items at the specified [Index][Index Property] of [List][List Property] to. + +The number of items in [New Values][NewValues Property] determines the number of items that will be set at the end of [List][List Property]. One item means one item is set, two items means two items are set etc. + +The item at [Index][Index Property] of [List][List Property] will be set to the first value in [New Values][NewValues Property]; the item at [Index][Index Property] + `1` of [List][List Property] will be set to the second value in [New Values][NewValues Property] etc. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Index + +The [Index][Index Property] to start setting the items at. This is an inclusive index, which means the item at the specified index will be included. + +Valid values are between and including `0` and the total count of items in the [List][List Property] - `1`. + +For information about what an index is, please see [Indexes][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `0` | +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|-------------| +| [CannotModifyReadOnlyListException][] | Thrown when [List][List Property] is read-only. | +| [PropertyEmptyException][] | Thrown when [New Values][NewValues Property] contains no items. | +| [PropertyNullException][] | Thrown when [List][List Property] or [New Values][NewValues Property] is `null`. | +| [PropertyValueOutOfRangeException][] | Thrown when [Index][Index Property] is less than `0` or greater than the count of items in [List][List Property] - `1`. | +| | Thrown when [Index][Index Property] + count of items in [New Values][NewValues Property] is greater than the count of items in the [List][List Property] - `1`. | + +## Remarks + +### Index is inclusive + +The [Index][Index Property] is an inclusive [index][Indexes], which means the item at the index will be included in the set items. + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[NewValues Property]: {{< ref "#new-values" >}} +[Index Property]: {{< ref "#index" >}} + +[Indexes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Indexes.MainDoc" >}} + +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} +[PropertyEmptyException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} +[PropertyValueOutOfRangeException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyValueOutOfRangeException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-items-at-indexes-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-items-at-indexes-block-2.md new file mode 100644 index 000000000..0c282b5a4 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-items-at-indexes-block-2.md @@ -0,0 +1,146 @@ +--- +title: "Set Items At Indexes" +linkTitle: "Set Items At Indexes" +description: "Sets the items at each of the specified indexes of a List to new values." +--- + +{{< figure src="/blocks/lists-set-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.SetItem.SetItemsAtIndexesBlock`2)
+ +## Description + +Sets the items at each of the specified [Indexes][Indexes Property] of a [List][List Property] to [New Values][NewValues Property]. + +## Examples + +### Sets items at the first and third Indexes (i.e. [`0`, `2`]) of a List to New Values + +This example will set items at indexes `0` and `2` of `["Some Text", 1, "Some More Text", 2]` to `["Some Modified Text", "Some More Modified Text"]` respectively. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `["Some Text", 1, "Some More Text", 2]` | `($)List` is a variable of type [IList][]<[dynamic][]> | +| [New Values][NewValues Property] | `($)NewValues`, with value `["Some Modified Text", "Some More Modified Text"]` | `($)NewValues` is a variable of type [IEnumerable][]<[String][]> | +| [Indexes][Indexes Property] | `($)Indexes`, with value [`0`, `2`] | `($)Indexes` is a variable of type [IEnumerable][]<[Int32][]> | + +#### Result + +Setting items at indexes `0` and `2` of `["Some Text", 1, "Some More Text", 2]` to `["Some Modified Text", "Some More Modified Text"]` respectively, results in the variable `($)List` being updated to the following: + +```json +["Some Modified Text", 1, "Some More Modified Text", 2] +``` + +*** + +## Properties + +### List + +The [List][List Property] to set the items in. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items in the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### New Values + +The [New Values][NewValues Property] to set the items at the specified [Indexes][Indexes Property] of [List][List Property] to. + +The number of items in [New Values][NewValues Property] must match the number of items in [Indexes][Indexes Property]. + +The [List][List Property] item at the first index in [Indexes][Indexes Property] will be set to the first value in [New Values][NewValues Property]; the [List][List Property] item at the second index in [Indexes][Indexes Property] will be set to the second value in [New Values][NewValues Property] etc. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Indexes + +The [Indexes][Indexes Property] of the items to set. + +Valid values are between and including `0` and the total count of items in the [List][List Property] - `1`. + +For information about what an index is, please see [Indexes][]. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[Int32][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | `new List(Cortex.Blocks.Lists.SetItem.SetItemsWithValueBlock`2)
+ +## Description + +Sets all items matching a [Value][Value Property] in a [List][List Property] to a [New Value][NewValue Property]. + +## Examples + +### Set all items matching a Value in a List to a New Value + +This example will attempt to set all items matching the value `1` in `[1, 2, 3, 3, 2, 1]` to `10`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[1, 2, 3, 3, 2, 1]` | `($)List` is a variable of type [IList][]<[Int32][]> | +| [Value][Value Property] | `($)Value`, with value `1` | `($)Value` is a variable of type [Int32][] | +| [New Value][NewValue Property] | `($)NewValue`, with value `10` | `($)NewValue` is a variable of type [Int32][] | + +#### Result + +Attempting to set all items matching the value `1` in `[1, 2, 3, 3, 2, 1]` to `10` results in the variable `($)List` being updated to the following: + +```json +[10, 2, 3, 3, 2, 10] +``` + +*** + +## Properties + +### List + +The [List][List Property] to set all matching items in. + +Items are considered matching if they have the specified [Value][Value Property]. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items in the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Value + +The [Value][Value Property] the items to set must match. + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### New Value + +The [New Value][NewValue Property] to set all matching items in [List][List Property] to. + +| | | +|--------------------|---------------------------| +| Data Type | [TItem][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyListException][] | Thrown when [List][List Property] is read-only. | +| [InvalidPropertyValueException][] | Thrown when [Value][Value Property] or [New Value][NewValue Property] are `null` and [List][List Property] only accepts non-nullable value types. See [Value Is Invalid][]. | +| [PropertyNullException][] | Thrown when [List][List Property] is `null`. | + +## Remarks + +### Item Equality + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +### Empty List + +If [List][List Property] is empty (i.e. `[]`) there is nothing to set, so no operation is performed. + +### No items matching Value + +If [List][List Property] does not contain items matching the specified [Value][Value Property], there is nothing to set, so no operation is performed. + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Value Property]: {{< ref "#value" >}} +[NewValue Property]: {{< ref "#new-value" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[dynamic]: {{< url path="Cortex.Reference.DataTypes.All.dynamic.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-items-with-values-block-2.md b/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-items-with-values-block-2.md new file mode 100644 index 000000000..816568102 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Lists/set-item/set-items-with-values-block-2.md @@ -0,0 +1,157 @@ +--- +title: "Set Items With Values" +linkTitle: "Set Items With Values" +description: "Sets all items matching one of the specified values in a List to new values." +--- + +{{< figure src="/blocks/lists-set-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Lists.SetItem.SetItemsWithValuesBlock`2)
+ +## Description + +Set all items matching one of the specified [Values][Values Property] in a [List][List Property] to [New Values][NewValues Property]. + +## Examples + +### Set all items matching one of the specified Values in a List to New Values + +This example will attempt to set all items matching one of the values `[1, 2]` in `[1, 2, 3, 3, 2, 1]` to `[10, 20]` respectively. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [List][List Property] | `($)List`, with value `[1, 2, 3, 3, 2, 1]` | `($)List` is a variable of type [IList][]<[Int32][]> | +| [Values][Values Property] | `($)Values`, with value `[1, 2]` | `($)Values` is a variable of type [IEnumerable][]<[Int32][]> | +| [NewValues][NewValues Property] | `($)NewValues`, with value `[10, 20]` | `($)NewValues` is a variable of type [IEnumerable][]<[Int32][]> | + +#### Result + +Attempting to set all items matching one of the values `[1, 2]` in `[1, 2, 3, 3, 2, 1]` to `[10, 20]` respectively, results in the variable `($)List` being updated to the following: + +```json +[10, 20, 3, 3, 20, 10] +``` + +*** + +## Properties + +### List + +The [List][List Property] to set all matching items in. + +Items are considered matching if they have one of the specified [Values][Values Property]. + +[List][List Property] can be any [IList][]<[TItem][]>, where [TItem][] represents the type of items in the [List][List Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[TItem][]> | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)List` with no value | + +### Values + +The [Values][Values Property] the items to set must match one of. + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### New Values + +The [New Values][NewValues Property] to set the items matching the corresponding [Values][Values Property] in [List][List Property] to. + +The number of items in [New Values][NewValues Property] must match the number of items in [Values][Values Property]. + +[List][List Property] items matching the first value in [Values][Values Property] will be set to the first value in [New Values][NewValues Property]; [List][List Property] items matching the second value in [Values][Values Property] will be set to the second value in [New Values][NewValues Property] etc. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[TItem][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [CannotModifyReadOnlyListException][] | Thrown when [List][List Property] is read-only. | +| [DuplicateValueException][] | Thrown when [Values][Values Property] contains duplicate values. | +| [PropertyItemCountException][] | Thrown when the count of items in [Values][Values Property] and the count of items in [New Values][NewValues Property] are not the same, or neither contain any items. | +| [PropertyNullException][] | Thrown when [List][List Property] or [Values][Values Property] or [New Values][NewValues Property] are `null`. | + +## Remarks + +### Item Equality + +For information and examples of how it is determined whether an item matches a specified value, please see [Object Equality][]. + +### Empty List + +If [List][List Property] is empty (i.e. `[]`) there is nothing to set, so no operation is performed. + +### No items matching a specified value in Values + +If [List][List Property] does not contain items matching one of the specified [Values][Values Property], there is nothing to set for that value. + +### No items matching Values + +If [List][List Property] does not contain items matching any of the specified [Values][Values Property], there is nothing to set, so no operation is performed. + +### Defining lists using literal syntax + +For information about how to define lists using literal syntax, see [Create a List<TItem>][]. + +### Defining lists using expression syntax + +For information about how to define lists using expression syntax, see [Create a List<TItem>][]. + +### Lists containing items of a single data type vs multiple data types + +For information about the different types of lists, including those that can contain only a single type of item, and those that can contain multiple types of item, see [Lists][]. + +[List Property]: {{< ref "#list" >}} +[Values Property]: {{< ref "#values" >}} +[NewValues Property]: {{< ref "#new-values" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Create a List<TItem>]: {{< url path="Cortex.Reference.DataTypes.Collections.List.CreateNew" >}} +[Lists]: {{< url path="Cortex.Reference.DataTypes.MostCommon.Lists" >}} + +[TItem]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[Object Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectEquality.MainDoc" >}} + +[CannotModifyReadOnlyListException]: {{< url path="Cortex.Reference.Exceptions.Lists.CannotModifyReadOnlyListException.MainDoc" >}} +[DuplicateValueException]: {{< url path="Cortex.Reference.Exceptions.Lists.DuplicateValueException.MainDoc" >}} +[PropertyItemCountException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyItemCountException.MainDoc" >}} +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/PowerShell/_index.md b/content/en/docs/2023.9/Reference/Blocks/PowerShell/_index.md new file mode 100644 index 000000000..7bb3eb21b --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/PowerShell/_index.md @@ -0,0 +1,5 @@ +--- +title: "PowerShell" +linkTitle: "PowerShell" +description: "Blocks related to working with Windows PowerShell and PowerShell Core." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/PowerShell/execute-powershell-script/_index.md b/content/en/docs/2023.9/Reference/Blocks/PowerShell/execute-powershell-script/_index.md new file mode 100644 index 000000000..abc8da99e --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/PowerShell/execute-powershell-script/_index.md @@ -0,0 +1,5 @@ +--- +title: "Execute PowerShell Script" +linkTitle: "Execute PowerShell Script" +description: "Blocks related to executing PowerShell scripts with Windows PowerShell and PowerShell Core." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/PowerShell/execute-powershell-script/execute-powershell-script-block-1.md b/content/en/docs/2023.9/Reference/Blocks/PowerShell/execute-powershell-script/execute-powershell-script-block-1.md new file mode 100644 index 000000000..dee8d299a --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/PowerShell/execute-powershell-script/execute-powershell-script-block-1.md @@ -0,0 +1,392 @@ +--- +title: "Execute PowerShell Script" +linkTitle: "Execute PowerShell Script" +description: "Executes a PowerShell script on the specified host." +--- + +{{< figure src="/blocks/powershell-execute-powershell-script-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.PowerShell.ExecutePowerShellScript.ExecutePowerShellScriptBlock`1)
+ +{{% alert type="information" title="Information" %}}Improvements to this page are planned for the future; this will include further examples and remarks.{{% /alert %}} + +## Description + +Connects to a host using the specified [PowerShell Session Details][PowerShell Session Details Property], and executes a [Script][Script Property], returning the [Outputs][Outputs Property] and [Records][Records Property]. + +[Close Session][Close Session Property] can be specified to choose whether the session on the host is closed or is kept open for use on subsequent Execute PowerShell Script blocks. + +## Examples + +### Execute a Script using PowerShellWinRMSessionDetails + +This example will execute a script on the server with the following details: + +- Host - `"host.domain.com"` +- Port - `5986` +- UseSsl - `true` + +The host can be connected to with the following credentials: + +- Domain - `"domain.com"` +- Username - `"username"` +- Password - `"password"` + +The server that the script will be executed on contains a text file in the following location `C:\Folder\Example.txt`, the file contains the following text before the script is executed: + +`"This is the content of the file located on the host the script is running on."` + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Script][Script Property] | `($)Script` with value `"Get-Content \"C:\\Folder\\Example.txt\""` | `($)Script` is a variable of type [String][] | +| [Parameters][Parameters Property] | `($)Parameters` with no value | `($)Parameters` is a variable of type [Dictionary][]<[String][], [dynamic][]> | +| [PowerShell Session Details][PowerShell Session Details Property] | `($)PowerShellSessionDetails` with value `{"ServerDetails": {"Host": "host.domain.com", "Port": 5986, "UseSsl": "true"}, "Credentials": {"Domain": "domain.com", "Username": "username", "Password": "encryptedPassword"}}`(Cortex.Blocks.Text.ConvertTo.ConvertToCamelCaseBlock)
+ +## Description + +Converts [Text][Text Property] to camel case. + +Converting to camel case will result in all words (except the first) having their first letter capitalized, all other letters lower cased, and all spaces and punctuation being removed (e.g. `"TEXT to convert to camel-case!"` will be converted to `"textToConvertToCamelCase"`). + +## Examples + +### Text converted to camel case + +This example will convert `"The quick brown fox jumps over the lazy dog"` to camel case. + +It performs a [culture-insensitive][InvariantCulture] conversion of the text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Culture Info][CultureInfo Property] | `($)CultureInfo`, with value `CultureInfo.InvariantCulture` | `($)CultureInfo` is a variable of type [CultureInfo][] | + +#### Result + +Converting `"The quick brown fox jumps over the lazy dog"` to camel case will result in the variable `($)Text` being updated to the following: + +```json +"theQuickBrownFoxJumpsOverTheLazyDog" +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to convert to camel case. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Culture Info + +The [Culture Info][CultureInfo Property] used to perform the conversion of the [Text][Text Property]. + +For information about the [supported values][CultureInfos] for the [Culture Info][CultureInfo Property] property and examples of how it affects casing rules, please see [Casing][]. + +| | | +|--------------------|---------------------------| +| Data Type | [CultureInfo][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Expression][] | +| Default Value | `CultureInfo.InvariantCulture` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [InvalidPropertyValueException][] | Thrown when the culture identifier of the [Culture Info][CultureInfo Property] is invalid (e.g. `new CultureInfo("InvalidCultureIdentifier")`). See [Value Is Invalid][]. | + +## Remarks + +### Culture Info + +For information about the [supported values][CultureInfos] for the [CultureInfo][CultureInfo Property] property and examples of how it affects casing rules, please see [Casing][]. + +### Null Culture Info + +If [Culture Info][CultureInfo Property] is `null`, it will be set to `CultureInfo.InvariantCulture`. + +### Null or empty Text + +If [Text][Text Property] is `null` or empty (i.e. `""`), no operation is performed. + +### Immutable String data type + +The [String][] data type used to represent [Text][Text Property] is immutable, which means it is read-only and cannot be changed once created. + +To overcome this, this block creates a new [String][] which has the [Text][Text Property] converted to camel case and re-assigns it to the variable specified in the [Text][Text Property] property. + +[Text Property]: {{< ref "#text" >}} +[CultureInfo Property]: {{< ref "#culture-info" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Casing]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Casing.MainDoc" >}} +[CultureInfos]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Casing.CultureInfo.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[CultureInfo]: {{< url path="Cortex.Reference.DataTypes.Text.CultureInfo.MainDoc" >}} +[InvariantCulture]: {{< url path="Cortex.Reference.DataTypes.MostCommon.InvariantCulture" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/Convert-To/convert-to-lower-case-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/Convert-To/convert-to-lower-case-block.md new file mode 100644 index 000000000..936c9a451 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/Convert-To/convert-to-lower-case-block.md @@ -0,0 +1,120 @@ +--- +title: "Convert To Lower Case" +linkTitle: "Convert To Lower Case" +description: "Converts text to lower case (e.g. `\"lowercase\"`)." +--- + +{{< figure src="/blocks/text-convert-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.ConvertTo.ConvertToLowerCaseBlock)
+ +## Description + +Converts [Text][Text Property] to lower case. + +Converting to lower case will result in all letters being lower cased; spaces and punctuation will be preserved (e.g. `"TEXT to convert to lower-case!"` will be converted to `"text to convert to lower-case!"`). + +## Examples + +### Text converted to lower case + +This example will convert `"The quick brown fox jumps over the lazy dog"` to lower case. + +It performs a [culture-insensitive][InvariantCulture] conversion of the text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Culture Info][CultureInfo Property] | `($)CultureInfo`, with value `CultureInfo.InvariantCulture` | `($)CultureInfo` is a variable of type [CultureInfo][] | + +#### Result + +Converting `"The quick brown fox jumps over the lazy dog"` to lower case will result in the variable `($)Text` being updated to the following: + +```json +"the quick brown fox jumps over the lazy dog" +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to convert to lower case. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Culture Info + +The [Culture Info][CultureInfo Property] used to perform the conversion of the [Text][Text Property]. + +For information about the [supported values][CultureInfos] for the [Culture Info][CultureInfo Property] property and examples of how it affects casing rules, please see [Casing][]. + +| | | +|--------------------|---------------------------| +| Data Type | [CultureInfo][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Expression][] | +| Default Value | `CultureInfo.InvariantCulture` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [InvalidPropertyValueException][] | Thrown when the culture identifier of the [Culture Info][CultureInfo Property] is invalid (e.g. `new CultureInfo("InvalidCultureIdentifier")`). See [Value Is Invalid][]. | + +## Remarks + +### Culture Info + +For information about the [supported values][CultureInfos] for the [CultureInfo][CultureInfo Property] property and examples of how it affects casing rules, please see [Casing][]. + +### Null Culture Info + +If [Culture Info][CultureInfo Property] is `null`, it will be set to `CultureInfo.InvariantCulture`. + +### Null or empty Text + +If [Text][Text Property] is `null` or empty (i.e. `""`), no operation is performed. + +### Immutable String data type + +The [String][] data type used to represent [Text][Text Property] is immutable, which means it is read-only and cannot be changed once created. + +To overcome this, this block creates a new [String][] which has the [Text][Text Property] converted to lower case and re-assigns it to the variable specified in the [Text][Text Property] property. + +[Text Property]: {{< ref "#text" >}} +[CultureInfo Property]: {{< ref "#culture-info" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Casing]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Casing.MainDoc" >}} +[CultureInfos]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Casing.CultureInfo.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[CultureInfo]: {{< url path="Cortex.Reference.DataTypes.Text.CultureInfo.MainDoc" >}} +[InvariantCulture]: {{< url path="Cortex.Reference.DataTypes.MostCommon.InvariantCulture" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/Convert-To/convert-to-pascal-case-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/Convert-To/convert-to-pascal-case-block.md new file mode 100644 index 000000000..4d91592a6 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/Convert-To/convert-to-pascal-case-block.md @@ -0,0 +1,120 @@ +--- +title: "Convert To Pascal Case" +linkTitle: "Convert To Pascal Case" +description: "Converts text to pascal case (e.g. `\"PascalCase\"`)." +--- + +{{< figure src="/blocks/text-convert-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.ConvertTo.ConvertToPascalCaseBlock)
+ +## Description + +Converts [Text][Text Property] to pascal case. + +Converting to pascal case will result in all words having their first letter capitalized, all other letters lower cased, and all spaces and punctuation being removed (e.g. `"TEXT to convert to pascal-case!"` will be converted to `"TextToConvertToPascalCase"`). + +## Examples + +### Text converted to pascal case + +This example will convert `"The quick brown fox jumps over the lazy dog"` to pascal case. + +It performs a [culture-insensitive][InvariantCulture] conversion of the text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Culture Info][CultureInfo Property] | `($)CultureInfo`, with value `CultureInfo.InvariantCulture` | `($)CultureInfo` is a variable of type [CultureInfo][] | + +#### Result + +Converting `"The quick brown fox jumps over the lazy dog"` to pascal case will result in the variable `($)Text` being updated to the following: + +```json +"TheQuickBrownFoxJumpsOverTheLazyDog" +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to convert to pascal case. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Culture Info + +The [Culture Info][CultureInfo Property] used to perform the conversion of the [Text][Text Property]. + +For information about the [supported values][CultureInfos] for the [Culture Info][CultureInfo Property] property and examples of how it affects casing rules, please see [Casing][]. + +| | | +|--------------------|---------------------------| +| Data Type | [CultureInfo][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Expression][] | +| Default Value | `CultureInfo.InvariantCulture` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [InvalidPropertyValueException][] | Thrown when the culture identifier of the [Culture Info][CultureInfo Property] is invalid (e.g. `new CultureInfo("InvalidCultureIdentifier")`). See [Value Is Invalid][]. | + +## Remarks + +### Culture Info + +For information about the [supported values][CultureInfos] for the [CultureInfo][CultureInfo Property] property and examples of how it affects casing rules, please see [Casing][]. + +### Null Culture Info + +If [Culture Info][CultureInfo Property] is `null`, it will be set to `CultureInfo.InvariantCulture`. + +### Null or empty Text + +If [Text][Text Property] is `null` or empty (i.e. `""`), no operation is performed. + +### Immutable String data type + +The [String][] data type used to represent [Text][Text Property] is immutable, which means it is read-only and cannot be changed once created. + +To overcome this, this block creates a new [String][] which has the [Text][Text Property] converted to pascal case and re-assigns it to the variable specified in the [Text][Text Property] property. + +[Text Property]: {{< ref "#text" >}} +[CultureInfo Property]: {{< ref "#culture-info" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Casing]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Casing.MainDoc" >}} +[CultureInfos]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Casing.CultureInfo.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[CultureInfo]: {{< url path="Cortex.Reference.DataTypes.Text.CultureInfo.MainDoc" >}} +[InvariantCulture]: {{< url path="Cortex.Reference.DataTypes.MostCommon.InvariantCulture" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/Convert-To/convert-to-title-case-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/Convert-To/convert-to-title-case-block.md new file mode 100644 index 000000000..cd57b8623 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/Convert-To/convert-to-title-case-block.md @@ -0,0 +1,120 @@ +--- +title: "Convert To Title Case" +linkTitle: "Convert To Title Case" +description: "Converts text to title case (e.g. `\"Title Case\"`)." +--- + +{{< figure src="/blocks/text-convert-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.ConvertTo.ConvertToTitleCaseBlock)
+ +## Description + +Converts [Text][Text Property] to title case. + +Converting to title case will result in all words having their first letter capitalized and all other letters lower cased; except for words that are entirely upper cased, such as acronyms, which remain upper cased; spaces and punctuation will be preserved (e.g. `"TEXT to convert to title-case!"` will be converted to `"TEXT To Convert To Title-Case!"`). + +## Examples + +### Text converted to title case + +This example will convert `"The quick brown fox jumps over the lazy dog"` to title case. + +It performs a [culture-insensitive][InvariantCulture] conversion of the text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Culture Info][CultureInfo Property] | `($)CultureInfo`, with value `CultureInfo.InvariantCulture` | `($)CultureInfo` is a variable of type [CultureInfo][] | + +#### Result + +Converting `"The quick brown fox jumps over the lazy dog"` to title case will result in the variable `($)Text` being updated to the following: + +```json +"The Quick Brown Fox Jumps Over The Lazy Dog" +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to convert to title case. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Culture Info + +The [Culture Info][CultureInfo Property] used to perform the conversion of the [Text][Text Property]. + +For information about the [supported values][CultureInfos] for the [Culture Info][CultureInfo Property] property and examples of how it affects casing rules, please see [Casing][]. + +| | | +|--------------------|---------------------------| +| Data Type | [CultureInfo][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Expression][] | +| Default Value | `CultureInfo.InvariantCulture` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [InvalidPropertyValueException][] | Thrown when the culture identifier of the [Culture Info][CultureInfo Property] is invalid (e.g. `new CultureInfo("InvalidCultureIdentifier")`). See [Value Is Invalid][]. | + +## Remarks + +### Culture Info + +For information about the [supported values][CultureInfos] for the [CultureInfo][CultureInfo Property] property and examples of how it affects casing rules, please see [Casing][]. + +### Null Culture Info + +If [Culture Info][CultureInfo Property] is `null`, it will be set to `CultureInfo.InvariantCulture`. + +### Null or empty Text + +If [Text][Text Property] is `null` or empty (i.e. `""`), no operation is performed. + +### Immutable String data type + +The [String][] data type used to represent [Text][Text Property] is immutable, which means it is read-only and cannot be changed once created. + +To overcome this, this block creates a new [String][] which has the [Text][Text Property] converted to title case and re-assigns it to the variable specified in the [Text][Text Property] property. + +[Text Property]: {{< ref "#text" >}} +[CultureInfo Property]: {{< ref "#culture-info" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Casing]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Casing.MainDoc" >}} +[CultureInfos]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Casing.CultureInfo.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[CultureInfo]: {{< url path="Cortex.Reference.DataTypes.Text.CultureInfo.MainDoc" >}} +[InvariantCulture]: {{< url path="Cortex.Reference.DataTypes.MostCommon.InvariantCulture" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/Convert-To/convert-to-upper-case-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/Convert-To/convert-to-upper-case-block.md new file mode 100644 index 000000000..5c92f7f24 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/Convert-To/convert-to-upper-case-block.md @@ -0,0 +1,120 @@ +--- +title: "Convert To Upper Case" +linkTitle: "Convert To Upper Case" +description: "Converts text to upper case (e.g. `\"UPPERCASE\"`)." +--- + +{{< figure src="/blocks/text-convert-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.ConvertTo.ConvertToUpperCaseBlock)
+ +## Description + +Converts [Text][Text Property] to upper case. + +Converting to upper case will result in all letters being upper cased; spaces and punctuation will be preserved (e.g. `"TEXT to convert to upper-case!"` will be converted to `"TEXT TO CONVERT TO UPPER-CASE!"`). + +## Examples + +### Text converted to upper case + +This example will convert `"The quick brown fox jumps over the lazy dog"` to upper case. + +It performs a [culture-insensitive][InvariantCulture] conversion of the text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Culture Info][CultureInfo Property] | `($)CultureInfo`, with value `CultureInfo.InvariantCulture` | `($)CultureInfo` is a variable of type [CultureInfo][] | + +#### Result + +Converting `"The quick brown fox jumps over the lazy dog"` to upper case will result in the variable `($)Text` being updated to the following: + +```json +"THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to convert to upper case. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Culture Info + +The [Culture Info][CultureInfo Property] used to perform the conversion of the [Text][Text Property]. + +For information about the [supported values][CultureInfos] for the [Culture Info][CultureInfo Property] property and examples of how it affects casing rules, please see [Casing][]. + +| | | +|--------------------|---------------------------| +| Data Type | [CultureInfo][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Expression][] | +| Default Value | `CultureInfo.InvariantCulture` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [InvalidPropertyValueException][] | Thrown when the culture identifier of the [Culture Info][CultureInfo Property] is invalid (e.g. `new CultureInfo("InvalidCultureIdentifier")`). See [Value Is Invalid][]. | + +## Remarks + +### Culture Info + +For information about the [supported values][CultureInfos] for the [CultureInfo][CultureInfo Property] property and examples of how it affects casing rules, please see [Casing][]. + +### Null Culture Info + +If [Culture Info][CultureInfo Property] is `null`, it will be set to `CultureInfo.InvariantCulture`. + +### Null or empty Text + +If [Text][Text Property] is `null` or empty (i.e. `""`), no operation is performed. + +### Immutable String data type + +The [String][] data type used to represent [Text][Text Property] is immutable, which means it is read-only and cannot be changed once created. + +To overcome this, this block creates a new [String][] which has the [Text][Text Property] converted to upper case and re-assigns it to the variable specified in the [Text][Text Property] property. + +[Text Property]: {{< ref "#text" >}} +[CultureInfo Property]: {{< ref "#culture-info" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Casing]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Casing.MainDoc" >}} +[CultureInfos]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Casing.CultureInfo.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[CultureInfo]: {{< url path="Cortex.Reference.DataTypes.Text.CultureInfo.MainDoc" >}} +[InvariantCulture]: {{< url path="Cortex.Reference.DataTypes.MostCommon.InvariantCulture" >}} + +[InvalidPropertyValueException]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.MainDoc" >}} +[Value Is Invalid]: {{< url path="Cortex.Reference.Exceptions.Flows.Blocks.InvalidPropertyValueException.ValueIsInvalid" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/Get-Index/_index.md b/content/en/docs/2023.9/Reference/Blocks/Text/Get-Index/_index.md new file mode 100644 index 000000000..b1f69b98a --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/Get-Index/_index.md @@ -0,0 +1,5 @@ +--- +title: "Get Index(es) of Text" +linkTitle: "Get Index(es) of Text" +description: "Get the index for the specified occurrence of text, or the indexes of all occurrences of text contained in another text." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/Get-Index/get-index-of-text-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/Get-Index/get-index-of-text-block.md new file mode 100644 index 000000000..15d0642aa --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/Get-Index/get-index-of-text-block.md @@ -0,0 +1,335 @@ +--- +title: "Get Index Of Text" +linkTitle: "Get Index Of Text" +description: "Gets the index of the specified occurrence of a text in another text." +--- + +{{< figure src="/blocks/text-get-index-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.GetIndex.GetIndexOfTextBlock)
+ +## Description + +Gets the [Index][Index Property] of the specified [Occurrence][Occurrence Property] of [Text To Find][TextToFind Property] in [Text][Text Property]. + +[Search Options][SearchOptions Property] can be specified to choose whether to use a ContainsText, PatternMatching or Regex search to find the [Text To Find][TextToFind Property]. + +## Examples + +### Get the Index of the first Occurrence of Text To Find (Ordinal) + +This example will get the index of the first occurrence of `"The"` in `"The quick brown fox jumps over the lazy dog"`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `"The"` | `($)TextToFind` is a variable of type [String][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Index][Index Property] | `($)Index`, with no value | `($)Index` is a variable that will be set to an [Int32][] value | + +#### Result + +An [Occurrence][Occurrence Property] of `1` means get the index of the first occurrence; `2` means second etc. + +As this example is performing a [case-sensitive, culture-insensitive][Ordinal] comparison of text, `"The quick brown fox jumps over the lazy dog"` only contains the text `"The"` once; `"the"` has a different case so does not match. Therefore, the variable `($)Index` will be updated to the following: + +```json +0 +``` + +where `0` indicates the index of the first character of the first and only occurrence matching `"The"`. + +*** + +### Get the Index of the last Occurrence of Text To Find (Ordinal Ignore Case) + +This example will get the index of the last occurrence of `"The"` in `"The quick brown fox jumps over the lazy dog"`. + +It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `"The"` | `($)TextToFind` is a variable of type [String][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `-1` | `($)Occurrence` is a variable of type [Int32][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.OrdinalIgnoreCase` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Index][Index Property] | `($)Index`, with no value | `($)Index` is a variable that will be set to an [Int32][] value | + +#### Result + +An [Occurrence][Occurrence Property] of `-1` means get the index of the last occurrence; `2` means second last etc. + +As this example is performing a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text, `"The quick brown fox jumps over the lazy dog"` contains the text `"The"` twice; the first occurrence is `"The"` and the second and last occurrence is `"the"`. Therefore, the variable `($)Index` will be updated to the following: + +```json +31 +``` + +where `31` indicates the index of the first character of the last matching occurrence, `"the"`. + +*** + +### Text does not contain Text To Find + +This example will attempt to get the index of the first occurrence of `"slow"` in `"The quick brown fox jumps over the lazy dog"`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `"slow"` | `($)TextToFind` is a variable of type [String][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Index][Index Property] | `($)Index`, with no value | `($)Index` is a variable that will be set to an [Int32][] value | + +#### Result + +`"The quick brown fox jumps over the lazy dog"` does not contain the text `"slow"`, so the index cannot be found. Therefore, the variable `($)Index` will be updated to the following: + +```json +-1 +``` + +where `-1` indicates that there are no matching occurrences. + +*** + +### Get the Index of the first Occurrence matching the pattern in Text To Find + +This example will get the index of the first occurrence of text matching the pattern `"?he"` from `"The quick brown fox jumps over the lazy dog"`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `"?he"` | `($)TextToFind` is a variable of type [String][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.PatternMatching` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Index][Index Property] | `($)Index`, with no value | `($)Index` is a variable that will be set to an [Int32][] value | + +#### Result + +An [Occurrence][Occurrence Property] of `1` means get the index of the first occurrence; `2` means second etc. + +`"The quick brown fox jumps over the lazy dog"` contains two occurrences that match the pattern `"?he"`; the first occurrence is `"The"` and the second occurrence is `"the"`. Therefore, the variable `($)Index` will be updated to the following: + +```json +0 +``` + +where `0` indicates the index of the first character of the first occurrence matching the pattern `"?he"`. + +*** + +### Get the Index of the last Occurrence matching the regex in Text To Remove + +This example will get the index of the last occurrence of text matching the regex `"(fox|dog)"` from `"The quick brown fox jumps over the lazy dog"`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `"(fox\|dog)"` | `($)TextToFind` is a variable of type [String][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `-1` | `($)Occurrence` is a variable of type [Int32][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Index][Index Property] | `($)Index`, with no value | `($)Index` is a variable that will be set to an [Int32][] value | + +#### Result + +An [Occurrence][Occurrence Property] of `-1` means get the index of the last occurrence; `2` means second last etc. + +`"The quick brown fox jumps over the lazy dog"` contains two occurrences that match the regex `"(fox|dog)"`; the first occurrence is `"fox"` and the second and last occurrence is `"dog"`. Therefore, the variable `($)Index` will be updated to the following: + +```json +40 +``` + +where `0` indicates the index of the first character of the last occurrence matching the regex `"(fox|dog)"`. + +*** + +## Properties + +### Text + +The [Text][Text Property] to get the [Index][Index Property] of the specified [Occurrence][Occurrence Property] of [Text To Find][TextToFind Property] from. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Text To Find + +The [Text To Find][TextToFind Property] the [Index][Index Property] of the specified [Occurrence][Occurrence Property] of, in [Text][Text Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | `$@""` | + +### Occurrence + +The specified [Occurrence][Occurrence Property] of [Text To Find][TextToFind Property] in [Text][Text Property]. + +For information about [supported values][Occurrences] for the [Occurrence][Occurrence Property] property and examples of how it can be used, please see [Occurrences][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `1` | + +### Search Options + +[Search Options][SearchOptions Property] can be specified to choose whether [Text To Find][TextToFind Property] should be interpreted as a ContainsText, PatternMatching or Regex search: + +* `SearchOptions.ContainsText` matches text exactly; as long as the [Text][Text Property] contains the text specified in [Text To Find][TextToFind Property] it will be considered a match. +* `SearchOptions.PatternMatching` allows wildcard text matching using [Pattern Matching Syntax][]: + * `*` wildcard character can be used to match `0` or more characters. + * `?` wildcard character can be used to match `0` or `1` character. + * All other characters are treated as a literal character. +* `SearchOptions.Regex` allows regex text matching using [.Net Regex Syntax][Regex Syntax]. + +Please note that with `SearchOptions.ContainsText` overlapping matches are detected (e.g. searching for `"aa"` in `"aaa"` matches `"aa"` at index `0` and `"aa"` at index `1`). With `SearchOptions.Regex` only `"aa"` at index `0` will be matched. + +| | | +|--------------------|---------------------------| +| Data Type | [SearchOptions][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Literal][] | +| Default Value | `ContainsText` | + +### Comparison Type + +The [Comparison Type][ComparisonType Property] specifying the rules used to match [Text To Find][TextToFind Property] in [Text][Text Property]. + +For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [StringComparison][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Literal][] | +| Default Value | `Ordinal` | + +### Index + +[Int32][] indicating the [Index][Index Property] of the first character of the specified [Occurrence][Occurrence Property] of [Text To Find][TextToFind Property] in [Text][Text Property]. + +If there is no specified [Occurrence][Occurrence Property] of [Text To Find][TextToFind Property] in [Text][Text Property], the specified variable will be set to `-1`. + +For information about what an index is, please see [Indexes][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Index` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [ArgumentException][] | Thrown when [Comparison Type][ComparisonType Property] is not one of the specified [StringComparison][] types (e.g. `(StringComparison)10`). | +| | Thrown when [Search Options][SearchOptions Property] is not one of the specified [SearchOptions][] types (e.g. `(SearchOptions)10`). | +| [RegexMatchTimeoutException][] | Thrown when [Search Options][SearchOptions Property] is either `SearchOptions.Regex` or `SearchOptions.PatternMatching` and the execution time of the search exceeds `30` seconds. | +| [RegexParsingFailedException][] | Thrown when [Search Options][SearchOptions Property] is `SearchOptions.Regex` and [Text To Find][TextToFind Property] is not a valid regex (e.g. `(`). | + +## Remarks + +### Comparison Types + +For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. + +### Null or empty Text + +If [Text][Text Property] is `null` or empty (i.e. `""`), the variable specified in the [Index][Index Property] property is set to `-1`. + +### Null or empty Text To Find + +If [Text To Find][TextToFind Property] is `null` or empty (i.e. `""`), the variable specified in the [Index][Index Property] property is set to `-1`. + +### Occurrence is zero + +If the [Occurrence][Occurrence Property] is set to `0`, the variable specified in the [Index][Index Property] property is set to `-1`. + +### Occurrence of Text To Find not found + +If the specified [Occurrence][Occurrence Property] of [Text To Find][TextToFind Property] is not found in [Text][Text Property], the variable specified in the [Index][Index Property] property is set to `-1`. + +### Known Limitations + +If [Search Options][SearchOptions Property] is set to `SearchOptions.Regex` or `SearchOptions.PatternMatching` and [Comparison Type][ComparisonType Property] is set to `StringComparison.CurrentCulture`, some characters such as `æ` that is equivalent to `ae` may not evaluate as equal. + +[Text Property]: {{< ref "#text" >}} +[TextToFind Property]: {{< ref "#text-to-find" >}} +[Occurrence Property]: {{< ref "#occurrence" >}} +[SearchOptions Property]: {{< ref "#search-options" >}} +[ComparisonType Property]: {{< ref "#comparison-type" >}} +[Index Property]: {{< ref "#index" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Indexes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Indexes.MainDoc" >}} +[Occurrences]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Occurrences.MainDoc" >}} +[Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.MainDoc" >}} +[ComparisonTypes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.MainDoc" >}} +[Ordinal]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.Ordinal" >}} +[OrdinalIgnoreCase]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.OrdinalIgnoreCase" >}} +[Pattern Matching Syntax]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.PatternMatchingSyntax.MainDoc" >}} +[Regex Syntax]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.RegexSyntax.MainDoc" >}} + +[RegexParsingFailedException]: {{< url path="Cortex.Reference.Exceptions.Text.Regex.RegexParsingFailedException.MainDoc" >}} + +[ArgumentException]: {{< url path="MSDocs.DotNet.Api.System.ArgumentException" >}} +[RegexMatchTimeoutException]: {{< url path="MSDocs.DotNet.Api.System.Text.RegularExpressions.RegexMatchTimeoutException" >}} + +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[StringComparison]: {{< url path="Cortex.Reference.DataTypes.Text.StringComparison.MainDoc" >}} +[SearchOptions]: {{< url path="Cortex.Reference.DataTypes.Text.SearchOptions.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/Get-Index/get-indexes-of-text-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/Get-Index/get-indexes-of-text-block.md new file mode 100644 index 000000000..cd467c0af --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/Get-Index/get-indexes-of-text-block.md @@ -0,0 +1,303 @@ +--- +title: "Get Indexes Of Text" +linkTitle: "Get Indexes Of Text" +description: "Gets the indexes of all occurrences of a text in another text." +--- + +{{< figure src="/blocks/text-get-index-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.GetIndex.GetIndexesOfTextBlock)
+ +## Description + +Gets the [Indexes][Indexes Property] of all occurrences of [Text To Find][TextToFind Property] in [Text][Text Property]. + +[Search Options][SearchOptions Property] can be specified to choose whether to use a ContainsText, PatternMatching or Regex search to find the [Text To Find][TextToFind Property]. + +## Examples + +### Get Indexes of all occurrences of Text To Find (Ordinal) + +This example will get the indexes of all occurrences of `"The"` in `"The quick brown fox jumps over the lazy dog"`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `"The"` | `($)TextToFind` is a variable of type [String][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Indexes][Indexes Property] | `($)Indexes`, with no value | `($)Indexes` is a variable that will be set to an [IList][]<[Int32][]> value | + +#### Result + +As this example is performing a [case-sensitive, culture-insensitive][Ordinal] comparison of text, `"The quick brown fox jumps over the lazy dog"` only contains the text `"The"` once; `"the"` has a different case so does not match. Therefore, the variable `($)Indexes` will be updated to the following: + +```json +[0] +``` + +where `0` indicates the index of the first character of the matching `"The"` occurrence. + +*** + +### Get Indexes of all occurrences of Text To Find (Ordinal Ignore Case) + +This example will get the indexes of all occurrences of `"The"` in `"The quick brown fox jumps over the lazy dog"`. + +It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `"The"` | `($)TextToFind` is a variable of type [String][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.OrdinalIgnoreCase` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Indexes][Indexes Property] | `($)Indexes`, with no value | `($)Indexes` is a variable that will be set to an [IList][]<[Int32][]> value | + +#### Result + +As this example is performing a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text, `"The quick brown fox jumps over the lazy dog"` contains the text `"The"` twice; the first occurrence is `"The"` and the second occurrence is `"the"`. Therefore, the variable `($)Indexes` will be updated to the following: + +```json +[0, 31] +``` + +where `0` indicates the index of the first character of the matching `"The"` occurrence, and `31` indicates the index of the first character of the matching `"the"` occurrence. + +*** + +### Text does not contain Text To Find + +This example will attempt to get the indexes of all occurrences of `"slow"` in `"The quick brown fox jumps over the lazy dog"`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `"slow"` | `($)TextToFind` is a variable of type [String][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Indexes][Indexes Property] | `($)Indexes`, with no value | `($)Indexes` is a variable that will be set to an [IList][]<[Int32][]> value | + +#### Result + +`"The quick brown fox jumps over the lazy dog"` does not contain the text `"slow"`, so the index cannot be found. Therefore, the variable `($)Indexes` will be updated to the following: + +```json +[-1] +``` + +where `-1` indicates that there are no matching occurrences. + +*** + +### Get Indexes of all occurrences matching the pattern in Text To Find + +This example will get the indexes of all occurrences of text matching the pattern `"?he"` from `"The quick brown fox jumps over the lazy dog"`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `"?he"` | `($)TextToFind` is a variable of type [String][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.PatternMatching` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Indexes][Indexes Property] | `($)Indexes`, with no value | `($)Indexes` is a variable that will be set to an [IList][]<[Int32][]> value | + +#### Result + +`"The quick brown fox jumps over the lazy dog"` contains two occurrences that match the pattern `"?he"`; the first occurrence is `"The"` and the second occurrence is `"the"`. Therefore, the variable `($)Indexes` will be updated to the following: + +```json +[0, 31] +``` + +where `0` indicates the index of the first character of the matching `"The"` occurrence, and `31` indicates the index of the first character of the matching `"the"` occurrence. + +*** + +### Get Indexes of all occurrences matching the regex in Text To Remove + +This example will get the indexes of all occurrences of text matching the regex `"(fox|dog)"` from `"The quick brown fox jumps over the lazy dog"`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `"(fox\|dog)"` | `($)TextToFind` is a variable of type [String][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Indexes][Indexes Property] | `($)Indexes`, with no value | `($)Indexes` is a variable that will be set to an [IList][]<[Int32][]> value | + +#### Result + +`"The quick brown fox jumps over the lazy dog"` contains two occurrences that match the regex `"(fox|dog)"`; the first occurrence is `"fox"` and the second and last occurrence is `"dog"`. Therefore, the variable `($)Indexes` will be updated to the following: + +```json +[16, 40] +``` + +where `16` indicates the index of the first character of the matching `"fox"` occurrence, and `40` indicates the index of the first character of the matching `"dog"` occurrence. + +*** + +## Properties + +### Text + +The [Text][Text Property] to get the [Indexes][Indexes Property] of all occurrences of [Text To Find][TextToFind Property] from. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Text To Find + +The [Text To Find][TextToFind Property] the [Indexes][Indexes Property] of all occurrences of, in [Text][Text Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | `$@""` | + +### Search Options + +[Search Options][SearchOptions Property] can be specified to choose whether [Text To Find][TextToFind Property] should be interpreted as a ContainsText, PatternMatching or Regex search: + +* `SearchOptions.ContainsText` matches text exactly; as long as the [Text][Text Property] contains the text specified in [Text To Find][TextToFind Property] it will be considered a match. +* `SearchOptions.PatternMatching` allows wildcard text matching using [Pattern Matching Syntax][]: + * `*` wildcard character can be used to match `0` or more characters. + * `?` wildcard character can be used to match `0` or `1` character. + * All other characters are treated as a literal character. +* `SearchOptions.Regex` allows regex text matching using [.Net Regex Syntax][Regex Syntax]. + +Please note that with `SearchOptions.ContainsText` overlapping matches are detected (e.g. searching for `"aa"` in `"aaa"` matches `"aa"` at index `0` and `"aa"` at index `1`). With `SearchOptions.Regex` only `"aa"` at index `0` will be matched. + +| | | +|--------------------|---------------------------| +| Data Type | [SearchOptions][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Literal][] | +| Default Value | `ContainsText` | + +### Comparison Type + +The [Comparison Type][ComparisonType Property] specifying the rules used to match [Text To Find][TextToFind Property] in [Text][Text Property]. + +For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [StringComparison][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Literal][] | +| Default Value | `Ordinal` | + +### Indexes + +[IList][]<[Int32][]> containing the [Indexes][Indexes Property] of the first character of each occurrence of [Text To Find][TextToFind Property] in [Text][Text Property]. + +If there are no occurrences of [Text To Find][TextToFind Property] in [Text][Text Property], the specified variable will be set to `[-1]`. + +For information about what an index is, please see [Indexes][]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[Int32][]> | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Indexes` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [ArgumentException][] | Thrown when [Comparison Type][ComparisonType Property] is not one of the specified [StringComparison][] types (e.g. `(StringComparison)10`). | +| | Thrown when [Search Options][SearchOptions Property] is not one of the specified [SearchOptions][] types (e.g. `(SearchOptions)10`). | +| [RegexMatchTimeoutException][] | Thrown when [Search Options][SearchOptions Property] is either `SearchOptions.Regex` or `SearchOptions.PatternMatching` and the execution time of the search exceeds `30` seconds. | +| [RegexParsingFailedException][] | Thrown when [Search Options][SearchOptions Property] is `SearchOptions.Regex` and [Text To Find][TextToFind Property] is not a valid regex (e.g. `(`). | + +## Remarks + +### Comparison Types + +For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. + +### Null or empty Text + +If [Text][Text Property] is `null` or empty (i.e. `""`), the variable specified in the [Indexes][Indexes Property] property is set to `[-1]`. + +### Null or empty Text To Find + +If [Text To Find][TextToFind Property] is `null` or empty (i.e. `""`), the variable specified in the [Indexes][Indexes Property] property is set to `[-1]`. + +### Text To Find not found + +If [Text To Find][TextToFind Property] is not found in [Text][Text Property], the variable specified in the [Indexes][Indexes Property] property is set to `[-1]`. + +### Known Limitations + +If [Search Options][SearchOptions Property] is set to `SearchOptions.Regex` or `SearchOptions.PatternMatching` and [Comparison Type][ComparisonType Property] is set to `StringComparison.CurrentCulture`, some characters such as `æ` that is equivalent to `ae` may not evaluate as equal. + +[Text Property]: {{< ref "#text" >}} +[TextToFind Property]: {{< ref "#text-to-find" >}} +[SearchOptions Property]: {{< ref "#search-options" >}} +[ComparisonType Property]: {{< ref "#comparison-type" >}} +[Indexes Property]: {{< ref "#indexes" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Indexes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Indexes.MainDoc" >}} +[Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.MainDoc" >}} +[ComparisonTypes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.MainDoc" >}} +[Ordinal]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.Ordinal" >}} +[OrdinalIgnoreCase]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.OrdinalIgnoreCase" >}} +[Pattern Matching Syntax]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.PatternMatchingSyntax.MainDoc" >}} +[Regex Syntax]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.RegexSyntax.MainDoc" >}} + +[RegexParsingFailedException]: {{< url path="Cortex.Reference.Exceptions.Text.Regex.RegexParsingFailedException.MainDoc" >}} + +[ArgumentException]: {{< url path="MSDocs.DotNet.Api.System.ArgumentException" >}} +[RegexMatchTimeoutException]: {{< url path="MSDocs.DotNet.Api.System.Text.RegularExpressions.RegexMatchTimeoutException" >}} + +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[StringComparison]: {{< url path="Cortex.Reference.DataTypes.Text.StringComparison.MainDoc" >}} +[SearchOptions]: {{< url path="Cortex.Reference.DataTypes.Text.SearchOptions.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/Get-Length/_index.md b/content/en/docs/2023.9/Reference/Blocks/Text/Get-Length/_index.md new file mode 100644 index 000000000..0602a8e34 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/Get-Length/_index.md @@ -0,0 +1,5 @@ +--- +title: "Get Length" +linkTitle: "Get Length" +description: "Get the length of a text." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/Get-Length/get-length-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/Get-Length/get-length-block.md new file mode 100644 index 000000000..0a280a4ae --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/Get-Length/get-length-block.md @@ -0,0 +1,89 @@ +--- +title: "Get Length" +linkTitle: "Get Length" +description: "Gets the length of a given text." +--- + +{{< figure src="/blocks/text-get-length-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.GetLength.GetLengthBlock)
+ +## Description + +Gets the [Length][Length Property] of a given [Text][Text Property]. + +## Examples + +### Get the Length of a given Text + +This example will get the length of `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` | `($)Text` is a variable of type [String][] | +| [Length][Length Property] | `($)Length`, with no value | `($)Length` is a variable that will be set to an [Int32][] | + +#### Result + +Getting the length of `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` results in the variable `($)Length` being updated to the following: + +```json +26 +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to get the [Length][Length Property] of. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Length + +The [Length][Length Property] of the [Text][Text Property] (i.e. the number of characters it contains). + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Length` with no value | + +## Exceptions + +No exceptions are thrown by the block. + +## Remarks + +### Null or empty Text + +If [Text][Text Property] is `null` or empty (i.e. `""`) the variable specified in the [Length][Length Property] property will be set to `0`. + +[Text Property]: {{< ref "#text" >}} +[Length Property]: {{< ref "#length" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/_index.md b/content/en/docs/2023.9/Reference/Blocks/Text/_index.md new file mode 100644 index 000000000..cfd3af806 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/_index.md @@ -0,0 +1,5 @@ +--- +title: "Text" +linkTitle: "Text" +description: "Blocks related to working with Text." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/add-text/_index.md b/content/en/docs/2023.9/Reference/Blocks/Text/add-text/_index.md new file mode 100644 index 000000000..bafeeb0f4 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/add-text/_index.md @@ -0,0 +1,5 @@ +--- +title: "Add Text" +linkTitle: "Add Text" +description: "Add text to another text." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/add-text/add-text-after-index-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/add-text/add-text-after-index-block.md new file mode 100644 index 000000000..d7c66903e --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/add-text/add-text-after-index-block.md @@ -0,0 +1,142 @@ +--- +title: "Add Text After Index" +linkTitle: "Add Text After Index" +description: "Adds text to another text after a given index." +--- + +{{< figure src="/blocks/text-add-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.AddText.AddTextAfterIndexBlock)
+ +## Description + +Adds [Text To Add][TextToAdd Property] to another [Text][Text Property] after the given [Index][Index Property]. + +## Examples + +### Add Text To Add to another Text after the given Index + +This example will add `"|"` after `"A"` (which is at index `0`) in `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` | `($)Text` is a variable of type [String][] | +| [Text To Add][TextToAdd Property] | `($)TextToAdd`, with value `"\|"` | `($)TextToAdd` is a variable of type [String][] | +| [Index][Index Property] | `($)Index`, with value `0` | `($)Index` is a variable of type [Int32][] | + +#### Result + +`"A"` is at index `0` in `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. Therefore, adding `"|"` after index `0` results in the variable `($)Text` being updated to the following: + +```json +"A|BCDEFGHIJKLMNOPQRSTUVWXYZ" +``` + +*** + +### Add null or empty Text To Add to another Text after the given Index + +This example will try to add `null` or `""` after `"A"` (which is at index `0`) in `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` | `($)Text` is a variable of type [String][] | +| [Text To Add][TextToAdd Property] | `($)TextToAdd`, with value `null` or `""` | `($)TextToAdd` is a variable of type [String][] | +| [Index][Index Property] | `($)Index`, with value `0` | `($)Index` is a variable of type [Int32][] | + +#### Result + +Adding `null` or `""` performs no operation as there is nothing to add, so the variable `($)Text` will remain as follows: + +```json +"ABCDEFGHIJKLMNOPQRSTUVWXYZ" +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] where the [Text To Add][TextToAdd Property] is added. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Text To Add + +The [Text To Add][TextToAdd Property] to the [Text][Text Property] after the given [Index][Index Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | `$@""` | + +### Index + +The [Index][Index Property] to add the [Text To Add][TextToAdd Property] after. + +For information about what an index is, please see [Indexes][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `0` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyValueOutOfRangeException][] | Thrown when [Text][Text Property] is `null` or empty (i.e. `""`). | +| | Thrown when [Index][Index Property] is less than zero or greater than the length of [Text][Text Property] - `1`. | + +## Remarks + +### Null or empty Text To Add + +If [Text To Add][TextToAdd Property] is `null` or empty (i.e. `""`) nothing is added to [Text][Text Property]. See [Example][NullOrEmptyTextToAdd Example] above. + +### Immutable String data type + +The [String][] data type used to represent [Text][Text Property] is immutable, which means it is read-only and cannot be changed once created. + +To overcome this, this block creates a new [String][] which has the [Text To Add][TextToAdd Property] added in the correct place and re-assigns it to the variable specified in the [Text][Text Property] property. + +[Text Property]: {{< ref "#text" >}} +[TextToAdd Property]: {{< ref "#text-to-add" >}} +[Index Property]: {{< ref "#index" >}} + +[NullOrEmptyTextToAdd Example]: {{< ref "#add-null-or-empty-text-to-add-to-another-text-after-the-given-index" >}} + +[Indexes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Indexes.MainDoc" >}} +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} +[PropertyValueOutOfRangeException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyValueOutOfRangeException.MainDoc" >}} + +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/add-text/add-text-at-beginning-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/add-text/add-text-at-beginning-block.md new file mode 100644 index 000000000..8cdcefb62 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/add-text/add-text-at-beginning-block.md @@ -0,0 +1,143 @@ +--- +title: "Add Text At Beginning" +linkTitle: "Add Text At Beginning" +description: "Adds text at the beginning of another text." +--- + +{{< figure src="/blocks/text-add-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.AddText.AddTextAtBeginningBlock)
+ +## Description + +Adds [Text To Add][TextToAdd Property] at the beginning of another [Text][Text Property]. + +## Examples + +### Add Text To Add at the beginning of another Text + +This example will add `"|"` at the beginning of `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` | `($)Text` is a variable of type [String][] | +| [Text To Add][TextToAdd Property] | `($)TextToAdd`, with value `"\|"` | `($)TextToAdd` is a variable of type [String][] | + +#### Result + +Adding `"|"` at the beginning of `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` results in the variable `($)Text` being updated to the following: + +```json +"|ABCDEFGHIJKLMNOPQRSTUVWXYZ" +``` + +*** + +### Add Text To Add at the beginning of a null or empty Text + +This example will try to add `"|"` at the beginning of `null` or `""`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `null` or `""` | `($)Text` is a variable of type [String][] | +| [Text To Add][TextToAdd Property] | `($)TextToAdd`, with value `"\|"` | `($)TextToAdd` is a variable of type [String][] | + +#### Result + +Adding `"|"` to `null` or `""` results in the variable `($)Text` being updated to the following: + +```json +"|" +``` + +*** + +### Add null or empty Text To Add at the beginning of another Text + +This example will try to add `null` or `""` at the beginnning of `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` | `($)Text` is a variable of type [String][] | +| [Text To Add][TextToAdd Property] | `($)TextToAdd`, with value `null` or `""` | `($)TextToAdd` is a variable of type [String][] | + +#### Result + +Adding `null` or `""` performs no operation as there is nothing to add, so the variable `($)Text` will remain as follows: + +```json +"ABCDEFGHIJKLMNOPQRSTUVWXYZ" +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] where the [Text To Add][TextToAdd Property] is added. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Text To Add + +The [Text To Add][TextToAdd Property] at the beginning of the [Text][Text Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | `$@""` | + +## Exceptions + +No exceptions are thrown by the block. + +## Remarks + +### Null or empty Text + +If [Text][Text Property] is `null` or empty (i.e. `""`) it is replaced with the [Text To Add][TextToAdd Property]. See [Example][NullOrEmptyText Example] above. + +### Null or empty Text To Add + +If [Text To Add][TextToAdd Property] is `null` or empty (i.e. `""`) nothing is added to [Text][Text Property]. See [Example][NullOrEmptyTextToAdd Example] above. + +### Immutable String data type + +The [String][] data type used to represent [Text][Text Property] is immutable, which means it is read-only and cannot be changed once created. + +To overcome this, this block creates a new [String][] which has the [Text To Add][TextToAdd Property] added in the correct place and re-assigns it to the variable specified in the [Text][Text Property] property. + +[Text Property]: {{< ref "#text" >}} +[TextToAdd Property]: {{< ref "#text-to-add" >}} + +[NullOrEmptyText Example]: {{< ref "#add-text-to-add-at-the-beginning-of-a-null-or-empty-text" >}} +[NullOrEmptyTextToAdd Example]: {{< ref "#add-null-or-empty-text-to-add-at-the-beginning-of-another-text" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/add-text/add-text-at-end-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/add-text/add-text-at-end-block.md new file mode 100644 index 000000000..20b61514b --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/add-text/add-text-at-end-block.md @@ -0,0 +1,143 @@ +--- +title: "Add Text At End" +linkTitle: "Add Text At End" +description: "Adds text at the end of another text." +--- + +{{< figure src="/blocks/text-add-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.AddText.AddTextAtEndBlock)
+ +## Description + +Adds [Text To Add][TextToAdd Property] at the end of another [Text][Text Property]. + +## Examples + +### Add Text To Add at the end of another Text + +This example will add `"|"` at the end of `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` | `($)Text` is a variable of type [String][] | +| [Text To Add][TextToAdd Property] | `($)TextToAdd`, with value `"\|"` | `($)TextToAdd` is a variable of type [String][] | + +#### Result + +Adding `"|"` at the end of `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` results in the variable `($)Text` being updated to the following: + +```json +"ABCDEFGHIJKLMNOPQRSTUVWXYZ|" +``` + +*** + +### Add Text To Add at the end of a null or empty Text + +This example will try to add `"|"` at the end of `null` or `""`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `null` or `""` | `($)Text` is a variable of type [String][] | +| [Text To Add][TextToAdd Property] | `($)TextToAdd`, with value `"\|"` | `($)TextToAdd` is a variable of type [String][] | + +#### Result + +Adding `"|"` to `null` or `""` results in the variable `($)Text` being updated to the following: + +```json +"|" +``` + +*** + +### Add null or empty Text To Add at the end of another Text + +This example will try to add `null` or `""` at the end of `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` | `($)Text` is a variable of type [String][] | +| [Text To Add][TextToAdd Property] | `($)TextToAdd`, with value `null` or `""` | `($)TextToAdd` is a variable of type [String][] | + +#### Result + +Adding `null` or `""` performs no operation as there is nothing to add, so the variable `($)Text` will remain as follows: + +```json +"ABCDEFGHIJKLMNOPQRSTUVWXYZ" +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] where the [Text To Add][TextToAdd Property] is added. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Text To Add + +The [Text To Add][TextToAdd Property] at the end of the [Text][Text Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | `$@""` | + +## Exceptions + +No exceptions are thrown by the block. + +## Remarks + +### Null or empty Text + +If [Text][Text Property] is `null` or empty (i.e. `""`) it is replaced with the [Text To Add][TextToAdd Property]. See [Example][NullOrEmptyText Example] above. + +### Null or empty Text To Add + +If [Text To Add][TextToAdd Property] is `null` or empty (i.e. `""`) nothing is added to [Text][Text Property]. See [Example][NullOrEmptyTextToAdd Example] above. + +### Immutable String data type + +The [String][] data type used to represent [Text][Text Property] is immutable, which means it is read-only and cannot be changed once created. + +To overcome this, this block creates a new [String][] which has the [Text To Add][TextToAdd Property] added in the correct place and re-assigns it to the variable specified in the [Text][Text Property] property. + +[Text Property]: {{< ref "#text" >}} +[TextToAdd Property]: {{< ref "#text-to-add" >}} + +[NullOrEmptyText Example]: {{< ref "#add-text-to-add-at-the-end-of-a-null-or-empty-text" >}} +[NullOrEmptyTextToAdd Example]: {{< ref "#add-null-or-empty-text-to-add-at-the-end-of-another-text" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/add-text/add-text-before-index-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/add-text/add-text-before-index-block.md new file mode 100644 index 000000000..cb7b27598 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/add-text/add-text-before-index-block.md @@ -0,0 +1,144 @@ +--- +title: "Add Text Before Index" +linkTitle: "Add Text Before Index" +description: "Adds text to another text before the specified index." +--- + +{{< figure src="/blocks/text-add-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.AddText.AddTextBeforeIndexBlock)
+ +## Description + +Adds [Text To Add][TextToAdd Property] to another [Text][Text Property] before the specified [Index][Index Property]. + +## Examples + +### Add Text To Add to another Text before the given Index + +This example will add `"|"` before `"A"` (which is at index `0`) in `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` | `($)Text` is a variable of type [String][] | +| [Text To Add][TextToAdd Property] | `($)TextToAdd`, with value `"\|"` | `($)TextToAdd` is a variable of type [String][] | +| [Index][Index Property] | `($)Index`, with value `0` | `($)Index` is a variable of type [Int32][] | + +#### Result + +`"A"` is at index `0` in `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. Therefore, adding `"|"` before index `0` results in the variable `($)Text` being updated to the following: + +```json +"|ABCDEFGHIJKLMNOPQRSTUVWXYZ" +``` + +*** + +### Add null or empty Text To Add to another Text before the given Index + +This example will try to add `null` or `""` before `"A"` (which is at index `0`) in `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` | `($)Text` is a variable of type [String][] | +| [Text To Add][TextToAdd Property] | `($)TextToAdd`, with value `null` or `""` | `($)TextToAdd` is a variable of type [String][] | +| [Index][Index Property] | `($)Index`, with value `0` | `($)Index` is a variable of type [Int32][] | + +#### Result + +Adding `null` or `""` performs no operation as there is nothing to add, so the variable `($)Text` will remain as follows: + +```json +"ABCDEFGHIJKLMNOPQRSTUVWXYZ" +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] where the [Text To Add][TextToAdd Property] is added. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Text To Add + +The [Text To Add][TextToAdd Property] to the [Text][Text Property] before the given [Index][Index Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | `$@""` | + +### Index + +The [Index][Index Property] to add the [Text To Add][TextToAdd Property] before. + +For information about what an index is, please see [Indexes]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `0` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyValueOutOfRangeException][] | Thrown when [Text][Text Property] is `null` or empty (i.e. `""`). | +| | Thrown when [Index][Index Property] is less than zero or greater than the length of [Text][Text Property] - `1`. | + +## Remarks + +### Null or empty Text To Add + +If [Text To Add][TextToAdd Property] is `null` or empty (i.e. `""`) nothing is added to [Text][Text Property]. See [Example][NullOrEmptyTextToAdd Example] above. + +### Immutable String data type + +The [String][] data type used to represent [Text][Text Property] is immutable, which means it is read-only and cannot be changed once created. + +To overcome this, this block creates a new [String][] which has the [Text To Add][TextToAdd Property] added in the correct place and re-assigns it to the variable specified in the [Text][Text Property] property. + +[Text Property]: {{< ref "#text" >}} +[TextToAdd Property]: {{< ref "#text-to-add" >}} +[Index Property]: {{< ref "#index" >}} + +[NullOrEmptyTextToAdd Example]: {{< ref "#add-null-or-empty-text-to-add-to-another-text-before-the-given-index" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Indexes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Indexes.MainDoc" >}} + +[PropertyValueOutOfRangeException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyValueOutOfRangeException.MainDoc" >}} + +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/contains-text/_index.md b/content/en/docs/2023.9/Reference/Blocks/Text/contains-text/_index.md new file mode 100644 index 000000000..a39909591 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/contains-text/_index.md @@ -0,0 +1,5 @@ +--- +title: "Contains Text" +linkTitle: "Contains Text" +description: "Check if text is contained in another text." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/contains-text/contains-all-text-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/contains-text/contains-all-text-block.md new file mode 100644 index 000000000..304443329 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/contains-text/contains-all-text-block.md @@ -0,0 +1,261 @@ +--- +title: "Contains All Text" +linkTitle: "Contains All Text" +description: "Checks if text contains all of the texts in a given set of texts." +--- + +{{< figure src="/blocks/text-contains-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.ContainsText.ContainsAllTextBlock)
+ +## Description + +Checks if [Text][Text Property] contains all of the texts in a given set of [Texts To Find][TextsToFind Property]. + +[Search Options][SearchOptions Property] can be specified to choose whether to use a ContainsText, PatternMatching or Regex search to perform the check. + +## Examples + +### Text contains all of the texts in Texts To Find + +This example will check whether `"The quick brown fox jumps over the lazy dog"` contains all of the texts in `["The", "quick", "brown", "fox"]`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Texts To Find][TextsToFind Property] | `($)TextsToFind`, with value `["The", "quick", "brown", "fox"]` | `($)TextsToFind` is a variable of type [IEnumerable][]<[String][]> | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Contains All Text][ContainsAllText Property] | `($)ContainsAllText`, with no value | `($)ContainsAllText` is a variable that will be set to a [Boolean][] value | + +#### Result + +`"The quick brown fox jumps over the lazy dog"` contains all of the texts in `["The", "quick", "brown", "fox"]`. Therefore, the variable `($)ContainsAllText` will be updated to the following: + +```json +true +``` + +*** + +### Text does not contain all of the texts in Texts To Find + +This example will check whether `"The quick brown fox jumps over the lazy dog"` contains all of the texts in `["the", "slow", "brown", "fox"]`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Texts To Find][TextsToFind Property] | `($)TextsToFind`, with value `["the", "slow", "brown", "fox"]` | `($)TextsToFind` is a variable of type [IEnumerable][]<[String][]> | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Contains All Text][ContainsAllText Property] | `($)ContainsAllText`, with no value | `($)ContainsAllText` is a variable that will be set to a [Boolean][] value | + +#### Result + +`"The quick brown fox jumps over the lazy dog"` does not contain all of the texts in `["the", "slow", "brown", "fox"]`; `"slow"` is missing, and `"the"` does not match `"The"` as the specified [Comparison Type][ComparisonType Property] uses case-sensitive matching. Therefore, the variable `($)ContainsAllText` will be updated to the following: + +```json +false +``` + +*** + +### Text contains text that matches all of the patterns in Texts To Find + +This example will check whether `"The quick brown fox jumps over the lazy dog"` contains text that matches all of the patterns in `["?he", "?uick", "*?own", "fox"]`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Texts To Find][TextsToFind Property] | `($)TextsToFind`, with value `["?he", "?uick", "*?own", "fox"]` | `($)TextsToFind` is a variable of type [IEnumerable][]<[String][]> | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.PatternMatching` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Contains All Text][ContainsAllText Property] | `($)ContainsAllText`, with no value | `($)ContainsAllText` is a variable that will be set to a [Boolean][] value | + +#### Result + +`"The quick brown fox jumps over the lazy dog"` contains text that matches all of the patterns in `["?he", "?uick", "*?own", "fox"]`. Therefore, the variable `($)ContainsAllText` will be updated to the following: + +```json +true +``` + +*** + +### Text contains text that matches all of the regexes in Texts To Find + +This example will check whether `"The quick brown fox jumps over the lazy dog"` contains text that matches all of the regexes in `["^The", "(quick|fast)", "b.* ", "(fox|Fox)"]`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Texts To Find][TextsToFind Property] | `($)TextsToFind`, with value `["^The", "(quick\|fast)", "b.* ", "(fox\|Fox)"]` | `($)TextsToFind` is a variable of type [IEnumerable][]<[String][]> | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Contains All Text][ContainsAllText Property] | `($)ContainsAllText`, with no value | `($)ContainsAllText` is a variable that will be set to a [Boolean][] value | + +#### Result + +`"The quick brown fox jumps over the lazy dog"` contains text that matches all of the regexes in `["^The", "(quick|fast)", "b.* ", "(fox|Fox)"]`. Therefore, the variable `($)ContainsAllText` will be updated to the following: + +```json +true +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to check whether it contains all of the texts in the given set of [Texts To Find][TextsToFind Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Texts To Find + +The set of [Texts To Find][TextsToFind Property] to check are all contained in [Text][Text Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[String][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | `new List(Cortex.Blocks.Text.ContainsText.ContainsAnyTextBlock)
+ +## Description + +Checks if [Text][Text Property] contains any of the texts in a given set of [Texts To Find][TextsToFind Property]. + +[Search Options][SearchOptions Property] can be specified to choose whether to use a ContainsText, PatternMatching or Regex search to perform the check. + +## Examples + +### Text contains any of the texts in Texts To Find + +This example will check whether `"The quick brown fox jumps over the lazy dog"` contains at least one of the texts in `["The", "fast", "red", "fox"]`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Texts To Find][TextsToFind Property] | `($)TextsToFind`, with value `["The", "fast", "red", "fox"]` | `($)TextsToFind` is a variable of type [IEnumerable][]<[String][]> | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Contains Any Text][ContainsAnyText Property] | `($)ContainsAnyText`, with no value | `($)ContainsAnyText` is a variable that will be set to a [Boolean][] value | + +#### Result + +`"The quick brown fox jumps over the lazy dog"` contains the text `"The"` and `"fox"` in `["The", "fast", "red", "fox"]`. Therefore, the variable `($)ContainsAnyText` will be updated to the following: + +```json +true +``` + +*** + +### Text does not contain any of the texts in Texts To Find + +This example will check whether `"The quick brown fox jumps over the lazy dog"` contains at least one of the texts in `["the", "slow", "red", "Fox"]`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Texts To Find][TextsToFind Property] | `($)TextsToFind`, with value `["the", "slow", "red", "Fox"]` | `($)TextsToFind` is a variable of type [IEnumerable][]<[String][]> | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Contains Any Text][ContainsAnyText Property] | `($)ContainsAnyText`, with no value | `($)ContainsAnyText` is a variable that will be set to a [Boolean][] value | + +#### Result + +`"The quick brown fox jumps over the lazy dog"` does not contain any of the texts in `["the", "slow", "red", "Flow"]`; `"slow"` and `"red"` are both missing, and `"the"` and `"Fox"` do not match `"The"` and `"fox"` respectively as the specified [Comparison Type][ComparisonType Property] uses case-sensitive matching. Therefore, the variable `($)ContainsAnyText` will be updated to the following: + +```json +false +``` + +*** + +### Text contains text that matches any of the patterns in Texts To Find + +This example will check whether `"The quick brown fox jumps over the lazy dog"` contains text that matches any of the patterns in `["?he", "Q?ick", "B*?wn", "Fox"]`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Texts To Find][TextsToFind Property] | `($)TextsToFind`, with value `["?he", "Q?ick", "B*?wn", "Fox"]` | `($)TextsToFind` is a variable of type [IEnumerable][]<[String][]> | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.PatternMatching` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Contains Any Text][ContainsAnyText Property] | `($)ContainsAnyText`, with no value | `($)ContainsAnyText` is a variable that will be set to a [Boolean][] value | + +#### Result + +`"The quick brown fox jumps over the lazy dog"` contains text that matches one of the patterns in `["?he", "Q?ick", "B*?wn", "Fox"]`; `"?he"` matches `"The"` and `"the"`. Therefore, the variable `($)ContainsAnyText` will be updated to the following: + +```json +true +``` + +*** + +### Text contains text that matches any of the regexes in Texts To Find + +This example will check whether `"The quick brown fox jumps over the lazy dog"` contains text that matches any of the regexes in `["^The", "(Quick|Fast)", "b.* ", "(fox|Fox)$"]`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Texts To Find][TextsToFind Property] | `($)TextsToFind`, with value `["^The", "(Quick\|Fast)", "b.* ", "(fox\|Fox)$"]` | `($)TextsToFind` is a variable of type [IEnumerable][]<[String][]> | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Contains Any Text][ContainsAnyText Property] | `($)ContainsAnyText`, with no value | `($)ContainsAnyText` is a variable that will be set to a [Boolean][] value | + +#### Result + +`"The quick brown fox jumps over the lazy dog"` contains text that matches any of the regexes in `["^The", "(Quick|Fast)", "b.* ", "(fox|Fox)$"]`; `"^The"` matches `"The"` at the start of the sentence. Therefore, the variable `($)ContainsAnyText` will be updated to the following: + +```json +true +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to check whether it contains any of the texts in the given set of [Texts To Find][TextsToFind Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Texts To Find + +The set of [Texts To Find][TextsToFind Property] to check any are contained in [Text][Text Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[String][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | `new List(Cortex.Blocks.Text.ContainsText.ContainsTextBlock)
+ +## Description + +Checks if [Text][Text Property] contains [Text To Find][TextToFind Property]. + +[Search Options][SearchOptions Property] can be specified to choose whether to use a ContainsText, PatternMatching or Regex search to perform the check. + +## Examples + +### Text contains Text To Find + +This example will check whether `"The quick brown fox jumps over the lazy dog"` contains the text `"quick brown fox"`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `"quick brown fox"` | `($)TextToFind` is a variable of type [String][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Contains Text][ContainsText Property] | `($)ContainsText`, with no value | `($)ContainsText` is a variable that will be set to a [Boolean][] value | + +#### Result + +`"The quick brown fox jumps over the lazy dog"` contains the text `"quick brown fox"`. Therefore, the variable `($)ContainsText` will be updated to the following: + +```json +true +``` + +*** + +### Text does not contain Text To Find + +This example will check whether `"The quick brown fox jumps over the lazy dog"` contains the text `"quick red fox"`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `"quick red fox"` | `($)TextToFind` is a variable of type [String][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Contains Text][ContainsText Property] | `($)ContainsText`, with no value | `($)ContainsText` is a variable that will be set to a [Boolean][] value | + +#### Result + +`"The quick brown fox jumps over the lazy dog"` does not contain `"quick red fox"`. Therefore, the variable `($)ContainsText` will be updated to the following: + +```json +false +``` + +*** + +### Text contains text that matches the pattern in Text To Find + +This example will check whether `"The quick brown fox jumps over the lazy dog"` contains text that matches the pattern `"*?he"`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `"?he"` | `($)TextToFind` is a variable of type [String][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.PatternMatching` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Contains Text][ContainsText Property] | `($)ContainsText`, with no value | `($)ContainsText` is a variable that will be set to a [Boolean][] value | + +#### Result + +`"The quick brown fox jumps over the lazy dog"` contains `"The"` and `"the"` that matches the pattern `"?he"`. Therefore, the variable `($)ContainsText` will be updated to the following: + +```json +true +``` + +*** + +### Text contains text that matches the regex in Text To Find + +This example will check whether `"The quick brown fox jumps over the lazy dog"` contains text that matches the regex `"^The"`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `"^The"` | `($)TextToFind` is a variable of type [String][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Contains Text][ContainsText Property] | `($)ContainsText`, with no value | `($)ContainsText` is a variable that will be set to a [Boolean][] value | + +#### Result + +`"The quick brown fox jumps over the lazy dog"` contains `"The"` at the start of the sentence that matches the regex `"^The"`. Therefore, the variable `($)ContainsText` will be updated to the following: + +```json +true +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to check whether it contains [Text To Find][TextToFind Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Text To Find + +The [Text To Find][TextToFind Property] in [Text][Text Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | `$@""` | + +### Search Options + +[Search Options][SearchOptions Property] can be specified to choose whether [Text To Find][TextToFind Property] should be interpreted as a ContainsText, PatternMatching or Regex search: + +* `SearchOptions.ContainsText` matches text exactly; as long as the [Text][Text Property] contains the text specified in [Text To Find][TextToFind Property] it will be considered a match. +* `SearchOptions.PatternMatching` allows wildcard text matching using [Pattern Matching Syntax][]: + * `*` wildcard character can be used to match `0` or more characters. + * `?` wildcard character can be used to match `0` or `1` character. + * All other characters are treated as a literal character. +* `SearchOptions.Regex` allows regex text matching using [.Net Regex Syntax][Regex Syntax]. + +Please note that with `SearchOptions.ContainsText` overlapping matches are detected (e.g. searching for `"aa"` in `"aaa"` matches `"aa"` at index `0` and `"aa"` at index `1`). With `SearchOptions.Regex` only `"aa"` at index `0` will be matched. + +| | | +|--------------------|---------------------------| +| Data Type | [SearchOptions][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Literal][] | +| Default Value | `ContainsText` | + +### Comparison Type + +The [Comparison Type][ComparisonType Property] specifying the rules used to determine whether [Text To Find][TextToFind Property] is contained in [Text][Text Property] + +For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [StringComparison][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Literal][] | +| Default Value | `Ordinal` | + +### Contains Text + +The result of the contains text check. + +If [Text To Find][TextToFind Property] is contained in [Text][Text Property], the specified variable will be set to `true`, otherwise it will be set to `false`. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)ContainsText` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [ArgumentException][] | Thrown when [Comparison Type][ComparisonType Property] is not one of the specified [StringComparison][] types (e.g. `(StringComparison)10`). | +| | Thrown when [Search Options][SearchOptions Property] is not one of the specified [SearchOptions][] types (e.g. `(SearchOptions)10`). | +| [RegexMatchTimeoutException][] | Thrown when [Search Options][SearchOptions Property] is either `SearchOptions.Regex` or `SearchOptions.PatternMatching` and the execution time of the search exceeds `30` seconds. | +| [RegexParsingFailedException][] | Thrown when [Search Options][SearchOptions Property] is `SearchOptions.Regex` and [Text To Find][TextToFind Property] is not a valid regex (e.g. `(`). | + +## Remarks + +### Comparison Types + +For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. + +### Null or empty Text + +If [Text][Text Property] is `null` or empty (i.e. `""`), the variable specified in the [Contains Text][ContainsText Property] property is set to `false`. + +### Null or empty Text To Find + +If [Text To Find][TextToFind Property] is `null` or empty (i.e. `""`), the variable specified in the [Contains Text][ContainsText Property] property is set to `false`. + +### Known Limitations + +If [Search Options][SearchOptions Property] is set to `SearchOptions.Regex` or `SearchOptions.PatternMatching` and [Comparison Type][ComparisonType Property] is set to `StringComparison.CurrentCulture`, some characters such as `æ` that is equivalent to `ae` may not evaluate as equal. + +[Text Property]: {{< ref "#text" >}} +[TextToFind Property]: {{< ref "#text-to-find" >}} +[SearchOptions Property]: {{< ref "#search-options" >}} +[ComparisonType Property]: {{< ref "#comparison-type" >}} +[ContainsText Property]: {{< ref "#contains-text" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.MainDoc" >}} +[ComparisonTypes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.MainDoc" >}} +[Ordinal]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.Ordinal" >}} +[Pattern Matching Syntax]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.PatternMatchingSyntax.MainDoc" >}} +[Regex Syntax]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.RegexSyntax.MainDoc" >}} + +[RegexParsingFailedException]: {{< url path="Cortex.Reference.Exceptions.Text.Regex.RegexParsingFailedException.MainDoc" >}} + +[ArgumentException]: {{< url path="MSDocs.DotNet.Api.System.ArgumentException" >}} +[RegexMatchTimeoutException]: {{< url path="MSDocs.DotNet.Api.System.Text.RegularExpressions.RegexMatchTimeoutException" >}} + +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[StringComparison]: {{< url path="Cortex.Reference.DataTypes.Text.StringComparison.MainDoc" >}} +[SearchOptions]: {{< url path="Cortex.Reference.DataTypes.Text.SearchOptions.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/decode-text/_index.md b/content/en/docs/2023.9/Reference/Blocks/Text/decode-text/_index.md new file mode 100644 index 000000000..fc6653945 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/decode-text/_index.md @@ -0,0 +1,5 @@ +--- +title: "Decode Text" +linkTitle: "Decode Text" +description: "Decode text from a specified format (e.g. `\"Base64\"`)." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/decode-text/decode-text-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/decode-text/decode-text-block.md new file mode 100644 index 000000000..d96edd44d --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/decode-text/decode-text-block.md @@ -0,0 +1,227 @@ +--- +title: "Decode Text" +linkTitle: "Decode Text" +description: "Decodes text from a specified format (e.g. `\"Base64\"`)." +--- + +{{< figure src="/blocks/text-decode-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.DecodeText.DecodeTextBlock)
+ +## Description + +Decodes [Text][Text Property] from the specified [Format][Format Property]. + +## Examples + +### Text decoded from Base64 + +This example will decode the [Base64][] encoded text `"VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw=="` to `"The quick brown fox jumps over the lazy dog"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw=="` | `($)Text` is a variable of type [String][] | +| [Format][Format Property] | `($)Format`, with value `"TextEncodingFormat.Base64"` | `($)Format` is a variable of type [TextEncodingFormat][] + +#### Result + +Decoding `"VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw=="` with the [Format][Format Property] [Base64] will result in the variable `($)Text` being updated to the following: + +```json +"The quick brown fox jumps over the lazy dog" +``` + +*** + +### Text decoded from Url + +This example will decode the [Url][] encoded text `"The%20quick%20brown%20fox%20jumps%20over%20the%20lazy%20dog%21"` to `"The quick brown fox jumps over the lazy dog!"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The%20quick%20brown%20fox%20jumps%20over%20the%20lazy%20dog%21"` | `($)Text` is a variable of type [String][] | +| [Format][Format Property] | `($)Format`, with value `"TextEncodingFormat.Url"` | `($)Format` is a variable of type [TextEncodingFormat][] + +#### Result + +Decoding `"The%20quick%20brown%20fox%20jumps%20over%20the%20lazy%20dog%21"` with the [Format][Format Property] [Url] will result in the variable `($)Text` being updated to the following: + +```json +"The quick brown fox jumps over the lazy dog!" +``` + +*** + +### Text decoded from Hex + +This example will decode the [Hex][] encoded text `"54686520717569636B2062726F776E20666F78206A756D7073206F76657220746865206C617A7920646F67"` to `"The quick brown fox jumps over the lazy dog"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"54686520717569636B2062726F776E20666F78206A756D7073206F76657220746865206C617A7920646F67"` | `($)Text` is a variable of type [String][] | +| [Format][Format Property] | `($)Format`, with value `"TextEncodingFormat.Hex"` | `($)Format` is a variable of type [TextEncodingFormat][] + +#### Result + +Decoding `"54686520717569636B2062726F776E20666F78206A756D7073206F76657220746865206C617A7920646F67"` with the [Format][Format Property] [Hex] will result in the variable `($)Text` being updated to the following: + +```json +"The quick brown fox jumps over the lazy dog" +``` + +*** + +### Text decoded from Html + +This example will decode the [Html][] encoded text `"<p>The quick brown fox jumps over the lazy dog!</p>"` to `"The quick brown fox jumps over the lazy dog!
"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"<p>The quick brown fox jumps over the lazy dog!</p>"` | `($)Text` is a variable of type [String][] | +| [Format][Format Property] | `($)Format`, with value `"TextEncodingFormat.Html"` | `($)Format` is a variable of type [TextEncodingFormat][] + +#### Result + +Decoding `"<p>The quick brown fox jumps over the lazy dog!</p>"` with the [Format][Format Property] [Html] will result in the variable `($)Text` being updated to the following: + +```json +"The quick brown fox jumps over the lazy dog!
" +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to decode from the specified [Format][Format Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Format + +The [Format][Format Property] used to decode the given [Text][Text Property]. + +[Format][Format Property] can be any of the predefined values: + +* `TextEncodingFormat.Base64` +* `TextEncodingFormat.Url` +* `TextEncodingFormat.Hex` +* `TextEncodingFormat.Html` +* `TextEncodingFormat.Utf8` +* `TextEncodingFormat.Base64Url` + +| | | +|--------------------|---------------------------| +| Data Type | [TextEncodingFormat][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `Base64` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [ArgumentException][] | Thrown when [Format][Format Property] is not one of the specified [TextEncodingFormat][] types (e.g. `(TextEncodingFormat)10`). | +| [TextDecodingException][] | Thrown when [Text][Text Property] contains an invalid character for [Base64] decoding. For more information, see [Invalid Base64 Character][InvalidBase64]. | +||Thrown when [Text][Text Property] contains an odd number of characters for [Hex] decoding. For more information, see [Odd number of characters using Hex][InvalidHex]. | +|| Thrown when [Text][Text Property] contains an invalid character for [Base64Url] decoding. For more information, see [Invalid Base64Url Character][InvalidBase64Url]. | + +## Remarks + +### Null or empty Text + +If [Text][Text Property] is `null` or empty (i.e. `""`) there is nothing to decode, so no operation is performed. + +### Decoding out of range URL characters + +When decoding using the [Url][] [Format][Format Property], characters not in the valid range (i.e.`%00` to `%ff`) will be treated as literal characters (e.g. `"%zzExample%21"` will decode to `"%zzExample!"`). + +### Decoding invalid Hex values + +When decoding using the [Hex] [Format][Format Property], characters not in the valid set (i.e. `0-9` and `A-F`) will overflow (e.g. `G` overflows to `0`), further examples are shown below: +| Encoded Text | Overflows To | Decoded Text | +|--------------|--------------|--------------| +| 4G | 40 | @ | +| 4H | 41 | A | +| 4I | 42 | B | +| J1 | 31 | 1 | +| K1 | 41 | A | +| L1 | 51 | Q | + +### Decoding invalid HTML entities + +When decoding using the [Html] [Format][Format Property], invalid [HTML Entities][HTMLEntity] will be removed (e.g. `"Example&InvalidEntity;"` will decode to `"Example"`). + +### Decoding HTML ampersand + +When decoding using the [Html] [Format][Format Property], any ampersand that is not part of an [HTML Entity][HTMLEntity] will be removed (e.g. `"Example&Something"` will decode to `"ExampleSomething"`). + +### Decoding HTML semicolon + +When decoding using the [Html] [Format][Format Property], any semicolon that is not part of an [HTML Entity][HTMLEntity] will be treated as a literal character (e.g. `"ExampleSomething;"` will decode to `"ExampleSomething;"`). + +### Round-Tripping + +It should be possible to pass the text created by an [Encode Text block][Encode Text] to this block, and then pass the text created by this block back to an [Encode Text block][Encode Text]; this is called round-tripping. + +### Immutable String data type + +The [String][] data type used to represent [Text][Text Property] is immutable, which means it is read-only and cannot be changed once created. + +To overcome this, this block creates a new [String][] which has the [Text][Text Property] decoded from the specified format and reassigns it to the specified [Text][Text Property] property. + +### Known Limitations + +When decoding using the [Html] [Format][Format Property], any HTML5 named [entities][HTMLEntity] (e.g. `"φ"`) will be removed. + +This limitation may be removed in the future. + +[Text Property]: {{< ref "#text" >}} +[Format Property]: {{< ref "#format" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[TextEncodingFormat]: {{< url path="Cortex.Reference.DataTypes.Text.Encoding.TextEncodingFormat.MainDoc" >}} + +[ArgumentException]: {{< url path="MSDocs.DotNet.Api.System.ArgumentException" >}} +[TextDecodingException]: {{< url path="Cortex.Reference.Exceptions.Text.Encoding.TextDecodingException.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Html]: {{< url path="Cortex.Reference.DataTypes.Text.Encoding.TextEncodingFormat.Html" >}} +[Base64]: {{< url path="Cortex.Reference.DataTypes.Text.Encoding.TextEncodingFormat.Base64" >}} +[Hex]: {{< url path="Cortex.Reference.DataTypes.Text.Encoding.TextEncodingFormat.Hex" >}} +[Base64Url]: {{< url path="Cortex.Reference.DataTypes.Text.Encoding.TextEncodingFormat.Base64Url" >}} +[Url]: {{< url path="Cortex.Reference.DataTypes.Text.Encoding.TextEncodingFormat.Url" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} + +[InvalidBase64]: {{< url path="Cortex.Reference.Exceptions.Text.Encoding.TextDecodingException.InvalidBase64" >}} +[InvalidHex]: {{< url path="Cortex.Reference.Exceptions.Text.Encoding.TextDecodingException.InvalidHex" >}} +[InvalidBase64Url]: {{< url path="Cortex.Reference.Exceptions.Text.Encoding.TextDecodingException.InvalidBase64Url" >}} + +[Encode Text]: {{< url path="Cortex.Reference.Blocks.Text.EncodeText.EncodeText.MainDoc" >}} +[HTMLEntity]: {{< url path="Cortex.Reference.Glossary.F-J.HTMLEntity" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/encode-text/_index.md b/content/en/docs/2023.9/Reference/Blocks/Text/encode-text/_index.md new file mode 100644 index 000000000..38ce0b2f7 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/encode-text/_index.md @@ -0,0 +1,5 @@ +--- +title: "Encode Text" +linkTitle: "Encode Text" +description: "Encode text to a specified format (e.g. `\"Base64\"`)." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/encode-text/encode-text-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/encode-text/encode-text-block.md new file mode 100644 index 000000000..21b94e1f9 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/encode-text/encode-text-block.md @@ -0,0 +1,177 @@ +--- +title: "Encode Text" +linkTitle: "Encode Text" +description: "Encodes text to a specified format (e.g. `\"Base64\"`)." +--- + +{{< figure src="/blocks/text-encode-text-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.EncodeText.EncodeTextBlock)
+ +## Description + +Encodes [Text][Text Property] to a specified [Format][Format Property]. + +## Examples + +### Text encoded to Base64 + +This example will encode the text `"The quick brown fox jumps over the lazy dog"` to `"VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw=="`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Format][Format Property] | `($)Format`, with value `"TextEncodingFormat.Base64"` | `($)Format` is a variable of type [TextEncodingFormat][] | + +#### Result + +Encoding `"The quick brown fox jumps over the lazy dog"` to the [Format][Format Property] [Base64][] will result in the variable `($)Text` being updated to the following: + +```json +"VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw==" +``` + +*** + +### Text encoded to Url + +This example will encode the text `"The quick brown fox jumps over the lazy dog!"` to `"The%20quick%20brown%20fox%20jumps%20over%20the%20lazy%20dog%21"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The%20quick%20brown%20fox%20jumps%20over%20the%20lazy%20dog%21"` | `($)Text` is a variable of type [String][] | +| [Format][Format Property] | `($)Format`, with value `"TextEncodingFormat.Url"` | `($)Format` is a variable of type [TextEncodingFormat][] + +#### Result + +Encoding `"The%20quick%20brown%20fox%20jumps%20over%20the%20lazy%20dog%21"` to the [Format][Format Property] [Url] will result in the variable `($)Text` being updated to the following: + +```json +"The%20quick%20brown%20fox%20jumps%20over%20the%20lazy%20dog%21" +``` + +*** + +### Text encoded to Hex + +This example will encode the text `"The quick brown fox jumps over the lazy dog"` to `"54686520717569636b2062726f776e20666f78206a756d7073206f76657220746865206c617a7920646f67"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Format][Format Property] | `($)Format`, with value `"TextEncodingFormat.Hex"` | `($)Format` is a variable of type [TextEncodingFormat][] | + +#### Result + +Encoding `"The quick brown fox jumps over the lazy dog"` to the [Format][Format Property] [Hex][] will result in the variable `($)Text` being updated to the following: + +```json +"54686520717569636b2062726f776e20666f78206a756d7073206f76657220746865206c617a7920646f67" +``` + +*** + +### Text encoded to Html + +This example will encode the text `"The quick brown fox jumps over the lazy dog!
"` to `"<p>The quick brown fox jumps over the lazy dog!</p>"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog!
"` | `($)Text` is a variable of type [String][] | +| [Format][Format Property] | `($)Format`, with value `"TextEncodingFormat.Html"` | `($)Format` is a variable of type [TextEncodingFormat][] | + +#### Result + +Encoding `"The quick brown fox jumps over the lazy dog!
"` to the [Format][Format Property] [Html][] will result in the variable `($)Text` being updated to the following: + +```json +"<p>The quick brown fox jumps over the lazy dog!</p>" +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to encode to the specified [Format][Format Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Format + +The [Format][Format Property] used to encode the given [Text][Text Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [TextEncodingFormat][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `Base64` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [ArgumentException][] | Thrown when the format is not one of the specified [Format][Format Property] types (e.g. `(TextEncodingFormat)10`). | + +## Remarks + +### Encoding to Base64 + +When encoding to [Base64][] a new line character is added every 76 characters. + +### Null or empty Text + +If [Text][Text Property] is `null` or empty (i.e. `""`), no operation is performed. + +### Round-Tripping + +It should be possible to pass the text created by a [Decode Text][] block to this block, and then pass the text created by this block back to an [Decode Text][] block; this is called round-tripping. + +### Immutable String data type + +The [String][] data type used to represent [Text][Text Property] is immutable, which means it is read-only and cannot be changed once created. + +To overcome this, this block creates a new [String][] which has the [Text][Text Property], encodes to [Format][Format Property] and re-assigns it to the variable specified in the [Text][Text Property] property. + +[Text Property]: {{< ref "#text" >}} +[Format Property]: {{< ref "#format" >}} +[Decode Text]: {{< url path="Cortex.Reference.Blocks.Text.DecodeText.DecodeText.MainDoc" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[TextEncodingFormat]: {{< url path="Cortex.Reference.DataTypes.Text.Encoding.TextEncodingFormat.MainDoc" >}} +[Html]: {{< url path="Cortex.Reference.DataTypes.Text.Encoding.TextEncodingFormat.Html" >}} +[Base64]: {{< url path="Cortex.Reference.DataTypes.Text.Encoding.TextEncodingFormat.Base64" >}} +[Hex]: {{< url path="Cortex.Reference.DataTypes.Text.Encoding.TextEncodingFormat.Hex" >}} +[Base64Url]: {{< url path="Cortex.Reference.DataTypes.Text.Encoding.TextEncodingFormat.Base64Url" >}} +[Url]: {{< url path="Cortex.Reference.DataTypes.Text.Encoding.TextEncodingFormat.Url" >}} + +[ArgumentException]: {{< url path="MSDocs.DotNet.Api.System.ArgumentException" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/find-and-remove-text/_index.md b/content/en/docs/2023.9/Reference/Blocks/Text/find-and-remove-text/_index.md new file mode 100644 index 000000000..f11296cc6 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/find-and-remove-text/_index.md @@ -0,0 +1,5 @@ +--- +title: "Find And Remove Text" +linkTitle: "Find And Remove Text" +description: "Find text in another text, and remove it." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/find-and-remove-text/find-and-remove-all-text-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/find-and-remove-text/find-and-remove-all-text-block.md new file mode 100644 index 000000000..0655ed4d0 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/find-and-remove-text/find-and-remove-all-text-block.md @@ -0,0 +1,249 @@ +--- +title: "Find And Remove All Text" +linkTitle: "Find And Remove All Text" +description: "Finds and removes all occurrences of text from a given text." +--- + +{{< figure src="/blocks/text-find-and-remove-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.FindAndRemoveText.FindAndRemoveAllTextBlock)
+ +## Description + +Finds and removes all occurrences of [Text To Remove][TextToRemove Property] from a given [Text][Text Property]. + +[Search Options][SearchOptions Property] can be specified to choose whether to use a ContainsText, PatternMatching or Regex search to find the [Text To Remove][TextToRemove Property]. + +## Examples + +### Remove all occurrences of Text To Remove (Ordinal) + +This example will find and remove all occurrences of `"The"` from `"The quick brown fox jumps over the lazy dog"`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Remove][TextToRemove Property] | `($)TextToRemove`, with value `"The"` | `($)TextToRemove` is a variable of type [String][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | + +#### Result + +As this example is performing a [case-sensitive, culture-insensitive][Ordinal] comparison of text, `"The quick brown fox jumps over the lazy dog"` only contains the text `"The"` once; `"the"` has a different case so does not match. Therefore, the variable `($)Text` will be updated to the following: + +```json +" quick brown fox jumps over the lazy dog" +``` + +*** + +### Remove all occurrences of Text To Remove (Ordinal Ignore Case) + +This example will find and remove all occurrences of `"The"` from `"The quick brown fox jumps over the lazy dog"`. + +It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Remove][TextToRemove Property] | `($)TextToRemove`, with value `"The"` | `($)TextToRemove` is a variable of type [String][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.OrdinalIgnoreCase` | `($)ComparisonType` is a variable of type [StringComparison][] | + +#### Result + +As this example is performing a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text, `"The quick brown fox jumps over the lazy dog"` contains the text `"The"` twice; the first occurrence is `"The"` and the second occurrence is `"the"`. Therefore, the variable `($)Text` will be updated to the following: + +```json +" quick brown fox jumps over lazy dog" +``` + +*** + +### Remove all occurrences that match the pattern in Text To Remove + +This example will find and remove all occurrences of text that match the pattern `"?he"` from `"The quick brown fox jumps over the lazy dog"`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Remove][TextToRemove Property] | `($)TextToRemove`, with value `"?he"` | `($)TextToRemove` is a variable of type [String][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.PatternMatching` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | + +#### Result + +`"The quick brown fox jumps over the lazy dog"` contains `"The"` and `"the"` that matches the pattern `"?he"`. Therefore, the variable `($)Text` will be updated to the following: + +```json +" quick brown fox jumps over lazy dog" +``` + +*** + +### Remove all occurrences that match the regex in Text To Remove + +This example will find and remove all occurrences of text that match the regex `"^The"` from `"The quick brown fox jumps over the lazy dog"`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Remove][TextToRemove Property] | `($)TextToRemove`, with value `"^The"` | `($)TextToRemove` is a variable of type [String][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | + +#### Result + +`"The quick brown fox jumps over the lazy dog"` contains `"The"` at the start of the sentence that matches the regex `"^The"`. Therefore, the variable `($)Text` will be updated to the following: + +```json +" quick brown fox jumps over the lazy dog" +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to find and remove all occurrences of [Text To Remove][TextToRemove Property] from. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Text To Remove + +The [Text To Remove][TextToRemove Property] all occurrences of, from [Text][Text Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | `$@""` | + +### Search Options + +[Search Options][SearchOptions Property] can be specified to choose whether [Text To Remove][TextToRemove Property] should be interpreted as a ContainsText, PatternMatching or Regex search: + +* `SearchOptions.ContainsText` matches text exactly; as long as the [Text][Text Property] contains the text specified in [Text To Remove][TextToRemove Property] it will be considered a match. +* `SearchOptions.PatternMatching` allows wildcard text matching using [Pattern Matching Syntax][]: + * `*` wildcard character can be used to match `0` or more characters. + * `?` wildcard character can be used to match `0` or `1` character. + * All other characters are treated as a literal character. +* `SearchOptions.Regex` allows regex text matching using [.Net Regex Syntax][Regex Syntax]. + +Please note that with `SearchOptions.ContainsText` overlapping matches are detected (e.g. searching for `"aa"` in `"aaa"` matches `"aa"` at index `0` and `"aa"` at index `1`). With `SearchOptions.Regex` only `"aa"` at index `0` will be matched. + +| | | +|--------------------|---------------------------| +| Data Type | [SearchOptions][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Literal][] | +| Default Value | `ContainsText` | + +### Comparison Type + +The [Comparison Type][ComparisonType Property] specifying the rules used to match occurrences of [Text To Remove][TextToRemove Property] in [Text][Text Property]. + +For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [StringComparison][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Literal][] | +| Default Value | `Ordinal` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [ArgumentException][] | Thrown when [Comparison Type][ComparisonType Property] is not one of the specified [StringComparison][] types (e.g. `(StringComparison)10`). | +| | Thrown when [Search Options][SearchOptions Property] is not one of the specified [SearchOptions][] types (e.g. `(SearchOptions)10`). | +| [RegexMatchTimeoutException][] | Thrown when [Search Options][SearchOptions Property] is either `SearchOptions.Regex` or `SearchOptions.PatternMatching` and the execution time of the search exceeds `30` seconds. | +| [RegexParsingFailedException][] | Thrown when [Search Options][SearchOptions Property] is `SearchOptions.Regex` and [Text To Remove][TextToRemove Property] is not a valid regex (e.g. `(`). | + +## Remarks + +### Comparison Types + +For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. + +### Null or empty Text + +If [Text][Text Property] is `null` or empty (i.e. `""`) there is nothing to remove from, so no operation is performed. + +### Null or empty Text To Remove + +If [Text To Remove][TextToRemove Property] is `null` or empty (i.e. `""`) there is nothing to remove, so no operation is performed. + +### Text To Remove is not present + +If [Text To Remove][TextToRemove Property] is not present there is nothing to remove, so no operation is performed. + +### Immutable String data type + +The [String][] data type used to represent [Text][Text Property] is immutable, which means it is read-only and cannot be changed once created. + +To overcome this, this block creates a new [String][] with all occurrences of [Text To Remove][TextToRemove Property] removed and re-assigns it to the variable specified in the [Text][Text Property] property. + +### Known Limitations + +If [Search Options][SearchOptions Property] is set to `SearchOptions.Regex` or `SearchOptions.PatternMatching` and [Comparison Type][ComparisonType Property] is set to `StringComparison.CurrentCulture`, some characters such as `æ` that is equivalent to `ae` may not evaluate as equal. + +[Text Property]: {{< ref "#text" >}} +[TextToRemove Property]: {{< ref "#text-to-remove" >}} +[SearchOptions Property]: {{< ref "#search-options" >}} +[ComparisonType Property]: {{< ref "#comparison-type" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.MainDoc" >}} +[ComparisonTypes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.MainDoc" >}} +[Ordinal]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.Ordinal" >}} +[OrdinalIgnoreCase]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.OrdinalIgnoreCase" >}} +[Pattern Matching Syntax]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.PatternMatchingSyntax.MainDoc" >}} +[Regex Syntax]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.RegexSyntax.MainDoc" >}} + +[RegexParsingFailedException]: {{< url path="Cortex.Reference.Exceptions.Text.Regex.RegexParsingFailedException.MainDoc" >}} + +[ArgumentException]: {{< url path="MSDocs.DotNet.Api.System.ArgumentException" >}} +[RegexMatchTimeoutException]: {{< url path="MSDocs.DotNet.Api.System.Text.RegularExpressions.RegexMatchTimeoutException" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[StringComparison]: {{< url path="Cortex.Reference.DataTypes.Text.StringComparison.MainDoc" >}} +[SearchOptions]: {{< url path="Cortex.Reference.DataTypes.Text.SearchOptions.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/find-and-remove-text/find-and-remove-text-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/find-and-remove-text/find-and-remove-text-block.md new file mode 100644 index 000000000..e32e6504e --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/find-and-remove-text/find-and-remove-text-block.md @@ -0,0 +1,282 @@ +--- +title: "Find And Remove Text" +linkTitle: "Find And Remove Text" +description: "Finds and removes the specified occurrence of text from a given text." +--- + +{{< figure src="/blocks/text-find-and-remove-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.FindAndRemoveText.FindAndRemoveTextBlock)
+ +## Description + +Finds and removes the specified [Occurrence][Occurrence Property] of [Text To Remove][TextToRemove Property] from a given [Text][Text Property]. + +[Search Options][SearchOptions Property] can be specified to choose whether to use a ContainsText, PatternMatching or Regex search to find the [Text To Remove][TextToRemove Property]. + +## Examples + +### Remove the first Occurrence of Text To Remove (Ordinal) + +This example will find and remove the first occurrence of `"The"` from `"The quick brown fox jumps over the lazy dog"`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Remove][TextToRemove Property] | `($)TextToRemove`, with value `"The"` | `($)TextToRemove` is a variable of type [String][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | + +#### Result + +An [Occurrence][Occurrence Property] of `1` means find and remove the first occurrence; `2` means second etc. + +As this example is performing a [case-sensitive, culture-insensitive][Ordinal] comparison of text, `"The quick brown fox jumps over the lazy dog"` only contains the text `"The"` once; `"the"` has a different case so does not match. Therefore, the variable `($)Text` will be updated to the following: + +```json +" quick brown fox jumps over the lazy dog" +``` + +*** + +### Remove the last Occurrence of Text To Remove (Ordinal Ignore Case) + +This example will find and remove the last occurrence of `"The"` from `"The quick brown fox jumps over the lazy dog"`. + +It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Remove][TextToRemove Property] | `($)TextToRemove`, with value `"The"` | `($)TextToRemove` is a variable of type [String][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `-1` | `($)Occurrence` is a variable of type [Int32][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.OrdinalIgnoreCase` | `($)ComparisonType` is a variable of type [StringComparison][] | + +#### Result + +An [Occurrence][Occurrence Property] of `-1`, means find and remove the last occurrence; `-2` means second last etc. + +As this example is performing a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text, `"The quick brown fox jumps over the lazy dog"` contains the text `"The"` twice; the first occurrence is `"The"` and the second and last occurrence is `"the"`. Therefore, the variable `($)Text` will be updated to the following: + +```json +"The quick brown fox jumps over lazy dog" +``` + +*** + +### Remove the first Occurrence matching the pattern in Text To Remove + +This example will find and remove the first occurrence of text matching the pattern `"?he"` from `"The quick brown fox jumps over the lazy dog"`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Remove][TextToRemove Property] | `($)TextToRemove`, with value `"?he"` | `($)TextToRemove` is a variable of type [String][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.PatternMatching` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | + +#### Result + +An [Occurrence][Occurrence Property] of `1` means find and remove the first occurrence; `2` means second etc. + +`"The quick brown fox jumps over the lazy dog"` contains two occurrences that match the pattern `"?he"`; the first occurrence is `"The"` and the second occurrence is `"the"`. Therefore, the variable `($)Text` will be updated to the following: + +```json +" quick brown fox jumps over the lazy dog" +``` + +*** + +### Remove the last Occurrence matching the regex in Text To Remove + +This example will find and remove the last occurrence of text matching the regex `"(fox|dog)"` from `"The quick brown fox jumps over the lazy dog"`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Remove][TextToRemove Property] | `($)TextToRemove`, with value `"(fox\|dog)"` | `($)TextToRemove` is a variable of type [String][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `-1` | `($)Occurrence` is a variable of type [Int32][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | + +#### Result + +An [Occurrence][Occurrence Property] of `-1`, means find and remove the last occurrence; `-2` means second last etc. + +`"The quick brown fox jumps over the lazy dog"` contains two occurrences that match the regex `"(fox|dog)"`; the first occurrence is `"fox"` and the second and last occurrence is `"dog"`. Therefore, the variable `($)Text` will be updated to the following: + +```json +"The quick brown fox jumps over the lazy " +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to find and remove the specified [Occurrence][Occurrence Property] of [Text To Remove][TextToRemove Property] from. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Text To Remove + +The [Text To Remove][TextToRemove Property] the specified [Occurrence][Occurrence Property] of, from [Text][Text Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | `$@""` | + +### Occurrence + +The [Occurrence][Occurrence Property] of [Text To Remove][TextToRemove Property] from [Text][Text Property]. + +For information about [supported values][Occurrences] for the [Occurrence][Occurrence Property] property and examples of how it can be used, please see [Occurrences][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `1` | + +### Search Options + +[Search Options][SearchOptions Property] can be specified to choose whether [Text To Remove][TextToRemove Property] should be interpreted as a ContainsText, PatternMatching or Regex search: + +* `SearchOptions.ContainsText` matches text exactly; as long as the [Text][Text Property] contains the text specified in [Text To Remove][TextToRemove Property] it will be considered a match. +* `SearchOptions.PatternMatching` allows wildcard text matching using [Pattern Matching Syntax][]: + * `*` wildcard character can be used to match `0` or more characters. + * `?` wildcard character can be used to match `0` or `1` character. + * All other characters are treated as a literal character. +* `SearchOptions.Regex` allows regex text matching using [.Net Regex Syntax][Regex Syntax]. + +Please note that with `SearchOptions.ContainsText` overlapping matches are detected (e.g. searching for `"aa"` in `"aaa"` matches `"aa"` at index `0` and `"aa"` at index `1`). With `SearchOptions.Regex` only `"aa"` at index `0` will be matched. + +| | | +|--------------------|---------------------------| +| Data Type | [SearchOptions][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Literal][] | +| Default Value | `ContainsText` | + +### Comparison Type + +The [Comparison Type][ComparisonType Property] specifying the rules used to match occurrences of [Text To Remove][TextToRemove Property] in [Text][Text Property]. + +For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [StringComparison][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Literal][] | +| Default Value | `Ordinal` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [ArgumentException][] | Thrown when [Comparison Type][ComparisonType Property] is not one of the specified [StringComparison][] types (e.g. `(StringComparison)10`). | +| | Thrown when [Search Options][SearchOptions Property] is not one of the specified [SearchOptions][] types (e.g. `(SearchOptions)10`). | +| [RegexMatchTimeoutException][] | Thrown when [Search Options][SearchOptions Property] is either `SearchOptions.Regex` or `SearchOptions.PatternMatching` and the execution time of the search exceeds `30` seconds. | +| [RegexParsingFailedException][] | Thrown when [Search Options][SearchOptions Property] is `SearchOptions.Regex` and [Text To Remove][TextToRemove Property] is not a valid regex (e.g. `(`). | + +## Remarks + +### Occurrences + +For information about [supported values][Occurrences] for the [Occurrence][Occurrence Property] property and examples of how it can be used, please see [Occurrences][]. + +### Comparison Types + +For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. + +### Null or empty Text + +If [Text][Text Property] is `null` or empty (i.e. `""`) there is nothing to remove from, so no operation is performed. + +### Null or empty Text To Remove + +If [Text To Remove][TextToRemove Property] is `null` or empty (i.e. `""`) there is nothing to remove, so no operation is performed. + +### Text To Remove or Occurrence is not present + +If [Text To Remove][TextToRemove Property] or the specified [Occurrence][Occurrence Property] is not present, there is nothing to remove, so no operation is performed. + +### Immutable String data type + +The [String][] data type used to represent [Text][Text Property] is immutable, which means it is read-only and cannot be changed once created. + +To overcome this, this block creates a new [String][] with the specified [Occurrence][Occurrence property] of [Text To Remove][TextToRemove Property] removed and re-assigns it to the variable specified in the [Text][Text Property] property. + +### Known Limitations + +If [Search Options][SearchOptions Property] is set to `SearchOptions.Regex` or `SearchOptions.PatternMatching` and [Comparison Type][ComparisonType Property] is set to `StringComparison.CurrentCulture`, some characters such as `æ` that is equivalent to `ae` may not evaluate as equal. + +[Text Property]: {{< ref "#text" >}} +[TextToRemove Property]: {{< ref "#text-to-remove" >}} +[Occurrence Property]: {{< ref "#occurrence" >}} +[SearchOptions Property]: {{< ref "#search-options" >}} +[ComparisonType Property]: {{< ref "#comparison-type" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Occurrences]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Occurrences.MainDoc" >}} +[Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.MainDoc" >}} +[ComparisonTypes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.MainDoc" >}} +[Ordinal]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.Ordinal" >}} +[OrdinalIgnoreCase]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.OrdinalIgnoreCase" >}} +[Pattern Matching Syntax]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.PatternMatchingSyntax.MainDoc" >}} +[Regex Syntax]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.RegexSyntax.MainDoc" >}} + +[RegexParsingFailedException]: {{< url path="Cortex.Reference.Exceptions.Text.Regex.RegexParsingFailedException.MainDoc" >}} + +[ArgumentException]: {{< url path="MSDocs.DotNet.Api.System.ArgumentException" >}} +[RegexMatchTimeoutException]: {{< url path="MSDocs.DotNet.Api.System.Text.RegularExpressions.RegexMatchTimeoutException" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} +[StringComparison]: {{< url path="Cortex.Reference.DataTypes.Text.StringComparison.MainDoc" >}} +[SearchOptions]: {{< url path="Cortex.Reference.DataTypes.Text.SearchOptions.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/find-and-replace-text/_index.md b/content/en/docs/2023.9/Reference/Blocks/Text/find-and-replace-text/_index.md new file mode 100644 index 000000000..f9038379b --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/find-and-replace-text/_index.md @@ -0,0 +1,5 @@ +--- +title: "Find And Replace Text" +linkTitle: "Find And Replace Text" +description: "Find text in another text, and replace it." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/find-and-replace-text/find-and-replace-all-text-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/find-and-replace-text/find-and-replace-all-text-block.md new file mode 100644 index 000000000..f1cd97e76 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/find-and-replace-text/find-and-replace-all-text-block.md @@ -0,0 +1,270 @@ +--- +title: "Find And Replace All Text" +linkTitle: "Find And Replace All Text" +description: "Finds and replaces all occurrences of text in a given text." +--- + +{{< figure src="/blocks/text-find-and-replace-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.FindAndReplaceText.FindAndReplaceAllTextBlock)
+ +## Description + +Finds and replaces all occurrences of [Text To Replace][TextToReplace Property] with the specified [Replacement Text][ReplacementText Property] in a given [Text][Text Property]. + +[Search Options][SearchOptions Property] can be specified to choose whether to use a ContainsText, PatternMatching or Regex search to find the [Text To Replace][TextToReplace Property]. + +## Examples + +### Replace all occurrences of Text To Replace (Ordinal) + +This example will find and replace all occurrences of `"The"` in `"The quick brown fox jumps over the lazy dog"` with `"a"`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Replace][TextToReplace Property] | `($)TextToReplace`, with value `"The"` | `($)TextToReplace` is a variable of type [String][] | +| [Replacement Text][ReplacementText Property] | `($)ReplacementText`, with value `"a"` | `($)ReplacementText` is a variable of type [String][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | + +#### Result + +As this example is performing a [case-sensitive, culture-insensitive][Ordinal] comparison of text, `"The quick brown fox jumps over the lazy dog"` only contains the text `"The"` once; `"the"` has a different case so does not match. Therefore, the variable `($)Text` will be updated to the following: + +```json +"a quick brown fox jumps over the lazy dog" +``` + +*** + +### Replace all occurrences of Text To Replace (Ordinal Ignore Case) + +This example will find and replace all occurrences of `"The"` in `"The quick brown fox jumps over the lazy dog"` with `"a"`. + +It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Replace][TextToReplace Property] | `($)TextToReplace`, with value `"The"` | `($)TextToReplace` is a variable of type [String][] | +| [Replacement Text][ReplacementText Property] | `($)ReplacementText`, with value `"a"` | `($)ReplacementText` is a variable of type [String][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.OrdinalIgnoreCase` | `($)ComparisonType` is a variable of type [StringComparison][] | + +#### Result + +As this example is performing a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text, `"The quick brown fox jumps over the lazy dog"` contains the text `"The"` twice; the first occurrence is `"The"` and the second occurrence is `"the"`. Therefore, the variable `($)Text` will be updated to the following: + +```json +"a quick brown fox jumps over a lazy dog" +``` + +*** + +### Replace all occurrences that match the pattern in Text To Replace + +This example will find and replace all occurrences of text that match the pattern `"?he"` from `"The quick brown fox jumps over the lazy dog"` with `"a"`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Replace][TextToReplace Property] | `($)TextToReplace`, with value `"?he"` | `($)TextToReplace` is a variable of type [String][] | +| [Replacement Text][ReplacementText Property] | `($)ReplacementText`, with value `"a"` | `($)ReplacementText` is a variable of type [String][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.PatternMatching` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | + +#### Result + +`"The quick brown fox jumps over the lazy dog"` contains `"The"` and `"the"` that matches the pattern `"?he"`. Therefore, the variable `($)Text` will be updated to the following: + +```json +"a quick brown fox jumps over a lazy dog" +``` + +*** + +### Replace all occurrences that match the regex in Text To Replace + +This example will find and replace all occurrences of text that match the regex `"^The"` from `"The quick brown fox jumps over the lazy dog"` with `"a"`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Replace][TextToReplace Property] | `($)TextToReplace`, with value `"^The"` | `($)TextToReplace` is a variable of type [String][] | +| [Replacement Text][ReplacementText Property] | `($)ReplacementText`, with value `"a"` | `($)ReplacementText` is a variable of type [String][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | + +#### Result + +`"The quick brown fox jumps over the lazy dog"` contains `"The"` at the start of the sentence that matches the regex `"^The"`. Therefore, the variable `($)Text` will be updated to the following: + +```json +"a quick brown fox jumps over the lazy dog" +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to find and replace all occurrences of [Text To Replace][TextToReplace Property] in. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Text To Replace + +The [Text To Replace][TextToReplace Property] all occurrences with [Replacement Text][ReplacementText Property] in [Text][Text Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | `$@""` | + +### Replacement Text + +The [Replacement Text][ReplacementText Property] used to replace all occurrences of [Text To Replace][TextToReplace Property] in [Text][Text Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | `$@""` | + +### Search Options + +[Search Options][SearchOptions Property] can be specified to choose whether [Text To Replace][TextToReplace Property] should be interpreted as a ContainsText, PatternMatching or Regex search: + +* `SearchOptions.ContainsText` matches text exactly; as long as the [Text][Text Property] contains the text specified in [Text To Replace][TextToReplace Property] it will be considered a match. +* `SearchOptions.PatternMatching` allows wildcard text matching using [Pattern Matching Syntax][]: + * `*` wildcard character can be used to match `0` or more characters. + * `?` wildcard character can be used to match `0` or `1` character. + * All other characters are treated as a literal character. +* `SearchOptions.Regex` allows regex text matching using [.Net Regex Syntax][Regex Syntax]. + +Please note that with `SearchOptions.ContainsText` overlapping matches are detected (e.g. searching for `"aa"` in `"aaa"` matches `"aa"` at index `0` and `"aa"` at index `1`). With `SearchOptions.Regex` only `"aa"` at index `0` will be matched. + +| | | +|--------------------|---------------------------| +| Data Type | [SearchOptions][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Literal][] | +| Default Value | `ContainsText` | + +### Comparison Type + +The [Comparison Type][ComparisonType Property] specifying the rules used to match occurrences of [Text To Replace][TextToReplace Property] in [Text][Text Property]. + +For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [StringComparison][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Literal][] | +| Default Value | `Ordinal` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [ArgumentException][] | Thrown when [Comparison Type][ComparisonType Property] is not one of the specified [StringComparison][] types (e.g. `(StringComparison)10`). | +| | Thrown when [Search Options][SearchOptions Property] is not one of the specified [SearchOptions][] types (e.g. `(SearchOptions)10`). | +| [RegexMatchTimeoutException][] | Thrown when [Search Options][SearchOptions Property] is either `SearchOptions.Regex` or `SearchOptions.PatternMatching` and the execution time of the search exceeds `30` seconds. | +| [RegexParsingFailedException][] | Thrown when [Search Options][SearchOptions Property] is `SearchOptions.Regex` and [Text To Replace][TextToReplace Property] is not a valid regex (e.g. `(`). | + +## Remarks + +### Comparison Types + +For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. + +### Null or empty Text + +If [Text][Text Property] is `null` or empty (i.e. `""`) there is nothing to replace in, so no operation is performed. + +### Null or empty Text To Replace + +If [Text To Replace][TextToReplace Property] is `null` or empty (i.e. `""`) there is nothing to replace, so no operation is performed. + +### Null or empty Replacement Text + +If [Replacement Text][ReplacementText Property] is `null` or empty (i.e. `""`) all occurrences of [Text To Replace][TextToReplace Property] are replaced with an empty text (i.e. `""`). + +### Text To Replace is not present + +If [Text To Replace][TextToReplace Property] is not present there is nothing to replace, so no operation is performed. + +### Immutable String data type + +The [String][] data type used to represent [Text][Text Property] is immutable, which means it is read-only and cannot be changed once created. + +To overcome this, this block creates a new [String][] with all occurrences of [Text To Replace][TextToReplace Property] replaced and re-assigns it to the variable specified in the [Text][Text Property] property. + +### Known Limitations + +If [Search Options][SearchOptions Property] is set to `SearchOptions.Regex` or `SearchOptions.PatternMatching` and [Comparison Type][ComparisonType Property] is set to `StringComparison.CurrentCulture`, some characters such as `æ` that is equivalent to `ae` may not evaluate as equal. + +[Text Property]: {{< ref "#text" >}} +[TextToReplace Property]: {{< ref "#text-to-replace" >}} +[ReplacementText Property]: {{< ref "#replacement-text" >}} +[SearchOptions Property]: {{< ref "#search-options" >}} +[ComparisonType Property]: {{< ref "#comparison-type" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.MainDoc" >}} +[ComparisonTypes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.MainDoc" >}} +[Ordinal]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.Ordinal" >}} +[OrdinalIgnoreCase]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.OrdinalIgnoreCase" >}} +[Pattern Matching Syntax]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.PatternMatchingSyntax.MainDoc" >}} +[Regex Syntax]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.RegexSyntax.MainDoc" >}} + +[RegexParsingFailedException]: {{< url path="Cortex.Reference.Exceptions.Text.Regex.RegexParsingFailedException.MainDoc" >}} + +[ArgumentException]: {{< url path="MSDocs.DotNet.Api.System.ArgumentException" >}} +[RegexMatchTimeoutException]: {{< url path="MSDocs.DotNet.Api.System.Text.RegularExpressions.RegexMatchTimeoutException" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[StringComparison]: {{< url path="Cortex.Reference.DataTypes.Text.StringComparison.MainDoc" >}} +[SearchOptions]: {{< url path="Cortex.Reference.DataTypes.Text.SearchOptions.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/find-and-replace-text/find-and-replace-text-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/find-and-replace-text/find-and-replace-text-block.md new file mode 100644 index 000000000..d9f559362 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/find-and-replace-text/find-and-replace-text-block.md @@ -0,0 +1,303 @@ +--- +title: "Find And Replace Text" +linkTitle: "Find And Replace Text" +description: "Finds and replaces the specified occurrence of text in a given text." +--- + +{{< figure src="/blocks/text-find-and-replace-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.FindAndReplaceText.FindAndReplaceTextBlock)
+ +## Description + +Finds and replaces the specified [Occurrence][Occurrence Property] of [Text To Replace][TextToReplace Property] with the specified [Replacement Text][ReplacementText Property] in a given [Text][Text Property]. + +[Search Options][SearchOptions Property] can be specified to choose whether to use a ContainsText, PatternMatching or Regex search to find the [Text To Replace][TextToReplace Property]. + +## Examples + +### Replace the first Occurrence of Text To Replace (Ordinal) + +This example will find and replace the first occurrence of `"The"` in `"The quick brown fox jumps over the lazy dog"` with `"a"`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Replace][TextToReplace Property] | `($)TextToReplace`, with value `"The"` | `($)TextToReplace` is a variable of type [String][] | +| [Replacement Text][ReplacementText Property] | `($)ReplacementText`, with value `"a"` | `($)ReplacementText` is a variable of type [String][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | + +#### Result + +An [Occurrence][Occurrence Property] of `1` means find and replace the first occurrence; `2` means second etc. + +As this example is performing a [case-sensitive, culture-insensitive][Ordinal] comparison of text, `"The quick brown fox jumps over the lazy dog"` only contains the text `"The"` once; `"the"` has a different case so does not match. Therefore, the variable `($)Text` will be updated to the following: + +```json +"a quick brown fox jumps over the lazy dog" +``` + +*** + +### Replace the last occurrence of Text To Replace (Ordinal Ignore Case) + +This example will find and replace the last occurrence of `"The"` in `"The quick brown fox jumps over the lazy dog"` with `"a"`. + +It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Replace][TextToReplace Property] | `($)TextToReplace`, with value `"The"` | `($)TextToReplace` is a variable of type [String][] | +| [Replacement Text][ReplacementText Property] | `($)ReplacementText`, with value `"a"` | `($)ReplacementText` is a variable of type [String][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `-1` | `($)Occurrence` is a variable of type [Int32][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.OrdinalIgnoreCase` | `($)ComparisonType` is a variable of type [StringComparison][] | + +#### Result + +An [Occurrence][Occurrence Property] of `-1`, means find and replace the last occurrence; `-2` means second last etc. + +As this example is performing a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text, `"The quick brown fox jumps over the lazy dog"` contains the text `"The"` twice; the first occurrence is `"The"` and the second and last occurrence is `"the"`. Therefore, the variable `($)Text` will be updated to the following: + +```json +"The quick brown fox jumps over a lazy dog" +``` + +*** + +### Replace the first Occurrence matching the pattern in Text To Replace + +This example will find and replace the first occurrence of text matching the pattern `"?he"` from `"The quick brown fox jumps over the lazy dog"` with `"a"`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Replace][TextToReplace Property] | `($)TextToReplace`, with value `"?he"` | `($)TextToReplace` is a variable of type [String][] | +| [Replacement Text][ReplacementText Property] | `($)ReplacementText`, with value `"a"` | `($)ReplacementText` is a variable of type [String][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.PatternMatching` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | + +#### Result + +An [Occurrence][Occurrence Property] of `1` means find and replace the first occurrence; `2` means second etc. + +`"The quick brown fox jumps over the lazy dog"` contains two occurrences that match the pattern `"?he"`; the first occurrence is `"The"` and the second occurrence is `"the"`. Therefore, the variable `($)Text` will be updated to the following: + +```json +"a quick brown fox jumps over the lazy dog" +``` + +*** + +### Replace the last Occurrence matching the regex in Text To Replace + +This example will find and replace the last occurrence of text matching the regex `"(fox|dog)"` from `"The quick brown fox jumps over the lazy dog"` with `"cat"`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Replace][TextToReplace Property] | `($)TextToReplace`, with value `"(fox\|dog)"` | `($)TextToReplace` is a variable of type [String][] | +| [Replacement Text][ReplacementText Property] | `($)ReplacementText`, with value `"cat"` | `($)ReplacementText` is a variable of type [String][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `-1` | `($)Occurrence` is a variable of type [Int32][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | + +#### Result + +An [Occurrence][Occurrence Property] of `-1`, means find and replace the last occurrence; `-2` means second last etc. + +`"The quick brown fox jumps over the lazy dog"` contains two occurrences that match the regex `"(fox|dog)"`; the first occurrence is `"fox"` and the second and last occurrence is `"dog"`. Therefore, the variable `($)Text` will be updated to the following: + +```json +"The quick brown fox jumps over the lazy cat" +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to find and replace the specified [Occurrence][Occurrence Property] of [Text To Replace][TextToReplace Property] in. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Text To Replace + +The [Text To Replace][TextToReplace Property] the specified [Occurrence][Occurrence Property] with [Replacement Text][ReplacementText Property] in [Text][Text Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | `$@""` | + +### Replacement Text + +The [Replacement Text][ReplacementText Property] used to replace the specified [Occurrence][Occurrence Property] of [Text To Replace][TextToReplace Property] in [Text][Text Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | `$@""` | + +### Occurrence + +The [Occurrence][Occurrence Property] of [Text To Replace][TextToReplace Property] in [Text][Text Property]. + +For information about [supported values][Occurrences] for the [Occurrence][Occurrence Property] property and examples of how it can be used, please see [Occurrences][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `1` | + +### Search Options + +[Search Options][SearchOptions Property] can be specified to choose whether [Text To Replace][TextToReplace Property] should be interpreted as a ContainsText, PatternMatching or Regex search: + +* `SearchOptions.ContainsText` matches text exactly; as long as the [Text][Text Property] contains the text specified in [Text To Replace][TextToReplace Property] it will be considered a match. +* `SearchOptions.PatternMatching` allows wildcard text matching using [Pattern Matching Syntax][]: + * `*` wildcard character can be used to match `0` or more characters. + * `?` wildcard character can be used to match `0` or `1` character. + * All other characters are treated as a literal character. +* `SearchOptions.Regex` allows regex text matching using [.Net Regex Syntax][Regex Syntax]. + +Please note that with `SearchOptions.ContainsText` overlapping matches are detected (e.g. searching for `"aa"` in `"aaa"` matches `"aa"` at index `0` and `"aa"` at index `1`). With `SearchOptions.Regex` only `"aa"` at index `0` will be matched. + +| | | +|--------------------|---------------------------| +| Data Type | [SearchOptions][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Literal][] | +| Default Value | `ContainsText` | + +### Comparison Type + +The [Comparison Type][ComparisonType Property] specifying the rules used to match occurrences of [Text To Replace][TextToReplace Property] in [Text][Text Property]. + +For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [StringComparison][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Literal][] | +| Default Value | `Ordinal` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [ArgumentException][] | Thrown when [Comparison Type][ComparisonType Property] is not one of the specified [StringComparison][] types (e.g. `(StringComparison)10`). | +| | Thrown when [Search Options][SearchOptions Property] is not one of the specified [SearchOptions][] types (e.g. `(SearchOptions)10`). | +| [RegexMatchTimeoutException][] | Thrown when [Search Options][SearchOptions Property] is either `SearchOptions.Regex` or `SearchOptions.PatternMatching` and the execution time of the search exceeds `30` seconds. | +| [RegexParsingFailedException][] | Thrown when [Search Options][SearchOptions Property] is `SearchOptions.Regex` and [Text To Replace][TextToReplace Property] is not a valid regex (e.g. `(`). | + +## Remarks + +### Occurrences + +For information about [supported values][Occurrences] for the [Occurrence][Occurrence Property] property and examples of how it can be used, please see [Occurrences][]. + +### Comparison Types + +For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. + +### Null or empty Text + +If [Text][Text Property] is `null` or empty (i.e. `""`) there is nothing to replace in, so no operation is performed. + +### Null or empty Text To Replace + +If [Text To Replace][TextToReplace Property] is `null` or empty (i.e. `""`) there is nothing to replace, so no operation is performed. + +### Null or empty Replacement Text + +If [Replacement Text][ReplacementText Property] is `null` or empty (i.e. `""`) the specified [Occurrence][Occurrence Property] of [Text To Replace][TextToReplace Property] is replaced with an empty text (i.e. `""`). + +### Text To Replace or Occurrence is not present + +If [Text To Replace][TextToReplace Property] or the specified [Occurrence][Occurrence Property] is not present there is nothing to replace, so no operation is performed. + +### Immutable String data type + +The [String][] data type used to represent [Text][Text Property] is immutable, which means it is read-only and cannot be changed once created. + +To overcome this, this block creates a new [String][] with the specified [Occurrence][Occurrence property] of [Text To Replace][TextToReplace Property] replaced and re-assigns it to the variable specified in the [Text][Text Property] property. + +### Known Limitations + +If [Search Options][SearchOptions Property] is set to `SearchOptions.Regex` or `SearchOptions.PatternMatching` and [Comparison Type][ComparisonType Property] is set to `StringComparison.CurrentCulture`, some characters such as `æ` that is equivalent to `ae` may not evaluate as equal. + +[Text Property]: {{< ref "#text" >}} +[TextToReplace Property]: {{< ref "#text-to-replace" >}} +[ReplacementText Property]: {{< ref "#replacement-text" >}} +[Occurrence Property]: {{< ref "#occurrence" >}} +[SearchOptions Property]: {{< ref "#search-options" >}} +[ComparisonType Property]: {{< ref "#comparison-type" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Occurrences]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Occurrences.MainDoc" >}} +[Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.MainDoc" >}} +[ComparisonTypes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.MainDoc" >}} +[Ordinal]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.Ordinal" >}} +[OrdinalIgnoreCase]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.OrdinalIgnoreCase" >}} +[Pattern Matching Syntax]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.PatternMatchingSyntax.MainDoc" >}} +[Regex Syntax]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.RegexSyntax.MainDoc" >}} + +[RegexParsingFailedException]: {{< url path="Cortex.Reference.Exceptions.Text.Regex.RegexParsingFailedException.MainDoc" >}} + +[ArgumentException]: {{< url path="MSDocs.DotNet.Api.System.ArgumentException" >}} +[RegexMatchTimeoutException]: {{< url path="MSDocs.DotNet.Api.System.Text.RegularExpressions.RegexMatchTimeoutException" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} +[StringComparison]: {{< url path="Cortex.Reference.DataTypes.Text.StringComparison.MainDoc" >}} +[SearchOptions]: {{< url path="Cortex.Reference.DataTypes.Text.SearchOptions.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/format-text/_index.md b/content/en/docs/2023.9/Reference/Blocks/Text/format-text/_index.md new file mode 100644 index 000000000..3510eb0bb --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/format-text/_index.md @@ -0,0 +1,5 @@ +--- +title: "Format Text" +linkTitle: "Format Text" +description: "Format text containing format parameters (i.e. {0}) by replacing them with other values." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/format-text/format-text-with-value-block-1.md b/content/en/docs/2023.9/Reference/Blocks/Text/format-text/format-text-with-value-block-1.md new file mode 100644 index 000000000..4b5974851 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/format-text/format-text-with-value-block-1.md @@ -0,0 +1,186 @@ +--- +title: "Format Text With Value" +linkTitle: "Format Text With Value" +description: "Formats text by replacing all `{0}` format parameters in a specified format template with a given value." +--- + +{{< figure src="/blocks/text-format-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.FormatText.FormatTextWithValueBlock`1)
+ +## Description + +Replaces all `{0}` format parameters in the specified [Format Template][FormatTemplate Property] with the given [Value][Value Property], saving the result as [Text][Text Property]. + +An additional [Format Provider][FormatProvider Property] option can be specified to define the cultural rules used to control the formatting (e.g. `new CultureInfo("en-US")` will apply American English rules to the formatting). + +## Examples + +### Text Value + +This example will format `"Hello {0}"` with `"world!"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Format Template][FormatTemplate Property] | `($)FormatTemplate`, with value `"Hello {0}"` | `($)FormatTemplate` is a variable of type [String][] | +| [Value][Value Property] | `($)Value`, with value `"world!"` | `($)Value` is a variable of type [String][] | +| [Format Provider][FormatProvider Property] | `($)FormatProvider`, with value `null` | `($)FormatProvider` is a variable of type [IFormatProvider][] | +| [Text][Text Property] | `($)Text`, with no value | `($)Text` is a variable that will be set to a [String][] value | + +#### Result + +Formatting `"Hello {0}"` with `"world!"` results in the variable `($)Text` being updated to the following: + +```json +"Hello world!" +``` + +*** + +### Double Value using American English ("en-US") + +This example will format `"Your final bill is {0:C2}"` with `99.99`. + +The format parameter `{0:C2}` will display the double value as U.S currency to two decimal places (i.e. `$99.99`): + +* `0` - is replaced by the double value. +* `C` - indicates to include the currency symbol for the specified culture (i.e. `$`). +* `2` - indicates the number of decimal places to format the double value to. + +For information about format templates and parameters, please see [Text Formatting][]. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Format Template][FormatTemplate Property] | `($)FormatTemplate`, with value `"Your final bill is {0:C2}"` | `($)FormatTemplate` is a variable of type [String][] | +| [Value][Value Property] | `($)Value`, with value `99.99` | `($)Value` is a variable of type [Double][] | +| [Format Provider][FormatProvider Property] | `($)FormatProvider`, with value `new CultureInfo("en-US")` | `($)FormatProvider` is a variable of type [IFormatProvider][] | +| [Text][Text Property] | `($)Text`, with no value | `($)Text` is a variable that will be set to a [String][] value | + +#### Result + +Formatting `"Your final bill is {0:C2}"` with `99.99` results in the variable `($)Text` being updated to the following: + +```json +"Your final bill is $99.99" +``` + +*** + +## Properties + +### Format Template + +[Format Template][FormatTemplate Property] can be specified to define the format of the resultant [Text][Text Property]. + +All `{0}` format parameters in [Format Template][FormatTemplate Property] will be replaced with [Value][Value Property]. + +If [Format Template][FormatTemplate Property] is not specified, `null` or empty (i.e. `""`), or does not contain any `{0}` format parameters, nothing is replaced; [Text][Text Property] will be set to the value of [Format Template][FormatTemplate Property]. + +For information about format templates and parameters, please see [Text Formatting][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | `@"{0}"` | + +### Value + +The [Value][Value Property] to replace all `{0}` format parameters with. + +[Value][Value Property] does not have to be text, it can be any data type. Any non-text value will be converted to its text representation when it is replaced. + +For information about how types are converted to their text representation please see [Converting Objects To Text][]. + +| | | +|--------------------|---------------------------| +| Data Type | [TValue][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | No value (defaults to `null`) | + +### Format Provider + +[Format Provider][FormatProvider Property] can be specified to define the cultural rules used to control the formatting (e.g. `new CultureInfo("en-US")` will apply American English rules to the formatting.). + +If [Format Provider][FormatProvider Property] is not specified or `null`, `CultureInfo.InvariantCulture` will be used; `CultureInfo.InvariantCulture` is associated with the English language but not with any country/region. For more information, please see [Invariant Culture rules][]. + +| | | +|--------------------|---------------------------| +| Data Type | [IFormatProvider][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Expression][] | +| Default Value | `CultureInfo.InvariantCulture` | + +### Text + +The formatted [Text][Text Property] that results from replacing all `{0}` format parameters in [Format Template][FormatTemplate Property] with [Value][Value Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [FormatException][] | Thrown when [Format Template][FormatTemplate Property] contains a format parameter not equal to zero (e.g. `"Hello {1}"`). | +| | Thrown when [Format Template][FormatTemplate Property] contains a format parameter that is invalid or not well-formed (e.g. `"Cost is {0:Q2}`, as `"Q"` is not a [valid format parameter][]). | + +## Remarks + +### Text Formatting + +Please note that changes to operating system settings, could result in some of the examples above displaying different results. + +For information about format templates and parameters, please see [Text Formatting][]. + +### Null or Empty Format Template + +If [Format Template][FormatTemplate Property] is not specified, `null` or empty (i.e. `""`), or does not contain any `{0}` format parameters, nothing is replaced; [Text][Text Property] will be set to the value of [Format Template][FormatTemplate Property]. + +### Null Format Provider + +If [Format Provider][FormatProvider Property] is not specified or `null`, `CultureInfo.InvariantCulture` will be used; `CultureInfo.InvariantCulture` is associated with the English language but not with any country/region. For more information, please see [Invariant Culture rules][]. + +[FormatTemplate Property]: {{< ref "#format-template" >}} +[Value Property]: {{< ref "#value" >}} +[FormatProvider Property]: {{< ref "#format-provider" >}} +[Text Property]: {{< ref "#text" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[FormatException]: {{< url path="MSDocs.DotNet.Api.System.FormatException" >}} + +[Converting Objects To Text]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.ConvertingObjectsToText.MainDoc" >}} +[Invariant Culture rules]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Culture.InvariantCulture.MainDoc" >}} +[Text Formatting]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Formatting.MainDoc" >}} +[Valid Format Parameter]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Formatting.FormatTemplates" >}} + +[TValue]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Double]: {{< url path="Cortex.Reference.DataTypes.Numbers.Double.MainDoc" >}} +[IFormatProvider]: {{< url path="Cortex.Reference.DataTypes.Text.IFormatProvider.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/format-text/format-text-with-values-block-1.md b/content/en/docs/2023.9/Reference/Blocks/Text/format-text/format-text-with-values-block-1.md new file mode 100644 index 000000000..25aa73ddd --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/format-text/format-text-with-values-block-1.md @@ -0,0 +1,209 @@ +--- +title: "Format Text With Values" +linkTitle: "Format Text With Values" +description: "Formats text by replacing all format parameters (e.g. `{0}` or `{1}` or `{2}`) in a specified format template with given values." +--- + +{{< figure src="/blocks/text-format-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.FormatText.FormatTextWithValuesBlock`1)
+ +## Description + +Replaces all format parameters (e.g. `{0}` or `{1}` or `{2}`) in the given [Format Template][FormatTemplate Property] with the specified [Values][Values Property], saving the result as [Text][Text Property]. + +An additional [Format Provider][FormatProvider Property] option can be specified to define the cultural rules used to control the formatting (e.g. `new CultureInfo("en-US")` will apply American English rules to the formatting). + +## Examples + +### Text Values + +This example will format `"Hello {0} {1}"` with `["Mr", "Smith"]`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Format Template][FormatTemplate Property] | `($)FormatTemplate`, with value `"Hello {0} {1}"` | `($)FormatTemplate` is a variable of type [String][] | +| [Values][Values Property] | `($)Values`, with value `["Mr", "Smith"]` | `($)Values` is a variable of type [IEnumerable][]<[String][]> | +| [Format Provider][FormatProvider Property] | `($)FormatProvider`, with value `null` | `($)FormatProvider` is a variable of type [IFormatProvider][] | +| [Text][Text Property] | `($)Text`, with no value | `($)Text` is a variable that will be set to a [String][] value | + +#### Result + +Formatting `"Hello {0} {1}"` with `["Mr", "Smith"]` results in the variable `($)Text` being updated to the following: + +```json +"Hello Mr Smith" +``` + +*** + +### Multiple non-text values using American English ("en-US") + +This example will format `"Your latest payment of {0:C2} has been received. You have paid {1:P0} of your total and have {2:C2} outstanding."` with `[99.99, 0.8, 40]`. + +The format parameter `{0:C2}` will display the `99.99` as U.S currency to two decimal places (i.e. `$99.99`): + +* `0` - is replaced by the double value `99.99`. +* `C` - indicates to include the currency symbol for the specified culture (i.e. `$`). +* `2` - indicates to format the double value to two decimal places. + +The format parameter `{1:P0}` will display the `0.8` as a percentage to zero decimal places (i.e. `80 %`): + +* `1` - is replaced by the double value `0.8`. +* `P` - indicates the value should be formatted as a percentage. +* `0` - indicates to format the percentage value to zero decimal places. + +The format parameter `{2:C2}` will display the `40` as U.S currency to two decimal places (i.e. `$40.00`): + +* `2` - is replaced by the double value `40`. +* `C` - indicates to include the currency symbol for the specified culture (i.e. `$`). +* `2` - indicates to format the double value to two decimal places. + +For information about format templates and parameters, please see [Text Formatting][]. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Format Template][FormatTemplate Property] | `($)FormatTemplate`, with value `"Your latest payment of {0:C2} has been received. You have paid {1:P0} of your total and have {2:C2} outstanding."` | `($)FormatTemplate` is a variable of type [String][] | +| [Values][Values Property] | `($)Values`, with value `[99.99, 0.8, 40]` | `($)Values` is a variable of type [IEnumerable][]<[Double][]> | +| [Format Provider][FormatProvider Property] | `($)FormatProvider`, with value `new CultureInfo("en-US")` | `($)FormatProvider` is a variable of type [IFormatProvider][] | +| [Text][Text Property] | `($)Text`, with no value | `($)Text` is a variable that will be set to a [String][] value | + +#### Result + +`"Your latest payment of {0:C2} has been received. You have paid {1:P0} of your total and have {2:C2} outstanding."` with `[99.99, 0.8, 40]` results in the variable `($)Text` being updated to the following: + +```json +"Your latest payment of $99.99 has been received. You have paid 80 % of your total and have $40.00 outstanding." +``` + +*** + +## Properties + +### Format Template + +[Format Template][FormatTemplate Property] can be specified to define the format of the resultant [Text][Text Property]. + +All format parameters (e.g. `{0}` or `{1}` or `{2}`) in [Format Template][FormatTemplate Property] will be replaced with the corresponding value in [Values][Values Property]. Format parameter `{0}` will be replaced with the first value in [Values][Values Property]; `{1}` will be replaced with the second value in [Values][Values Property] etc. + +The number of unique format parameters must be equal to or less than the number of items in [Values][Values Property]. + +The index of each format parameter must be equal to or less than the number of items in [Values][Values Property] - `1`. + +If [Format Template][FormatTemplate Property] is not specified, `null` or empty (i.e. `""`), or does not contain any format parameters, nothing is replaced; [Text][Text Property] will be set to the value of [Format Template][FormatTemplate Property]. + +For information about format templates and parameters, please see [Text Formatting][]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | `@"{0} {1}"` | + +### Values + +The [Values][Values Property] to replace all format parameters with. + +If a value does not have a corresponding format parameter, it is ignored. + +[Values][Values Property] does not have to contain all text values, it can contain any data types. Any non-text values will be converted to their text representation when they are replaced. + +If any value is `null` or empty (i.e. `""`), an empty text (i.e. `""`) will replace the corresponding format parameter. + +For information about how types are converted to their text representation please see [Converting Objects To Text][]. + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[TValue][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | `new List(Cortex.Blocks.Text.GetText.GetTextAtBeginningBlock)
+ +## Description + +Gets a [Length][Length Property] of [text][TextAtBeginning Property] from the beginning of a given [Text][Text Property]. + +## Examples + +### Get a Length of text from the beginning of a given Text + +This example will get the first `3` characters from the beginning of `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` | `($)Text` is a variable of type [String][] | +| [Length][Length Property] | `($)Length`, with value `3` | `($)Length` is a variable of type [Int32][] | +| [Text At Beginning][TextAtBeginning Property] | `($)TextAtBeginning`, with no value | `($)TextAtBeginning` is a variable that will be set to a [String][] | + +#### Result + +Getting the first `3` characters from the beginning of `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` results in the variable `($)TextAtBeginning` being updated to the following: + +```json +"ABC" +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to get the [Text At Beginning][TextAtBeginning Property] from. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Length + +The [Length][Length Property] of text to get. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `-1` | + +### Text At Beginning + +The [Length][Length Property] of text at the beginning of [Text][Text Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)TextAtBeginning` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyValueOutOfRangeException][] | Thrown when [Text][Text Property] is `null` or empty (i.e. `""`). | +| | Thrown when [Length][Length Property] is greater than the length of [Text][Text Property]. | + +## Remarks + +### Negative Length + +If [Length][Length Property] is negative, the variable specified in the [Text At Beginning][TextAtBeginning Property] property will be set to the value of [Text][Text Property]. + +### Zero Length + +If [Length][Length Property] is `0`, the variable specified in the [Text At Beginning][TextAtBeginning Property] property will be set to empty (i.e. `""`). + +[Text Property]: {{< ref "#text" >}} +[Length Property]: {{< ref "#length" >}} +[TextAtBeginning Property]: {{< ref "#text-at-beginning" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[PropertyValueOutOfRangeException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyValueOutOfRangeException.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/get-text/get-text-at-end-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/get-text/get-text-at-end-block.md new file mode 100644 index 000000000..61d54d6ce --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/get-text/get-text-at-end-block.md @@ -0,0 +1,114 @@ +--- +title: "Get Text At End" +linkTitle: "Get Text At End" +description: "Gets a length of text from the end of a given text." +--- + +{{< figure src="/blocks/text-get-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.GetText.GetTextAtEndBlock)
+ +## Description + +Gets a [Length][Length Property] of [text][TextAtEnd Property] from the end of a given [Text][Text Property]. + +## Examples + +### Get a Length of text from the end of a given Text + +This example will get the last `3` characters from the end of `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` | `($)Text` is a variable of type [String][] | +| [Length][Length Property] | `($)Length`, with value `3` | `($)Length` is a variable of type [Int32][] | +| [Text At End][TextAtEnd Property] | `($)TextAtEnd`, with no value | `($)TextAtEnd` is a variable that will be set to a [String][] | + +#### Result + +Getting the last `3` characters from the end of `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` results in the variable `($)TextAtEnd` being updated to the following: + +```json +"XYZ" +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to get the [Text At End][TextAtEnd Property] from. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Length + +The [Length][Length Property] of text to get. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `-1` | + +### Text At End + +The [Length][Length Property] of text at the end of [Text][Text Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)TextAtEnd` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyValueOutOfRangeException][] | Thrown when [Text][Text Property] is `null` or empty (i.e. `""`). | +| | Thrown when [Length][Length Property] is greater than the length of [Text][Text Property]. | + +## Remarks + +### Negative Length + +If [Length][Length Property] is negative, the variable specified in the [Text At End][TextAtEnd Property] property will be set to the value of [Text][Text Property]. + +### Zero Length + +If [Length][Length Property] is `0`, the variable specified in the [Text At End][TextAtEnd Property] property will be set to empty (i.e. `""`). + +[Text Property]: {{< ref "#text" >}} +[Length Property]: {{< ref "#length" >}} +[TextAtEnd Property]: {{< ref "#text-at-end" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[PropertyValueOutOfRangeException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyValueOutOfRangeException.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/get-text/get-text-at-index-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/get-text/get-text-at-index-block.md new file mode 100644 index 000000000..1bd70496f --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/get-text/get-text-at-index-block.md @@ -0,0 +1,136 @@ +--- +title: "Get Text At Index" +linkTitle: "Get Text At Index" +description: "Gets a length of text at the specified index of a given text." +--- + +{{< figure src="/blocks/text-get-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.GetText.GetTextAtIndexBlock)
+ +## Description + +Gets a [Length][Length Property] of [text][TextAtIndex Property] at the specified [Index][Index Property] of a given [Text][Text Property]. + +## Examples + +### Get a Length of text at the specified Index of a given Text + +This example will get `3` characters at index `3` of `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` | `($)Text` is a variable of type [String][] | +| [Index][Index Property] | `($)Index`, with value `3` | `($)Index` is a variable of type [Int32][] | +| [Length][Length Property] | `($)Length`, with value `3` | `($)Length` is a variable of type [Int32][] | +| [Text At Index][TextAtIndex Property] | `($)TextAtIndex`, with no value | `($)TextAtIndex` is a variable that will be set to a [String][] | + +#### Result + +`"D"` is at index `3` in `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. Therefore, getting `3` characters at (and including) index `3` results in the variable `($)TextAtIndex` being updated to the following: + +```json +"DEF" +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to get the [Text At Index][TextAtIndex Property] from. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Index + +The [Index][Index Property] to get the text from. This is an inclusive index, which means the character at the specified index will be included. + +For information about what an index is, please see [Indexes][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `0` | + +### Length + +The [Length][Length Property] of text to get. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `-1` | + +### Text At Index + +The [Length][Length Property] of text at the [Index][Index Property] of [Text][Text Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)TextAtIndex` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyValueOutOfRangeException][] | Thrown when [Text][Text Property]is `null` or empty (i.e. `""`). | +| | Thrown when [Index][Index Property] is less than zero or greater than the length of [Text][Text Property] - `1`. | +| | Thrown when [Index][Index Property] + a positive [Length][Length Property] is greater than the length of [Text][Text Property] - `1`. | + +## Remarks + +### Negative Length + +A negative [Length][Length Property] can be used to get all text at and after the [Index][Index Property] of [Text][Text Property]. + +### Zero Length + +If [Length][Length Property] is `0`, the variable specified in the [Text At Index][TextAtIndex Property] property will be set to empty (i.e. `""`). + +### Index is inclusive + +The [Index][Index Property] property is an inclusive [index][Indexes], which means the character at the index will be included in the retrieved [text][TextAtIndex Property]. + +[Text Property]: {{< ref "#text" >}} +[Index Property]: {{< ref "#index" >}} +[Length Property]: {{< ref "#length" >}} +[TextAtIndex Property]: {{< ref "#text-at-index" >}} + +[Indexes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Indexes.MainDoc" >}} +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[PropertyValueOutOfRangeException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyValueOutOfRangeException.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/get-text/get-text-before-index-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/get-text/get-text-before-index-block.md new file mode 100644 index 000000000..f02d30197 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/get-text/get-text-before-index-block.md @@ -0,0 +1,136 @@ +--- +title: "Get Text Before Index" +linkTitle: "Get Text Before Index" +description: "Gets a length of text before the specified index of a given text." +--- + +{{< figure src="/blocks/text-get-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.GetText.GetTextBeforeIndexBlock)
+ +## Description + +Gets a [Length][Length Property] of [text][TextBeforeIndex Property] before the specified [Index][Index Property] of a given [Text][Text Property]. + +## Examples + +### Get a Length of text before the specified Index of a given Text + +This example will get `3` characters before index `3` of `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` | `($)Text` is a variable of type [String][] | +| [Index][Index Property] | `($)Index`, with value `3` | `($)Index` is a variable of type [Int32][] | +| [Length][Length Property] | `($)Length`, with value `3` | `($)Length` is a variable of type [Int32][] | +| [Text Before Index][TextBeforeIndex Property] | `($)TextBeforeIndex`, with no value | `($)TextBeforeIndex` is a variable that will be set to a [String][] | + +#### Result + +`"D"` is at index `3` in `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. Therefore, getting `3` characters before index `3` results in the variable `($)TextBeforeIndex` being updated to the following: + +```json +"ABC" +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to get the [Text Before Index][TextBeforeIndex Property] from. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Index + +The [Index][Index Property] to get the text before. This is an exclusive index, which means the character at the specified index won't be included. + +For information about what an index is, please see [Indexes][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `0` | + +### Length + +The [Length][Length Property] of text to get. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `-1` | + +### Text Before Index + +The [Length][Length Property] of text before the [Index][Index Property] of [Text][Text Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)TextBeforeIndex` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyValueOutOfRangeException][] | Thrown when [Text][Text Property] is `null` or empty (i.e. `""`). | +| | Thrown when [Index][Index Property] is less than `1` or greater than the length of [Text][Text Property] - `1`. | +| | Thrown when [Index][Index Property] - a positive [Length][Length Property] is less than `1`. | + +## Remarks + +### Negative Length + +A negative [Length][Length Property] can be used to get all text before the [Index][Index Property] of [Text][Text Property]. + +### Zero Length + +If [Length][Length Property] is `0`, the variable specified in the [Text Before Index][TextBeforeIndex Property] property will be set to empty (i.e. `""`). + +### Index is exclusive + +The [Index][Index Property] property is an exclusive [index][Indexes], which means the character at the index will not be included in the retrieved [text][TextBeforeIndex Property]. + +[Text Property]: {{< ref "#text" >}} +[Index Property]: {{< ref "#index" >}} +[Length Property]: {{< ref "#length" >}} +[TextBeforeIndex Property]: {{< ref "#text-before-index" >}} + +[Indexes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Indexes.MainDoc" >}} +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[PropertyValueOutOfRangeException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyValueOutOfRangeException.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/get-text/get-text-between-indexes-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/get-text/get-text-between-indexes-block.md new file mode 100644 index 000000000..d047c36a7 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/get-text/get-text-between-indexes-block.md @@ -0,0 +1,164 @@ +--- +title: "Get Text Between Indexes" +linkTitle: "Get Text Between Indexes" +description: "Gets text between the specified start index and end index of a given text." +--- + +{{< figure src="/blocks/text-get-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.GetText.GetTextBetweenIndexesBlock)
+ +## Description + +Gets [text][TextBetweenIndexes Property] between the specified [Start Index][StartIndex Property] and [End Index][EndIndex Property] of a given [Text][Text Property]. + +## Examples + +### Get text between the specified Start Index and End Index of a given Text + +This example will get all characters between start index `0` and end index `3` of `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` | `($)Text` is a variable of type [String][] | +| [Start Index][StartIndex Property] | `($)StartIndex`, with value `0` | `($)StartIndex` is a variable of type [Int32][] | +| [End Index][EndIndex Property] | `($)EndIndex`, with value `3` | `($)EndIndex` is a variable of type [Int32][] | +| [Text Between Indexes][TextBetweenIndexes Property] | `($)TextBetweenIndexes`, with no value | `($)TextBetweenIndexes` is a variable that will be set to a [String][] | + +#### Result + +`"A"` is at index `0` and `"D"` is at index `3` in `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. Therefore, getting all characters between (and including) start index `0` and end index `3` results in the variable `($)TextBetweenIndexes` being updated to the following: + +```json +"ABCD" +``` + +*** + +### Get text where Start Index is greater than End Index + +This example will get all characters between start index `3` and end index `0` of `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` | `($)Text` is a variable of type [String][] | +| [Start Index][StartIndex Property] | `($)StartIndex`, with value `3` | `($)StartIndex` is a variable of type [Int32][] | +| [End Index][EndIndex Property] | `($)EndIndex`, with value `0` | `($)EndIndex` is a variable of type [Int32][] | +| [Text Between Indexes][TextBetweenIndexes Property] | `($)TextBetweenIndexes`, with no value | `($)TextBetweenIndexes` is a variable that will be set to a [String][] | + +#### Result + +In this example the start index `3` is greater than the end index `0`. When this occurs, the block simply swaps the indexes before it processes the text. + +Therefore, having start index `3` and end index `0` is the same as having start index `0` and end index `3`. + +`"A"` is at index `0` and `"D"` is at index `3` in `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. + +Therefore, getting all characters between (and including) start index `3` and end index `0`, or start index `0` and end index `3`, results in the variable `($)TextBetweenIndexes` being updated to the following: + +```json +"ABCD" +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to get the [Text Between Indexes][TextBetweenIndexes Property] from. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Start Index + +The [Start Index][StartIndex Property] used to get the text. This is an inclusive index, which means the character at the specified index will be included. + +For information about what an index is, please see [Indexes][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `0` | + +### End Index + +The [End Index][EndIndex Property] used to get the text. This is an inclusive index, which means the character at the specified index will be included. + +For information about what an index is, please see [Indexes][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `0` | + +### Text Between Indexes + +The text between (and including) the [Start Index][StartIndex Property] and [End Index][EndIndex Property] of [Text][Text Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)TextBetweenIndexes` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyValueOutOfRangeException][] | Thrown when [Text][Text Property] is `null` or empty (i.e. `""`). | +| | Thrown when [Start Index][StartIndex Property] or [End Index][EndIndex Property] is less than zero or greater than the length of [Text][Text Property] - `1`. | + +## Remarks + +### Start Index and End Index are inclusive + +The [Start Index][StartIndex Property] and [End Index][EndIndex Property] properties are both inclusive [indexes][], which means the characters at those indexes will be included in the retrieved [text][TextBetweenIndexes Property]. + +### Start Index greater than End Index + +[Start Index][StartIndex Property] can be greater than [End Index][EndIndex Property]. If this is the case, the values of the indexes will be swapped. See [Example][StartIndexGreaterThanEndIndex Example] above. + +[Text Property]: {{< ref "#text" >}} +[StartIndex Property]: {{< ref "#start-index" >}} +[EndIndex Property]: {{< ref "#end-index" >}} +[TextBetweenIndexes Property]: {{< ref "#text-between-indexes" >}} + +[StartIndexGreaterThanEndIndex Example]: {{< ref "#get-text-where-start-index-is-greater-than-end-index" >}} + +[Indexes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Indexes.MainDoc" >}} +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[PropertyValueOutOfRangeException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyValueOutOfRangeException.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/is-text/_index.md b/content/en/docs/2023.9/Reference/Blocks/Text/is-text/_index.md new file mode 100644 index 000000000..1b1f9d50d --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/is-text/_index.md @@ -0,0 +1,5 @@ +--- +title: "Is Text" +linkTitle: "Is Text" +description: "Check if text is equal to another text, `null`, empty (i.e. `\"\"`), or whitespace (e.g. `\" \"`)." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/is-text/is-text-empty-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/is-text/is-text-empty-block.md new file mode 100644 index 000000000..3fad2c560 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/is-text/is-text-empty-block.md @@ -0,0 +1,165 @@ +--- +title: "Is Text Empty" +linkTitle: "Is Text Empty" +description: "Checks if text is empty (i.e. `\"\"`)." +--- + +{{< figure src="/blocks/text-is-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.IsText.IsTextEmptyBlock)
+ +## Description + +Checks if [Text][Text Property] is empty (i.e. `""`) . + +For information about empty, please see [Empty Text and Whitespace][]. + +## Examples + +### Text is empty + +This example will check if `""` is empty (i.e. `""`). + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `""` | `($)Text` is a variable of type [String][] | +| [Text Is Empty][TextIsEmpty Property] | `($)TextIsEmpty`, with no value | `($)TextIsEmpty` is a variable that will be set to a [Boolean][] value | + +#### Result + +`""` is empty (i.e. `""`), resulting in the variable `($)TextIsEmpty` being updated to the following: + +```json +true +``` + +*** + +### Text is null + +This example will check if `null` is empty (i.e. `""`). + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `null` | `($)Text` is a variable of type [String][] | +| [Text Is Empty][TextIsEmpty Property] | `($)TextIsEmpty`, with no value | `($)TextIsEmpty` is a variable that will be set to a [Boolean][] value | + +#### Result + +`null` is not empty (i.e. `""`), resulting in the variable `($)TextIsEmpty` being updated to the following: + +```json +false +``` + +*** + +### Text is whitespace + +This example will check if `" "` is empty (i.e. `""`). + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `" "` | `($)Text` is a variable of type [String][] | +| [Text Is Empty][TextIsEmpty Property] | `($)TextIsEmpty`, with no value | `($)TextIsEmpty` is a variable that will be set to a [Boolean][] value | + +#### Result + +`" "` is not empty (i.e. `""`), resulting in the variable `($)TextIsEmpty` being updated to the following: + +```json +false +``` + +*** + +### Text is not empty + +This example will check if `"The quick brown fox jumps over the lazy dog"` is empty (i.e. `""`). + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text Is Empty][TextIsEmpty Property] | `($)TextIsEmpty`, with no value | `($)TextIsEmpty` is a variable that will be set to a [Boolean][] value | + +#### Result + +`"The quick brown fox jumps over the lazy dog"` is not empty (i.e. `""`), resulting in the variable `($)TextIsEmpty` being updated to the following: + +```json +false +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to check is empty (i.e. `""`). + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Text Is Empty + +The result of the is empty check. + +If the [Text][Text Property] is empty (i.e. `""`), the specified variable will be set to `true`, otherwise it will be set to `false`. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)TextIsEmpty` with no value | + +## Exceptions + +No exceptions are thrown by the block. + +## Remarks + +### Null Text + +If [Text][Text Property] is `null` the variable specified in the [Text Is Empty][TextIsEmpty Property] property will be set to `false`. See [Example][NullText Example] above. + +### Whitespace Text + +If [Text][Text Property] is whitespace (e.g. `" "`) the variable specified in the [Text Is Empty][TextIsEmpty Property] property will be set to `false`. See [Example][WhitespaceText Example] above. + +[Text Property]: {{< ref "#text" >}} +[TextIsEmpty Property]: {{< ref "#text-is-empty-1" >}} + +[NullText Example]: {{< ref "#text-is-null" >}} +[WhitespaceText Example]: {{< ref "#text-is-whitespace" >}} + +[Empty Text and Whitespace]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.EmptyTextAndWhitespace.MainDoc" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/is-text/is-text-empty-or-whitespace-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/is-text/is-text-empty-or-whitespace-block.md new file mode 100644 index 000000000..b1c5b89e7 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/is-text/is-text-empty-or-whitespace-block.md @@ -0,0 +1,160 @@ +--- +title: "Is Text Empty Or Whitespace" +linkTitle: "Is Text Empty Or Whitespace" +description: "Checks if text is empty (i.e. `\"\"`) or whitespace (i.e. `space`, `tab`, `carriage return`, `line feed` characters)." +--- + +{{< figure src="/blocks/text-is-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.IsText.IsTextEmptyOrWhitespaceBlock)
+ +## Description + +Checks if [Text][Text Property] is empty (i.e. `""`) or whitespace (i.e. `space`, `tab`, `carriage return`, `line feed` characters). + +For information about empty and whitespace, please see [Empty Text and Whitespace][]. + +## Examples + +### Text is empty + +This example will check if `""` is empty (i.e. `""`) or whitespace (i.e. `space`, `tab`, `carriage return`, `line feed` characters). + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `""` | `($)Text` is a variable of type [String][] | +| [Text Is Empty Or Whitespace][TextIsEmptyOrWhitespace Property] | `($)TextIsEmptyOrWhitespace`, with no value | `($)TextIsEmptyOrWhitespace` is a variable that will be set to a [Boolean][] value | + +#### Result + +`""` is empty (i.e. `""`), resulting in the variable `($)TextIsEmptyOrWhitespace` being updated to the following: + +```json +true +``` + +*** + +### Text is whitespace + +This example will check if `" "` is empty (i.e. `""`) or whitespace (i.e. `space`, `tab`, `carriage return`, `line feed` characters). + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `" "` | `($)Text` is a variable of type [String][] | +| [Text Is Empty Or Whitespace][TextIsEmptyOrWhitespace Property] | `($)TextIsEmptyOrWhitespace`, with no value | `($)TextIsEmptyOrWhitespace` is a variable that will be set to a [Boolean][] value | + +#### Result + +`" "` is whitespace, resulting in the variable `($)TextIsEmptyOrWhitespace` being updated to the following: + +```json +true +``` + +*** + +### Text is null + +This example will check if `null` is empty (i.e. `""`) or whitespace (i.e. `space`, `tab`, `carriage return`, `line feed` characters). + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `null` | `($)Text` is a variable of type [String][] | +| [Text Is Empty Or Whitespace][TextIsEmptyOrWhitespace Property] | `($)TextIsEmptyOrWhitespace`, with no value | `($)TextIsEmptyOrWhitespace` is a variable that will be set to a [Boolean][] value | + +#### Result + +`null` is not empty (i.e. `""`) or whitespace (i.e. `space`, `tab`, `carriage return`, `line feed` characters), resulting in the variable `($)TextIsEmptyOrWhitespace` being updated to the following: + +```json +false +``` + +*** + +### Text is not empty or whitespace + +This example will check if `"The quick brown fox jumps over the lazy dog"` is empty (i.e. `""`) or whitespace (i.e. `space`, `tab`, `carriage return`, `line feed` characters). + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text Is Empty Or Whitespace][TextIsEmptyOrWhitespace Property] | `($)TextIsEmptyOrWhitespace`, with no value | `($)TextIsEmptyOrWhitespace` is a variable that will be set to a [Boolean][] value | + +#### Result + +`"The quick brown fox jumps over the lazy dog"` is not empty (i.e. `""`) or whitespace (i.e. `space`, `tab`, `carriage return`, `line feed` characters), resulting in the variable `($)TextIsEmptyOrWhitespace` being updated to the following: + +```json +false +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to check is empty (i.e. `""`) or whitespace (i.e. `space`, `tab`, `carriage return`, `line feed` characters). + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Text Is Empty Or Whitespace + +The result of the is empty or whitespace check. + +If the [Text][Text Property] is empty (i.e. `""`) or whitespace (i.e. `space`, `tab`, `carriage return`, `line feed` characters), the specified variable will be set to `true`, otherwise it will be set to `false`. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)TextIsEmptyOrWhitespace` with no value | + +## Exceptions + +No exceptions are thrown by the block. + +## Remarks + +### Null Text + +If [Text][Text Property] is `null` the variable specified in the [Text Is Empty Or Whitespace][TextIsEmptyOrWhitespace Property] property will be set to `false`. See [Example][NullText Example] above. + +[Text Property]: {{< ref "#text" >}} +[TextIsEmptyOrWhitespace Property]: {{< ref "#text-is-empty-or-whitespace" >}} + +[NullText Example]: {{< ref "#text-is-null" >}} + +[Empty Text and Whitespace]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.EmptyTextAndWhitespace.MainDoc" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/is-text/is-text-equal-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/is-text/is-text-equal-block.md new file mode 100644 index 000000000..8f4954ce0 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/is-text/is-text-equal-block.md @@ -0,0 +1,189 @@ +--- +title: "Is Text Equal" +linkTitle: "Is Text Equal" +description: "Checks if a text is equal to another text." +--- + +{{< figure src="/blocks/text-is-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.IsText.IsTextEqualBlock)
+ +## Description + +Checks if [Text][Text Property] is equal to [Text To Compare][TextToCompare Property]. + +## Examples + +### Text is equal to Text To Compare (Ordinal) + +This example will check if `"The quick brown fox jumps over the lazy dog"` is equal to `"The quick brown fox jumps over the lazy dog"`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Compare][TextToCompare Property] | `($)TextToCompare`, with value `"The quick brown fox jumps over the lazy dog"` | `($)TextToCompare` is a variable of type [String][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Text Is Equal][TextIsEqual Property] | `($)TextIsEqual`, with no value | `($)TextIsEqual` is a variable that will be set to a [Boolean][] value | + +#### Result + +As this example is performing a [case-sensitive, culture-insensitive][Ordinal] comparison of text, `"The quick brown fox jumps over the lazy dog"` is equal to `"The quick brown fox jumps over the lazy dog"`, as they match exactly, including casing. Therefore, the variable `($)TextIsEqual` will be updated to the following: + +```json +true +``` + +*** + +### Text is not equal to Text To Compare (Ordinal) + +This example will check if `"The quick brown fox jumps over the lazy dog"` is equal to `"the quick brown fox jumps over the lazy dog"`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Compare][TextToCompare Property] | `($)TextToCompare`, with value `"the quick brown fox jumps over the lazy dog"` | `($)TextToCompare` is a variable of type [String][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Text Is Equal][TextIsEqual Property] | `($)TextIsEqual`, with no value | `($)TextIsEqual` is a variable that will be set to a [Boolean][] value | + +#### Result + +As this example is performing a [case-sensitive, culture-insensitive][Ordinal] comparison of text, `"The quick brown fox jumps over the lazy dog"` is not equal to `"the quick brown fox jumps over the lazy dog"`, as whilst the characters match exactly, the casing of the first `"T"` differs. Therefore, the variable `($)TextIsEqual` will be updated to the following: + +```json +false +``` + +*** + +### Text is equal to Text To Compare (Ordinal Ignore Case) + +This example will check if `"The quick brown fox jumps over the lazy dog"` is equal to `"the quick brown fox jumps over the lazy dog"`. + +It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text To Compare][TextToCompare Property] | `($)TextToCompare`, with value `"the quick brown fox jumps over the lazy dog"` | `($)TextToCompare` is a variable of type [String][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.OrdinalIgnoreCase` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Text Is Equal][TextIsEqual Property] | `($)TextIsEqual`, with no value | `($)TextIsEqual` is a variable that will be set to a [Boolean][] value | + +#### Result + +As this example is performing a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text, `"The quick brown fox jumps over the lazy dog"` is equal to `"the quick brown fox jumps over the lazy dog"`, as the characters match exactly, and casing is not considered. Therefore, the variable `($)TextIsEqual` will be updated to the following: + +```json +true +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to check is equal to [Text To Compare][TextToCompare Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Text To Compare + +The [Text To Compare][TextToCompare Property] if [Text][Text Property] is equal to. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Expression][] | +| Default Value | `$@""` | + +### Comparison Type + +The [Comparison Type][ComparisonType Property] specifying the rules used to compare if [Text][Text Property] is equal to [Text To Compare][TextToCompare Property]. + +For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. + +| | | +|--------------------|---------------------------| +| Data Type | [StringComparison][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Literal][] | +| Default Value | `Ordinal` | + +### Text Is Equal + +[Boolean][] indicating whether [Text][Text Property] is equal to [Text To Compare][TextToCompare Property]. + +If they are equal the specified variable will be set to `true`, otherwise it will be set to `false`. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)TextIsEqual` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [ArgumentException][] | Thrown when [Comparison Type][ComparisonType Property] is not one of the specified [StringComparison][] types (e.g. `(StringComparison)10`). | + +## Remarks + +### Comparison Types + +For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. + +### Null vs empty + +If [Text][Text Property] is `null` and [Text To Compare][TextToCompare Property] is empty (i.e. `""`), or vice versa, the variable specified in the [Text Is Equal][TextIsEqual Property] property is set to `false`, as `null` and `""` are not equal. + +[Text Property]: {{< ref "#text" >}} +[TextToCompare Property]: {{< ref "#text-to-compare" >}} +[ComparisonType Property]: {{< ref "#comparison-type" >}} +[TextIsEqual Property]: {{< ref "#text-is-equal" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[Equality]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.MainDoc" >}} +[ComparisonTypes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.MainDoc" >}} +[Ordinal]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.Ordinal" >}} +[OrdinalIgnoreCase]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.Equality.ComparisonTypes.OrdinalIgnoreCase" >}} + +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[StringComparison]: {{< url path="Cortex.Reference.DataTypes.Text.StringComparison.MainDoc" >}} + +[ArgumentException]: {{< url path="MSDocs.DotNet.Api.System.ArgumentException" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/is-text/is-text-null-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/is-text/is-text-null-block.md new file mode 100644 index 000000000..c8ff070b7 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/is-text/is-text-null-block.md @@ -0,0 +1,165 @@ +--- +title: "Is Text Null" +linkTitle: "Is Text Null" +description: "Checks if text is `null`." +--- + +{{< figure src="/blocks/text-is-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.IsText.IsTextNullBlock)
+ +## Description + +Checks if [Text][Text Property] is `null`. + +For information about `null`, please see [Null and Nullable Types][]. + +## Examples + +### Text is null + +This example will check if `null` is `null`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `null` | `($)Text` is a variable of type [String][] | +| [Text Is Null][TextIsNull Property] | `($)TextIsNull`, with no value | `($)TextIsNull` is a variable that will be set to a [Boolean][] value | + +#### Result + +`null` is `null`, resulting in the variable `($)TextIsNull` being updated to the following: + +```json +true +``` + +*** + +### Text is empty + +This example will check if empty (i.e. `""`) is `null`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `""` | `($)Text` is a variable of type [String][] | +| [Text Is Null][TextIsNull Property] | `($)TextIsNull`, with no value | `($)TextIsNull` is a variable that will be set to a [Boolean][] value | + +#### Result + +Empty (i.e. `""`) is not `null`, resulting in the variable `($)TextIsNull` being updated to the following: + +```json +false +``` + +*** + +### Text is whitespace + +This example will check if `" "` is `null`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `" "` | `($)Text` is a variable of type [String][] | +| [Text Is Null][TextIsNull Property] | `($)TextIsNull`, with no value | `($)TextIsNull` is a variable that will be set to a [Boolean][] value | + +#### Result + +`" "` is not `null`, resulting in the variable `($)TextIsNull` being updated to the following: + +```json +false +``` + +*** + +### Text is not null + +This example will check if `"The quick brown fox jumps over the lazy dog"` is `null`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text Is Null][TextIsNull Property] | `($)TextIsNull`, with no value | `($)TextIsNull` is a variable that will be set to a [Boolean][] value | + +#### Result + +`"The quick brown fox jumps over the lazy dog"` is not `null`, resulting in the variable `($)TextIsNull` being updated to the following: + +```json +false +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to check is `null`. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Text Is Null + +The result of the is null check. + +If the [Text][Text Property] is `null`, the specified variable will be set to `true`, otherwise it will be set to `false`. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)TextIsNull` with no value | + +## Exceptions + +No exceptions are thrown by the block. + +## Remarks + +### Empty Text + +If [Text][Text Property] is empty (i.e.. `""`) the variable specified in the [Text Is Null][TextIsNull Property] property will be set to `false`. See [Example][EmptyText Example] above. + +### Whitespace Text + +If [Text][Text Property] is whitespace (e.g. `" "`) the variable specified in the [Text Is Null][TextIsNull Property] property will be set to `false`. See [Example][WhitespaceText Example] above. + +[Text Property]: {{< ref "#text" >}} +[TextIsNull Property]: {{< ref "#text-is-null-1" >}} + +[EmptyText Example]: {{< ref "#text-is-empty" >}} +[WhitespaceText Example]: {{< ref "#text-is-whitespace" >}} + +[Null and Nullable Types]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.NullAndNullableTypes.MainDoc" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/is-text/is-text-null-empty-or-whitespace-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/is-text/is-text-null-empty-or-whitespace-block.md new file mode 100644 index 000000000..ebc859816 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/is-text/is-text-null-empty-or-whitespace-block.md @@ -0,0 +1,160 @@ +--- +title: "Is Text Null, Empty Or Whitespace" +linkTitle: "Is Text Null, Empty Or Whitespace" +description: "Checks if text is `null`, empty (i.e. `\"\"`) or whitespace (i.e. `space`, `tab`, `carriage return`, `line feed` characters)." +--- + +{{< figure src="/blocks/text-is-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.IsText.IsTextNullEmptyOrWhitespaceBlock)
+ +## Description + +Checks if [Text][Text Property] is `null`, empty (i.e. `""`) or whitespace (i.e. `space`, `tab`, `carriage return`, `line feed` characters). + +For information about `null`, please see [Null and Nullable Types][]. + +For information about empty and whitespace, please see [Empty Text and Whitespace][]. + +## Examples + +### Text is null + +This example will check if `null` is `null`, empty (i.e. `""`) or whitespace (i.e. `space`, `tab`, `carriage return`, `line feed` characters). + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `null` | `($)Text` is a variable of type [String][] | +| [Text Is Null Empty Or Whitespace][TextIsNullEmptyOrWhitespace Property] | `($)TextIsNullEmptyOrWhitespace`, with no value | `($)TextIsNullEmptyOrWhitespace` is a variable that will be set to a [Boolean][] value | + +#### Result + +`null` is `null`, resulting in the variable `($)TextIsNullEmptyOrWhitespace` being updated to the following: + +```json +true +``` + +*** + +### Text is empty + +This example will check if `""` is `null`, empty (i.e. `""`) or whitespace (i.e. `space`, `tab`, `carriage return`, `line feed` characters). + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `""` | `($)Text` is a variable of type [String][] | +| [Text Is Null Empty Or Whitespace][TextIsNullEmptyOrWhitespace Property] | `($)TextIsNullEmptyOrWhitespace`, with no value | `($)TextIsNullEmptyOrWhitespace` is a variable that will be set to a [Boolean][] value | + +#### Result + +`""` is empty (i.e. `""`), resulting in the variable `($)TextIsNullEmptyOrWhitespace` being updated to the following: + +```json +true +``` + +*** + +### Text is whitespace + +This example will check if `" "` is `null`, empty (i.e. `""`) or whitespace (i.e. `space`, `tab`, `carriage return`, `line feed` characters). + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `" "` | `($)Text` is a variable of type [String][] | +| [Text Is Null Empty Or Whitespace][TextIsNullEmptyOrWhitespace Property] | `($)TextIsNullEmptyOrWhitespace`, with no value | `($)TextIsNullEmptyOrWhitespace` is a variable that will be set to a [Boolean][] value | + +#### Result + +`" "` is whitespace (i.e. `space`, `tab`, `carriage return`, `line feed` characters), resulting in the variable `($)TextIsNullEmptyOrWhitespace` being updated to the following: + +```json +true +``` + +*** + +### Text is not null, empty or whitespace + +This example will check if `"The quick brown fox jumps over the lazy dog"` is `null`, empty (i.e. `""`) or whitespace (i.e. `space`, `tab`, `carriage return`, `line feed` characters). + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text Is Null Empty Or Whitespace][TextIsNullEmptyOrWhitespace Property] | `($)TextIsNullEmptyOrWhitespace`, with no value | `($)TextIsNullEmptyOrWhitespace` is a variable that will be set to a [Boolean][] value | + +#### Result + +`"The quick brown fox jumps over the lazy dog"` is not `null`, empty (i.e. `""`) or whitespace (i.e. `space`, `tab`, `carriage return`, `line feed` characters), resulting in the variable `($)TextIsNullEmptyOrWhitespace` being updated to the following: + +```json +false +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to check is `null`, empty (i.e. `""`) or whitespace (i.e. `space`, `tab`, `carriage return`, `line feed` characters). + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Text Is Null Empty Or Whitespace + +The result of the is null, empty or whitespace check. + +If the [Text][Text Property] is `null`, empty (i.e. `""`) or whitespace (i.e. `space`, `tab`, `carriage return`, `line feed` characters), the specified variable will be set to `true`, otherwise it will be set to `false`. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)TextIsNullEmptyOrWhitespace` with no value | + +## Exceptions + +No exceptions are thrown by the block. + +## Remarks + +None + +[Text Property]: {{< ref "#text" >}} +[TextIsNullEmptyOrWhitespace Property]: {{< ref "#text-is-null-empty-or-whitespace" >}} + +[Null and Nullable Types]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.NullAndNullableTypes.MainDoc" >}} + +[Empty Text and Whitespace]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.EmptyTextAndWhitespace.MainDoc" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/is-text/is-text-null-or-empty-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/is-text/is-text-null-or-empty-block.md new file mode 100644 index 000000000..9261428a9 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/is-text/is-text-null-or-empty-block.md @@ -0,0 +1,164 @@ +--- +title: "Is Text Null Or Empty" +linkTitle: "Is Text Null Or Empty" +description: "Checks if text is `null` or empty (i.e. `\"\"`)." +--- + +{{< figure src="/blocks/text-is-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.IsText.IsTextNullOrEmptyBlock)
+ +## Description + +Checks if [Text][Text Property] is `null` or empty (i.e. `""`). + +For information about `null`, please see [Null and Nullable Types][]. + +For information about empty, please see [Empty Text and Whitespace][]. + +## Examples + +### Text is null + +This example will check if `null` is `null` or empty (i.e. `""`). + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `null` | `($)Text` is a variable of type [String][] | +| [Text Is Null Or Empty][TextIsNullOrEmpty Property] | `($)TextIsNullOrEmpty`, with no value | `($)TextIsNullOrEmpty` is a variable that will be set to a [Boolean][] value | + +#### Result + +`null` is `null`, resulting in the variable `($)TextIsNullOrEmpty` being updated to the following: + +```json +true +``` + +*** + +### Text is empty + +This example will check if `""` is `null` or empty (i.e. `""`). + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `""` | `($)Text` is a variable of type [String][] | +| [Text Is Null Or Empty][TextIsNullOrEmpty Property] | `($)TextIsNullOrEmpty`, with no value | `($)TextIsNullOrEmpty` is a variable that will be set to a [Boolean][] value | + +#### Result + +`""` is empty (i.e. `""`), resulting in the variable `($)TextIsNullOrEmpty` being updated to the following: + +```json +true +``` + +*** + +### Text is whitespace + +This example will check if `" "` is `null` or empty (i.e. `""`). + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `" "` | `($)Text` is a variable of type [String][] | +| [Text Is Null Or Empty][TextIsNullOrEmpty Property] | `($)TextIsNullOrEmpty`, with no value | `($)TextIsNullOrEmpty` is a variable that will be set to a [Boolean][] value | + +#### Result + +`" "` is not `null` or empty (i.e. `""`), resulting in the variable `($)TextIsNullOrEmpty` being updated to the following: + +```json +false +``` + +*** + +### Text is not null or empty + +This example will check if `"The quick brown fox jumps over the lazy dog"` is `null` or empty (i.e. `""`). + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text Is Null Or Empty][TextIsNullOrEmpty Property] | `($)TextIsNullOrEmpty`, with no value | `($)TextIsNullOrEmpty` is a variable that will be set to a [Boolean][] value | + +#### Result + +`"The quick brown fox jumps over the lazy dog"` is not `null` or empty (i.e. `""`), resulting in the variable `($)TextIsNullOrEmpty` being updated to the following: + +```json +false +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to check is `null` or empty (i.e. `""`). + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Text Is Null Or Empty + +The result of the is null or empty check. + +If the [Text][Text Property] is `null` or empty (i.e. `""`), the specified variable will be set to `true`, otherwise it will be set to `false`. + +| | | +|--------------------|---------------------------| +| Data Type | [Boolean][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)TextIsNullOrEmpty` with no value | + +## Exceptions + +No exceptions are thrown by the block. + +## Remarks + +### Whitespace Text + +If [Text][Text Property] is whitespace (e.g. `" "`) the variable specified in the [Text Is Null Or Empty][TextIsNullOrEmpty Property] property will be set to `false`. See [Example][WhitespaceText Example] above. + +[Text Property]: {{< ref "#text" >}} +[TextIsNullOrEmpty Property]: {{< ref "#text-is-null-or-empty" >}} + +[WhitespaceText Example]: {{< ref "#text-is-whitespace" >}} + +[Null and Nullable Types]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.NullAndNullableTypes.MainDoc" >}} + +[Empty Text and Whitespace]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Text.EmptyTextAndWhitespace.MainDoc" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Boolean]: {{< url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/join-text/_index.md b/content/en/docs/2023.9/Reference/Blocks/Text/join-text/_index.md new file mode 100644 index 000000000..60c7d1193 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/join-text/_index.md @@ -0,0 +1,5 @@ +--- +title: "Join Text" +linkTitle: "Join Text" +description: "Join a set of values together (using a separator) to create text." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/join-text/join-text-block-1.md b/content/en/docs/2023.9/Reference/Blocks/Text/join-text/join-text-block-1.md new file mode 100644 index 000000000..a2b682dd8 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/join-text/join-text-block-1.md @@ -0,0 +1,154 @@ +--- +title: "Join Text" +linkTitle: "Join Text" +description: "Joins a set of values together as text, using the given separator between each value." +--- + +{{< figure src="/blocks/text-join-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.JoinText.JoinTextBlock`1)
+ +## Description + +Joins a set of [Values][Values Property] together as [Text][Text Property], using the given [Separator][Separator Property] between each value. + +## Examples + +### Join a set of String Values together with a pipe Separator + +This example will join the set of [String][] values, `["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]`, together with a pipe separator (i.e. `"|"`). + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Values][Values Property] | `($)Values`, with value `["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]` | `($)Values` is a variable of type [IEnumerable][]<[String][]> | +| [Separator][Separator Property] | `($)Separator`, with value `"\|"` | `($)Separator` is a variable of type [String][] | +| [Text][Text Property] | `($)Text`, with no value | `($)Text` is a variable that will be set to a [String][] | + +#### Result + +Joining `["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]` together as text with a pipe separator (i.e. `"|"`), results in the variable `($)Text` being updated to the following: + +```json +"Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday" +``` + +*** + +### Join a set of Int32 Values together with a comma Separator + +This example will join the set of [Int32][] values, `[1, 2, 3]`, together with a comma separator (i.e. `","`). + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Values][Values Property] | `($)Values`, with value `[1, 2, 3]` | `($)Values` is a variable of type [IEnumerable][]<[Int32][]> | +| [Separator][Separator Property] | `($)Separator`, with value `","` | `($)Separator` is a variable of type [String][] | +| [Text][Text Property] | `($)Text`, with no value | `($)Text` is a variable that will be set to a [String][] | + +#### Result + +Each [Int32][] value will be converted to its text representation, by calling its [ToString][] method (i.e. `value.ToString()`). + +Joining `[1, 2, 3]` together as text with a comma separator (i.e. `","`), results in the variable `($)Text` being updated to the following: + +```json +"1,2,3" +``` + +*** + +## Properties + +### Values + +The set of [Values][Values Property] to join together as [Text][Text Property]. + +[Values][Values Property] will be joined together in the order they are defined. + +[Values][Values Property] can be any [IEnumerable][]<[TValue][]>, where [TValue][] represents the type of values. + +Each non-text value will be converted to its text representation, by calling its [ToString][] method (i.e. `value.ToString()`). + +| | | +|--------------------|---------------------------| +| Data Type | [IEnumerable][]<[TValue][]> | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Values` with no value | + +### Separator + +The text to use as a [Separator][Separator Property] between each of the [Values][Values Property]. + +[Separator][Separator Property] can contain zero or more characters. + +The [Separator][Separator Property] is only included in the resultant [Text][Text Property] if [Values][Values Property] has more than `1` item. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `,` | + +### Text + +The resultant [Text][Text Property] containing the specified [Values][Values Property] converted to their text representation and separated by the given [Separator][Separator Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyNullException][] | Thrown when [Values][Values Property] is `null`. | +| [OutOfMemoryException][] | Thrown when the length of the resultant [Text][Text Property] is longer than the maximum allowed length (`2,147,483,647`). | + +## Remarks + +### Null or empty Separator + +If [Separator][Separator Property] is `null` or empty (i.e. `""`), an empty text (i.e. `""`) will be used as the separator. + +### Null or empty Value in Values + +If any value in [Values][Values Property] is `null` or empty (i.e. `""`), an empty text (i.e. `""`) will be used as the value. + +[Values Property]: {{< ref "#values" >}} +[Separator Property]: {{< ref "#separator" >}} +[Text Property]: {{< ref "#text" >}} + +[TValue]: {{< url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.Generics.MainDoc" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[PropertyNullException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}} +[OutOfMemoryException]: {{< url path="MSDocs.DotNet.Api.System.OutOfMemoryException" >}} + +[IEnumerable]: {{< url path="Cortex.Reference.DataTypes.Collections.IEnumerable_TItem.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[ToString]: {{< url path="MSDocs.DotNet.Api.System.Object.ToString" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/remove-text/_index.md b/content/en/docs/2023.9/Reference/Blocks/Text/remove-text/_index.md new file mode 100644 index 000000000..73ba8925c --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/remove-text/_index.md @@ -0,0 +1,5 @@ +--- +title: "Remove Text" +linkTitle: "Remove Text" +description: "Remove a length of text from a given text." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/remove-text/remove-text-at-beginning-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/remove-text/remove-text-at-beginning-block.md new file mode 100644 index 000000000..91e645abe --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/remove-text/remove-text-at-beginning-block.md @@ -0,0 +1,106 @@ +--- +title: "Remove Text At Beginning" +linkTitle: "Remove Text At Beginning" +description: "Removes a length of text from the beginning of a given text." +--- + +{{< figure src="/blocks/text-remove-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.RemoveText.RemoveTextAtBeginningBlock)
+ +## Description + +Removes a [Length][Length Property] of text from the beginning of a given [Text][Text Property]. + +## Examples + +### Remove a Length of text from the beginning of a given Text + +This example will remove the first `3` characters from the beginning of `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` | `($)Text` is a variable of type [String][] | +| [Length][Length Property] | `($)Length`, with value `3` | `($)Length` is a variable of type [Int32][] | + +#### Result + +Removing the first `3` characters from the beginning of `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` results in the variable `($)Text` being updated to the following: + +```json +"DEFGHIJKLMNOPQRSTUVWXYZ" +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to remove the [Length][Length Property] of text from. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Length + +The [Length][Length Property] of text to remove. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `-1` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyValueOutOfRangeException][] | Thrown when [Text][Text Property] is `null` or empty (i.e. `""`). | +| | Thrown when [Length][Length Property] is greater than the length of [Text][Text Property]. | + +## Remarks + +### Negative Length + +If [Length][Length Property] is negative, all text will be removed and the variable specified in the [Text][Text Property] property will be set to empty (i.e. `""`). + +### Zero Length + +If [Length][Length Property] is `0`, no text will be removed and the variable specified in the [Text][Text Property] property will remain unchanged. + +[Text Property]: {{< ref "#text" >}} +[Length Property]: {{< ref "#length" >}} + +### Immutable String data type + +The [String][] data type used to represent [Text][Text Property] is immutable, which means it is read-only and cannot be changed once created. + +To overcome this, this block creates a new [String][] which has the [Length][Length Property] of text removed at the beginning and re-assigns it to the variable specified in the [Text][Text Property] property. + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[PropertyValueOutOfRangeException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyValueOutOfRangeException.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/remove-text/remove-text-at-end-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/remove-text/remove-text-at-end-block.md new file mode 100644 index 000000000..cbb6e6efa --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/remove-text/remove-text-at-end-block.md @@ -0,0 +1,106 @@ +--- +title: "Remove Text At End" +linkTitle: "Remove Text At End" +description: "Removes a length of text from the end of a given text." +--- + +{{< figure src="/blocks/text-remove-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.RemoveText.RemoveTextAtEndBlock)
+ +## Description + +Removes a [Length][Length Property] of text from the end of a given [Text][Text Property]. + +## Examples + +### Remove a Length of text from the end of a given Text + +This example will remove the last `3` characters from the end of `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` | `($)Text` is a variable of type [String][] | +| [Length][Length Property] | `($)Length`, with value `3` | `($)Length` is a variable of type [Int32][] | + +#### Result + +Removing the last `3` characters from the end of `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` results in the variable `($)Text` being updated to the following: + +```json +"ABCDEFGHIJKLMNOPQRSTUVW" +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to remove the [Length][Length Property] of text from. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Length + +The [Length][Length Property] of text to remove. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `-1` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyValueOutOfRangeException][] | Thrown when [Text][Text Property] is `null` or empty (i.e. `""`). | +| | Thrown when [Length][Length Property] is greater than the length of [Text][Text Property]. | + +## Remarks + +### Negative Length + +If [Length][Length Property] is negative, all text will be removed and the variable specified in the [Text][Text Property] property will be set to empty (i.e. `""`). + +### Zero Length + +If [Length][Length Property] is `0`, no text will be removed and the variable specified in the [Text][Text Property] property will remain unchanged. + +### Immutable String data type + +The [String][] data type used to represent [Text][Text Property] is immutable, which means it is read-only and cannot be changed once created. + +To overcome this, this block creates a new [String][] which has the [Length][Length Property] of text removed at the end and re-assigns it to the variable specified in the [Text][Text Property] property. + +[Text Property]: {{< ref "#text" >}} +[Length Property]: {{< ref "#length" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[PropertyValueOutOfRangeException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyValueOutOfRangeException.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/remove-text/remove-text-at-index-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/remove-text/remove-text-at-index-block.md new file mode 100644 index 000000000..c3dd0026e --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/remove-text/remove-text-at-index-block.md @@ -0,0 +1,128 @@ +--- +title: "Remove Text At Index" +linkTitle: "Remove Text At Index" +description: "Removes a length of text at the specified index of a given text." +--- + +{{< figure src="/blocks/text-remove-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.RemoveText.RemoveTextAtIndexBlock)
+ +## Description + +Removes a [Length][Length Property] of text at the specified [Index][Index Property] of a given [Text][Text Property]. + +## Examples + +### Remove a Length of text at the specified Index of a given Text + +This example will remove `3` characters at index `3` of `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` | `($)Text` is a variable of type [String][] | +| [Index][Index Property] | `($)Index`, with value `3` | `($)Index` is a variable of type [Int32][] | +| [Length][Length Property] | `($)Length`, with value `3` | `($)Length` is a variable of type [Int32][] | + +#### Result + +`"D"` is at index `3` in `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. Therefore, removing `3` characters at (and including) index `3` results in the variable `($)Text` being updated to the following: + +```json +"ABCGHIJKLMNOPQRSTUVWXYZ" +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to remove the [Length][Length Property] of text from. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Index + +The [Index][Index Property] to remove the text from. This is an inclusive index, which means the character at the specified index will be included. + +For information about what an index is, please see [Indexes][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `0` | + +### Length + +The [Length][Length Property] of text to remove. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `-1` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyValueOutOfRangeException][] | Thrown when [Text][Text Property] is `null` or empty (i.e. `""`). | +| | Thrown when [Index][Index Property] is less than zero or greater than the length of [Text][Text Property] - `1`. | +| | Thrown when [Index][Index Property] + a positive [Length][Length Property] is greater than the length of [Text][Text Property] - `1`. | + +## Remarks + +### Negative Length + +A negative [Length][Length Property] can be used to remove all text at and after the [Index][Index Property] of [Text][Text Property]. + +### Zero Length + +If [Length][Length Property] is `0`, no text will be removed and the variable specified in the [Text][Text Property] property will remain unchanged. + +### Index is inclusive + +The [Index][Index Property] property is an inclusive [index][Indexes], which means the character at the index will be included in the removed text. + +### Immutable String data type + +The [String][] data type used to represent [Text][Text Property] is immutable, which means it is read-only and cannot be changed once created. + +To overcome this, this block creates a new [String][] which has the [Length][Length Property] of text removed at the specified [Index][Index Property] and re-assigns it to the variable specified in the [Text][Text Property] property. + +[Text Property]: {{< ref "#text" >}} +[Index Property]: {{< ref "#index" >}} +[Length Property]: {{< ref "#length" >}} + +[Indexes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Indexes.MainDoc" >}} +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[PropertyValueOutOfRangeException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyValueOutOfRangeException.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/remove-text/remove-text-before-index-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/remove-text/remove-text-before-index-block.md new file mode 100644 index 000000000..50c2cda31 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/remove-text/remove-text-before-index-block.md @@ -0,0 +1,129 @@ +--- +title: "Remove Text Before Index" +linkTitle: "Remove Text Before Index" +description: "Removes a length of text before the specified index of a given text." +--- + +{{< figure src="/blocks/text-remove-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.RemoveText.RemoveTextBeforeIndexBlock)
+ +## Description + +Removes a [Length][Length Property] of text before the specified [Index][Index Property] of a given [Text][Text Property]. + +## Examples + +### Remove a Length of text before the specified Index of a given Text + +This example will remove `3` characters before index `3` of `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` | `($)Text` is a variable of type [String][] | +| [Index][Index Property] | `($)Index`, with value `3` | `($)Index` is a variable of type [Int32][] | +| [Length][Length Property] | `($)Length`, with value `3` | `($)Length` is a variable of type [Int32][] | + +#### Result + +`"D"` is at index `3` in `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. Therefore, removing `3` characters before index `3` results in the variable `($)Text` being updated to the following: + +```json +"DEFGHIJKLMNOPQRSTUVWXYZ" +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to remove the [Length][Length Property] of text from. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + + +### Index + +The [Index][Index Property] to remove the text before. This is an exclusive index, which means the character at the specified index won't be included. + +For information about what an index is, please see [Indexes][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `0` | + +### Length + +The [Length][Length Property] of text to remove. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `-1` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyValueOutOfRangeException][] | Thrown when [Text][Text Property] is `null` or empty (i.e. `""`). | +| | Thrown when [Index][Index Property] is less than `1` or greater than the length of [Text][Text Property] - `1`. | +| | Thrown when [Index][Index Property] - a positive [Length][Length Property] is less than `1`. | + +## Remarks + +### Negative Length + +A negative [Length][Length Property] can be used to remove all text before the [Index][Index Property] of [Text][Text Property]. + +### Zero Length + +If [Length][Length Property] is `0`, the variable specified in the [Text][Text Property] property will be set to empty (i.e. `""`). + +### Index is exclusive + +The [Index][Index Property] property is an exclusive [index][Indexes], which means the character at the index will not be included in the removed text. + +### Immutable String data type + +The [String][] data type used to represent [Text][Text Property] is immutable, which means it is read-only and cannot be changed once created. + +To overcome this, this block creates a new [String][] which has the [Length][Length Property] of text removed before the specified [Index][Index Property] and re-assigns it to the variable specified in the [Text][Text Property] property. + +[Text Property]: {{< ref "#text" >}} +[Index Property]: {{< ref "#index" >}} +[Length Property]: {{< ref "#length" >}} + +[Indexes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Indexes.MainDoc" >}} +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[PropertyValueOutOfRangeException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyValueOutOfRangeException.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/remove-text/remove-text-between-indexes-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/remove-text/remove-text-between-indexes-block.md new file mode 100644 index 000000000..95585f95d --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/remove-text/remove-text-between-indexes-block.md @@ -0,0 +1,155 @@ +--- +title: "Remove Text Between Indexes" +linkTitle: "Remove Text Between Indexes" +description: "Removes text between the specified start index and end index of a given text." +--- + +{{< figure src="/blocks/text-remove-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.RemoveText.RemoveTextBetweenIndexesBlock)
+ +## Description + +Removes text between the specified [Start Index][StartIndex Property] and [End Index][EndIndex Property] of a given [Text][Text Property]. + +## Examples + +### Remove text between the specified Start Index and End Index of a given Text + +This example will remove all characters between start index `0` and end index `3` of `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` | `($)Text` is a variable of type [String][] | +| [Start Index][StartIndex Property] | `($)StartIndex`, with value `0` | `($)StartIndex` is a variable of type [Int32][] | +| [End Index][EndIndex Property] | `($)EndIndex`, with value `3` | `($)EndIndex` is a variable of type [Int32][] | + +#### Result + +`"A"` is at index `0` and `"D"` is at index `3` in `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. Therefore, removing all characters between (and including) start index `0` and end index `3` results in the variable `($)Text` being updated to the following: + +```json +"EFGHIJKLMNOPQRSTUVWXYZ" +``` + +*** + +### Remove text where Start Index is greater than End Index + +This example will remove all characters between start index `3` and end index `0` of `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"` | `($)Text` is a variable of type [String][] | +| [Start Index][StartIndex Property] | `($)StartIndex`, with value `3` | `($)StartIndex` is a variable of type [Int32][] | +| [End Index][EndIndex Property] | `($)EndIndex`, with value `0` | `($)EndIndex` is a variable of type [Int32][] | + +#### Result + +In this example the start index `3` is greater than the end index `0`. When this occurs, the block simply swaps the indexes before it processes the text. + +Therefore, having start index `3` and end index `0` is the same as having start index `0` and end index `3`. + +`"A"` is at index `0` and `"D"` is at index `3` in `"ABCDEFGHIJKLMNOPQRSTUVWXYZ"`. + +Therefore, removing all characters between (and including) start index `3` and end index `0`, or start index `0` and end index `3`, results in the variable `($)Text` being updated to the following: + +```json +"EFGHIJKLMNOPQRSTUVWXYZ" +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to remove the text from. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [InputOutput][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Start Index + +The [Start Index][StartIndex Property] used to remove the text. This is an inclusive index, which means the character at the specified index will be included. + +For information about what an index is, please see [Indexes][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `0` | + +### End Index + +The [End Index][EndIndex Property] used to remove the text. This is an inclusive index, which means the character at the specified index will be included. + +For information about what an index is, please see [Indexes][]. + +| | | +|--------------------|---------------------------| +| Data Type | [Int32][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `0` | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [PropertyValueOutOfRangeException][] | Thrown when [Text][Text Property] is `null` or empty (i.e. `""`). | +| | Thrown when [Start Index][StartIndex Property] or [End Index][EndIndex Property] is less than zero or greater than the length of [Text][Text Property] - `1`. | + +## Remarks + +### Start Index and End Index are inclusive + +The [Start Index][StartIndex Property] and [End Index][EndIndex Property] properties are both inclusive [indexes][Indexes], which means the characters at those indexes will be included in the removed text. + +### Start Index greater than End Index + +[Start Index][StartIndex Property] can be greater than [End Index][EndIndex Property]. If this is the case, the values of the indexes will be swapped. See [Example][StartIndexGreaterThanEndIndex Example] above. + +### Immutable String data type + +The [String][] data type used to represent [Text][Text Property] is immutable, which means it is read-only and cannot be changed once created. + +To overcome this, this block creates a new [String][] which has the text removed between the specified [Start Index][StartIndex Property] and [End Index][EndIndex Property], and re-assigns it to the variable specified in the [Text][Text Property] property. + +[Text Property]: {{< ref "#text" >}} +[StartIndex Property]: {{< ref "#start-index" >}} +[EndIndex Property]: {{< ref "#end-index" >}} + +[StartIndexGreaterThanEndIndex Example]: {{< ref "#remove-text-where-start-index-is-greater-than-end-index" >}} + +[Indexes]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Collections.Indexes.MainDoc" >}} +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[PropertyValueOutOfRangeException]: {{< url path="Cortex.Reference.Exceptions.Common.Property.PropertyValueOutOfRangeException.MainDoc" >}} + +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/split-text/_index.md b/content/en/docs/2023.9/Reference/Blocks/Text/split-text/_index.md new file mode 100644 index 000000000..498cf5969 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/split-text/_index.md @@ -0,0 +1,5 @@ +--- +title: "Split Text" +linkTitle: "Split Text" +description: "Split text (using a separator) into a list of values." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/Text/split-text/split-text-block.md b/content/en/docs/2023.9/Reference/Blocks/Text/split-text/split-text-block.md new file mode 100644 index 000000000..fe597818b --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/Text/split-text/split-text-block.md @@ -0,0 +1,244 @@ +--- +title: "Split Text" +linkTitle: "Split Text" +description: "Splits text into a list of String values, using the given separator to determine where to split." +--- + +{{< figure src="/blocks/text-split-block-icon.png" alt="Icon" class="block-icon" >}} + +# {{% param title %}} + +(Cortex.Blocks.Text.SplitText.SplitTextBlock)
+ +## Description + +Splits [Text][Text Property] into a list of [String][] [Values][Values Property], using the given [Separator][Separator Property] to determine where to split. + +[Split Options][SplitOptions Property] can be used to specify how to treat empty entries (i.e. `""`). + +## Examples + +### Split Text into a list of String Values using a pipe Separator + +This example will split the text `"Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday"` into a list of [String][] values, using the pipe separator (i.e. `"|"`) to determine where to split. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"Sunday\|Monday\|Tuesday\|Wednesday\|Thursday\|Friday\|Saturday"` | `($)Text` is a variable of type [String][] | +| [Separator][Separator Property] | `($)Separator`, with value `"\|"` | `($)Separator` is a variable of type [String][] | +| [Split Options][SplitOptions Property] | `($)SplitOptions`, with value `StringSplitOptions.None` | `($)SplitOptions` is a variable of type [StringSplitOptions][] | +| [Values][Values Property] | `($)Values`, with no value | `($)Values` is a variable that will be set to an [IList][]<[String][]> | + +#### Result + +Splitting `"Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday"` using a pipe separator (i.e. `"|"`), results in the variable `($)Values` being updated to the following: + +```json +["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] +``` + +*** + +### Split Text into a list of String Values using a comma Separator (removing empty entries) + +This example will split the text `"1,2,3,,"` into a list of [String][] values, using the comma separator (i.e. `","`) to determine where to split, and removing empty entries (i.e. `""`). + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"1,2,3,,"` | `($)Text` is a variable of type [String][] | +| [Separator][Separator Property] | `($)Separator`, with value `","` | `($)Separator` is a variable of type [String][] | +| [Split Options][SplitOptions Property] | `($)SplitOptions`, with value `StringSplitOptions.RemoveEmptyEntries` | `($)SplitOptions` is a variable of type [StringSplitOptions][] | +| [Values][Values Property] | `($)Values`, with no value | `($)Values` is a variable that will be set to an [IList][]<[String][]> | + +#### Result + +Splitting `"1,2,3,,"` using a comma separator (i.e. `","`) and removing the last 2 entries which are empty (i.e. `""`), results in the variable `($)Values` being updated to the following: + +```json +["1", "2", "3"] +``` + +*** + +### Split Text into a list of String Values using a comma Separator (keeping empty entries) + +This example will split the text `"1,2,3,,"` into a list of [String][] values, using the comma separator (i.e. `","`) to determine where to split, and keeping empty entries (i.e. `""`). + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"1,2,3,,"` | `($)Text` is a variable of type [String][] | +| [Separator][Separator Property] | `($)Separator`, with value `","` | `($)Separator` is a variable of type [String][] | +| [Split Options][SplitOptions Property] | `($)SplitOptions`, with value `StringSplitOptions.None` | `($)SplitOptions` is a variable of type [StringSplitOptions][] | +| [Values][Values Property] | `($)Values`, with no value | `($)Values` is a variable that will be set to an [IList][]<[String][]> | + +#### Result + +Splitting `"1,2,3,,"` using a comma separator (i.e. `","`) and keeping the last 2 entries which are empty but trimming, results in the variable `($)Values` being updated to the following: + +```json +["1", "2", "3", "", ""] +``` + +*** + +### Split Text into a list of String Values using a comma Separator (keeping empty entries but trimming entries) + +This example will split the text `" 1 , 2,3 ,,"` into a list of [String][] values, using the comma separator (i.e. `","`) to determine where to split, and keeping empty entries (i.e. `""`) but trimming whitespaces (i.e. `" 1 "` would become `"1"`). + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `" 1 , 2,3 ,,"` | `($)Text` is a variable of type [String][] | +| [Separator][Separator Property] | `($)Separator`, with value `","` | `($)Separator` is a variable of type [String][] | +| [Split Options][SplitOptions Property] | `($)SplitOptions`, with value `StringSplitOptions.TrimEntries` | `($)SplitOptions` is a variable of type [StringSplitOptions][] | +| [Values][Values Property] | `($)Values`, with no value | `($)Values` is a variable that will be set to an [IList][]<[String][]> | + +#### Result + +Splitting `" 1 , 2,3 ,,"` using a comma separator (i.e. `","`) and keeping the last 2 entries which are empty (i.e. `""`) but trimming whitespaces (i.e. `" 1 "`), results in the variable `($)Values` being updated to the following: + +```json +["1", "2", "3", "", ""] +``` + +*** + +### Split Text into a list of String Values using a comma Separator (removing empty entries and trimming entries) + +This example will split the text `" 1 , 2,3 ,,"` into a list of [String][] values, using the comma separator (i.e. `","`) to determine where to split, and remove any empty entries (i.e. `""`) and trimming whitespaces (i.e. `" 1 "` would become `"1"`). + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `" 1 , 2,3 ,,"` | `($)Text` is a variable of type [String][] | +| [Separator][Separator Property] | `($)Separator`, with value `","` | `($)Separator` is a variable of type [String][] | +| [Split Options][SplitOptions Property] | `($)SplitOptions`, with value `StringSplitOptions.RemoveEmptyEntries \| StringSplitOptions.TrimEntries` | `($)SplitOptions` is a variable of type [StringSplitOptions][] | +| [Values][Values Property] | `($)Values`, with no value | `($)Values` is a variable that will be set to an [IList][]<[String][]> | + +#### Result + +Splitting `" 1 , 2,3 ,,"` using a comma separator (i.e. `","`) and removing the last 2 entries which are empty (i.e. `""`) and trimming whitespaces (i.e. `" 1 "`), results in the variable `($)Values` being updated to the following: + +```json +["1", "2", "3"] +``` + +*** + +## Properties + +### Text + +The [Text][Text Property] to split into [Values][Values Property] using the given [Separator][Separator Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Text` with no value | + +### Separator + +The [Separator][Separator Property] used to determine where to split the [Text][Text Property] into the [Values][Values Property]. + +[Separator][Separator Property] can contain zero or more characters. + +The [Separator][Separator Property] is not included in the resultant [Values][Values Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [String][] | +| Property Type | [Input][] | +| Is [Advanced][] | `false` | +| Default Editor | [Literal][] | +| Default Value | `,` | + +### Split Options + +[Split Options][SplitOptions Property] used to specify how to treat empty entries (i.e. `""`). + +Currently supported values for the [Split Options][SplitOptions Property] property are: + +* StringSplitOptions.None (Default) - empty entries and trailing or leading whitespaces (at the start or end of text) are included in [Values][Values Property]. +* StringSplitOptions.RemoveEmptyEntries - empty entries are excluded from [Values][Values Property]; trailing or leading whitespaces (at the start or end of text) are included. +* StringSplitOptions.TrimEntries - trailing or leading whitespaces (at the start or end of text) are excluded from [Values][Values Property]; empty entries are included. + +It's also possible to combine `StringSplitOptions` in the [Expression Editor][Expression]. The example below shows how to remove empty entries and trim entries: + +```csharp +StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries +``` + +| | | +|--------------------|---------------------------| +| Data Type | [StringSplitOptions][] | +| Property Type | [Input][] | +| Is [Advanced][] | `true` | +| Default Editor | [Literal][] | +| Default Value | `None` | + +### Values + +The resultant [Values][Values Property] containing an entry for each piece of split text in the order they are defined in [Text][Text Property]. + +| | | +|--------------------|---------------------------| +| Data Type | [IList][]<[String][]> | +| Property Type | [Output][] | +| Is [Advanced][] | `false` | +| Default Editor | [Variable][] | +| Default Value | `($)Values` with no value | + +## Exceptions + +The exceptions thrown by the block can be found below: + +| Name | Description | +|----------|----------| +| [ArgumentException][] | Thrown when [Split Options][SplitOptions Property] is not one of the specified [StringSplitOptions][] types (e.g. `(StringSplitOptions)10`). | + +## Remarks + +### Null or empty Text + +If [Text][Text Property] is `null` or empty (i.e. `""`), then `null` or empty (i.e. `""`) respectively is added as the only entry to [Values][Values Property]. + +### Null or empty Separator + +If [Separator][Separator Property] is `null` or empty (i.e. `""`), the value of the variable specified for the [Text][Text Property] property is added as the only entry to [Values][Values Property]. + +### Separator not found + +If the [Separator][Separator Property] is not found in [Text][Text Property], the value of the variable specified for the [Text][Text Property] property is added as the only entry to [Values][Values Property]. + +[Values Property]: {{< ref "#values" >}} +[Separator Property]: {{< ref "#separator" >}} +[SplitOptions Property]: {{< ref "#split-options" >}} +[Text Property]: {{< ref "#text" >}} + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} + +[ArgumentException]: {{< url path="MSDocs.DotNet.Api.System.ArgumentException" >}} + +[IList]: {{< url path="Cortex.Reference.DataTypes.Collections.IList.MainDoc" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} + +[StringSplitOptions]: {{< url path="Cortex.Reference.DataTypes.Text.StringSplitOptions.MainDoc" >}} + +[Literal]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.LiteralEditor.MainDoc" >}} +[Variable]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.VariableEditor.MainDoc" >}} +[Expression]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.PropertyEditors.ExpressionEditor.MainDoc" >}} + +[Advanced]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.AdvancedProperties.MainDoc" >}} + diff --git a/content/en/docs/2023.9/Reference/Blocks/_index.md b/content/en/docs/2023.9/Reference/Blocks/_index.md new file mode 100644 index 000000000..321f178f6 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/_index.md @@ -0,0 +1,6 @@ +--- +title: "Blocks" +linkTitle: "Blocks" +description: "This section includes all reference documentation for functional blocks." +weight: 10 +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/data-storage/_index.md b/content/en/docs/2023.9/Reference/Blocks/data-storage/_index.md new file mode 100644 index 000000000..1ec60a4e9 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/data-storage/_index.md @@ -0,0 +1,5 @@ +--- +title: "Data Storage" +linkTitle: "Data Storage" +description: "Blocks related to working with Data Storage." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/data-storage/create-collection/_index.md b/content/en/docs/2023.9/Reference/Blocks/data-storage/create-collection/_index.md new file mode 100644 index 000000000..7d76634a0 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/data-storage/create-collection/_index.md @@ -0,0 +1,5 @@ +--- +title: "Create Collection" +linkTitle: "Create Collection" +description: "Create a data storage collection." +--- diff --git a/content/en/docs/2023.9/Reference/Blocks/data-storage/create-collection/create-collection-block.md b/content/en/docs/2023.9/Reference/Blocks/data-storage/create-collection/create-collection-block.md new file mode 100644 index 000000000..bc6739994 --- /dev/null +++ b/content/en/docs/2023.9/Reference/Blocks/data-storage/create-collection/create-collection-block.md @@ -0,0 +1,133 @@ +--- +title: "Create Collection" +linkTitle: "Create Collection" +description: "Create a data storage collection." +--- +{{