# CloudIO Platform Documentation 3.0

The CloudIO platform is an application development suite with which you can easily build applications efficiently, as per your business requirement, using only minimal or at times, no coding.

For your required application, you can create a data model, design a user interface, and define behaviour for the individual elements of your application. You can even customize the behaviour for the components using minimal coding.

The prominent features of the CloudIO platform:

* **Zero/minimal coding**: Easily extendable UI that can connect to any database (On-premise/Cloud) in real-time
* **Pre-built connectors**: Connect to popular data sources and cloud applications like Oracle EBS/Cloud and Salesforce
* **User**-**friendly interface:** Organize your application-building process by using the visual environment of the CloudIO platform where you can drag and drop your application components and define their properties
* **Customization**: Write custom transformations for business processes


# Platform Installation


# Pre-requisites

## Hardware (Minimum Requirements)

* Quad Core - 64 Bit Linux Server/VM with Oracle Linux, RedHat or CentOS
* 16GB RAM
* 100 GB disk space

## Software

* Linux user credentials (e.g. username: tomcat)
* Java 1.8+ (This is a licensed version)
* J2EE Containers like Tomcat, WebLogic and so on with JDK 1.8 support&#x20;
* ImageMagick  ***Note**: Refer* <http://www.imagemagick.org/> *for more information*
* Google Chrome 85.0.4183.121

## Database

* A metadata schema to operate either on MYSQL/Oracle ***Note:** Please refer to* [*Configuring the database*](/setting-up-the-cloudio-platform/platform-installation/configuring-the-database) *for information on the schema configurations.*

## Email Setup

* SMTP Details like SMTP Host Name, User Name, Password, Port, and so on.

{% hint style="info" %}
*You can use any SMTP servers like Gmail, Hotmail, or Yahoo to send out the emails from the platform.*
{% endhint %}


# Configuring the database

The database configuration for the **CloudIO** **Platform** installation can be done using the following database management systems:

* Oracle
* MySQL

{% hint style="info" %}
Make sure to change the USER/TABLESPACE names with appropriate values before running the scripts.
{% endhint %}


# Configuring the Oracle database

{% hint style="info" %}
To install platform using Oracle database, we need to create the following two schemas:

* xxcloudio for the platform objects
* xxapps for the custom application object
  {% endhint %}

1. Create a database schema xxcloudio for the platform objects and grant appropriate privileges as shown in the script.

```
CREATE USER xxcloudio IDENTIFIED BY xxcloudio
DEFAULT TABLESPACE USERS
TEMPORARY TABLESPACE TEMP
PROFILE DEFAULT QUOTA UNLIMITED ON USERS;

GRANT CREATE JOB TO xxcloudio;
GRANT CREATE MATERIALIZED VIEW TO xxcloudio;
GRANT CREATE PROCEDURE TO xxcloudio;
GRANT CREATE SEQUENCE TO xxcloudio;
GRANT CREATE SESSION TO xxcloudio;
GRANT CREATE SYNONYM TO xxcloudio;
GRANT CREATE TABLE TO xxcloudio;
GRANT CREATE VIEW TO xxcloudio;
GRANT CREATE TRIGGER TO xxcloudio;
GRANT CREATE TYPE TO xxcloudio;
GRANT EXECUTE ON DBMS_LOB TO xxcloudio;
GRANT EXECUTE ON DBMS_SESSION TO xxcloudio;
GRANT EXECUTE ON DBMS_APPLICATION_INFO TO xxcloudio;
GRANT CONNECT TO xxcloudio;
GRANT RESOURCE TO xxcloudio;

ALTER USER xxcloudio DEFAULT ROLE NONE;
```

1. Create a database schema xxapps for custom application objects

   and grant appropriate privileges as shown in the script.

```
CREATE USER xxapps IDENTIFIED BY xxapps
DEFAULT TABLESPACE USERS
TEMPORARY TABLESPACE TEMP 
PROFILE DEFAULT QUOTA UNLIMITED ON USERS;

GRANT CREATE JOB TO xxapps;
GRANT CREATE MATERIALIZED VIEW TO xxapps;
GRANT CREATE PROCEDURE TO xxapps;
GRANT CREATE SEQUENCE TO xxapps;
GRANT CREATE SESSION TO xxapps;
GRANT CREATE SYNONYM TO xxapps;
GRANT CREATE TABLE TO xxapps;
GRANT CREATE VIEW TO xxapps;
GRANT CREATE TRIGGER TO xxapps;
GRANT CREATE TYPE TO xxapps;
GRANT EXECUTE ON DBMS_LOB TO xxapps;
GRANT EXECUTE ON DBMS_SESSION TO xxapps;
GRANT EXECUTE ON DBMS_APPLICATION_INFO TO xxapps;
GRANT CONNECT TO xxapps;
GRANT RESOURCE TO xxapps;

ALTER USER xxapps DEFAULT ROLE NONE;
```

1. If you are using the Oracle EBS 12.2 or above, ensure that the

   XXAPPS schema is enabled. You can enable the schema using the

   following commands:

```
sqlplus "/as sysdba" a
alter session set current_schema=APPS;
exec AD_ZD_PREP.ENABLE_CUSTOM_USER('XXAPPS');
```

{% hint style="info" %}
**Note**\
The database administrator must open the DB Listener Port to  provide access from the Tomcat Server for the application connectivity.
{% endhint %}


# Configuring the MySQL database

1. Create databases for the platform and the application. &#x20;

E.g.: The following command is used to create the database xxcloudio:

```
create database xxcloudio;
```

&#x20;  2\. Create a user to access the databases.

E.g.: The following command is used to create a user for the database xxcloudio:

```
create user xxcloudio@localhost IDENTIFIED BY PasswordForUser;
```

{% hint style="info" %}
**Note**

If you want to access this remotely, then replace localhost with '%'
{% endhint %}

&#x20;3\. Grant the user privileges required to work with the databases.&#x20;

E.g.: The following command is used to grant the user privileges for the database xxcloudio:

```
grant all privileges on xxcloudio.* to xxcloudio_qa@localhost
```

{% hint style="info" %}
**Note**

If you want to give access to all the databases, then replace Database with \*. If you want to give access to all the tables of database, then replace Table with \*.

E.g.: The following command is used to grant the users, the privileges to all the databases and tables.

*"grant all privileges on \*.\* to 'xxcloudio\_qa'@'%"*
{% endhint %}


# Installing JDK

1. Download Java 8 (JDK 8) with the following command: wget <http://download.oracle.com/otn-pub/java/jdk/8u161-b12/2f38c3b165be4555a1fa6e98c45e0808/jdk-8u161-linux-x64.tar.gz> **OR** wget  --no-cookies --no-check-certificate <https://jdk.java.net/>
2. Extract jdk1.8.0\_160 from the Java zip file using the following command: tar-xvf \<java zip file>.


# Installing the servers

For the installation of the CloudIO platform, you must install one of the following two servers:

1. Tomcat server
2. JBoss (Wildfly) server

{% hint style="info" %}
To obtain the latest WAR and license key, contact your CloudIO sales representative to get access to the CloudIO Customer Portal.
{% endhint %}


# Installing and configuring the Tomcat server

1. Install the Tomcat server using the following commands:

```
wget http://www-eu.apache.org/dist/tomcat/tomcat-8/v8.5.28/bin/apache-tomcat-8.5.28.tar.gz
tar - xvf apache-tomcat-8.5.28.tar.gz
mv apache-tomcat-8.5.28 tomcat8
```

&#x20;2\. Configure Java and Tomcat using the following steps:

a. Go to \<tomcat home>/bin.

b. In the Catalina.sh file, enter the following commands:

```
export JAVA_HOME= <jdk home>/jdk1.8.x
CATALINA_OPTS="$CATALINA_OPTS -XX:MaxPermSize=512m -Xms4096m -Xmx4096m"
CATALINA_PID= <tomcat home>/bin/catalina.pid
```

{% hint style="danger" %}
The values passed for *"CATALINA\_OPTS"* will vary based on the memory allocation.
{% endhint %}

{% hint style="warning" %}
Under <$TOMCAT\_HOME>/conf/, in the Server.xml file, do not change the default values for maxThreads and minSpareThreads (200 and 10 respectively).
{% endhint %}

&#x20;3\. Under the $TOMCAT\_HOME/lib folder, create a file **log4j.properties** containing the following code:

```
# Global logging configuration
log4j.rootLogger=warning, R
log4j.logger.com.rapapp.platform.server=error
log4j.logger.com.rapapp.platform.server.script=error
log4j.logger.com.rapapp.platform.server.rest=error
log4j.logger.com.ibatis=error
log4j.logger.java.sql=error
log4j.logger.org.quartz=error
log4j.logger.org.apache=error
log4j.logger.org=error
log4j.logger.com.rapapp.platform.installer=error
log4j.logger.io.cloudio=error
# Console output
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{DATE} %5p %c{1}:%L - %m%n
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=../logs/ra.log
log4j.appender.R.MaxFileSize=10240KB
log4j.appender.R.MaxBackupIndex=10
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d{DATE} %5p %c{1}:%L - %m%n
```

&#x20;4\. Go to $TOMCAT\_HOME/Conf/ and in the server.xml file, enable

compression using the following lines of code:

```
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
compression="on" compressionMinSize="8192" useSendfile="false" compressableMimeType="text/html,text/xml,text/plain,text/css,text/javascript,application/javascript"
redirectPort="8443" />
```

{% hint style="warning" %}
If useSendfile is set to ‘false’, then any compression that Tomcat may have otherwise performed on the response will be disabled.
{% endhint %}

&#x20;5\. Deploy the WAR file using the following steps:

* Run the following command: *cd tomcat8/webapps/*
* Backup the existing WAR file, if any, and delete it.
* Move the CloudIO WAR file into the webapps folder and rename it as ROOT.war.
* Run the following command: *cd $TOMCAT\_HOME/bin/*
* Start the Tomcat server using the following command: *./startup.sh*


# Installing and configuring the JBoss (WildFly) server

## Pre-requisites

Java (compatible with WildFly version)

## Downloading WildFly

{% hint style="info" %}
CloudIO platform is compatible with WildFly 11 and lower versions.
{% endhint %}

1. Go to <http://wildfly.org/downloads/> and download WildFly Application Server 11 or lower versions.
2. Extract the contents of the zip file to a directory on your system. ***Note**: The path must not contain any spaces.*
3. Start the WildFly server using the script:  *\<WildFly directory>\bin\standalone.sh.*
4. To check the installation, access the web server at [http://localhost:8080](http://localhost:8080/).


# Setting up the JBOSS server

Setting JBOSS\_HOME

1. Set the env variable JBOSS\_HOME. $ export JBOSS\_HOME = path to jboss
2. Check the exported path using the following command. *$ echo $JBOSS\_HOME*

## Accessing the WildFly administration console

1. From the command line, navigate to WildFly’s bin directory.
2. Run the jboss-cli.sh script with the --connect optio&#x6E;**.** *./jboss-cli.sh --connect*

## Creating a management user

1. To open the administration console, go to <http://localhost:9990/console>.
2. From the instructions displayed in the console, create a management user.
3. Go to the bin folder and run the following command: *# add-user.sh*
4. Follow the instructions on the console to create the management user.

## Managing the server using a web interface

**WildFly** provides an option to access the application server from a web-based console.

* By default, the **WildFly** administration console can be accessed at <http://localhost:9990/console.>
* You can sign in using the management user you have created.

![WildFlly Application Server](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-IxZBwAi3I5pyBk8vs%2F-M-J14MGX_WtIo-NIrSk%2FManaging%20the%20server%20using%20a%20web%20interface.png?alt=media\&token=d5d3278b-c041-4523-82ee-26a723dac80a)


# Deploying the WAR file

## Deploying the WAR file in standalone mode

1. Login to the console with the credentials of the management user. &#x20;

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-J2pqdc5vUFPxjfcr9%2F-M-J2x-8nwUb5L4RytCV%2Fdeployment%20the%20WAR%20file.png?alt=media\&token=48c6210c-7b99-474c-8dd3-826ef1753694)

&#x20;2\. Click **Deployments**.

&#x20;3\. To add the ROOT.war file, click **Add**.

&#x20;4\. Upload the required WAR file.

&#x20;5\. In the **Verify Deployments** screen, verify the name and runtime name of your WAR file.&#x20;

**Note:** Do not select the Enable checkbox.

&#x20;6\. Access your application using [http://localhost:8080](http://localhost:8080/).

![Create deployment ](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-J2pqdc5vUFPxjfcr9%2F-M-J3a872SBaBDLJkaxe%2Fdeployment.png?alt=media\&token=60461af8-7df0-4df9-ae44-262d5d630458)

{% hint style="info" %}
Change the RAM size in standalone.conf file in the bin folder in case of any memory issue.
{% endhint %}

## Deploying the CloudIO WAR file

1. Create a folder named cloudio using the following command: *\*\*$ mkdir /cloudio*
2. Deploy the WAR file. After installing the platform, the io.properties file is auto-generated in the cloudio folder.
3. Paste the log4j.properties file in cloudio folder.
4. Update the log4j file with valid log file path and paste it in tomcat's lib folder.
5. Restart **WildFly**

```
log4j.rootLogger=debug, R
log4j.logger.com.rapapp.platform.server=debug
log4j.logger.com.rapapp.platform.server.script=debug
log4j.logger.com.rapapp.platform.server.rest=debug
log4j.logger.com.ibatis=debug
log4j.logger.java.sql=debug
log4j.logger.org.quartz=debug
log4j.logger.org.apache=debug
log4j.logger.org=debug
log4j.logger.com.rapapp.platform.installer=debug
log4j.logger.io.cloudio=debug
# Console output
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{DATE} %5p %c{1}:%L - %m%n
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=<log_file_path>
# Ex: /u02/tomcat_home/workers12/worker1/logs/io.log
log4j.appender.R.MaxFileSize=10240KB
log4j.appender.R.MaxBackupIndex=10
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d{DATE} %5p %c{1}:%L - %m%n
```


# Setting up the Worker/Apache cluster

## Pre-requisites

The **ROOT** user must execute the following commands:

```
yum install httpd-devel
yum install gcc
yum install libtool
yum install openssl-devel.x86_64
yum install apr
yum install apr-devel
yum install ImageMagick
```


# Setting up the essentials as a non-ROOT user

{% hint style="warning" %}
You must be logged in as a normal user to setup the required configuration.
{% endhint %}

## Installing the Apache HTTP server

1. Open the URL: <http://httpd.apache.org/download.cgi#apache22> and

   download **Apache HTTP Server 2.2.31** source distribution (httpd-

   2.2.31.tar.gz).

{% hint style="info" %}
Apache 2.4+ versions are not compatible with the latest Mod\_JK Tomcat connectors. Hence, Apache 2.2+ versions are preferred. If you would like to explore using 2.4+ versions, please refer to fixes suggested by Jonathan\_Morgan in <https://forums.adobe.com/thread/1318544>.
{% endhint %}

&#x20;2\. Unzip the file in the stage location:

```
gunzip -d httpd-2.2.31.tar.gz
tar xvf httpd-2.2.31.tar
```

&#x20;3\. Build the binaries from the source.

```
./configure --prefix=/ua1001/cloudio/apache
make
make install
```

{% hint style="info" %}
Prefix specifies the custom directory **PREFIX** where the Apache HTTPD is to be installed.
{% endhint %}

&#x20;4\. Open the Apache config file and edit the port number as required.

```
/conf/httpd.conf
```

&#x20;5\. Start the server as a non-ROOT user.

```
PREFIX/bin/apachectl -k start
```

&#x20;6\. Open the URL: <http://httpd.apache.org/download.cgi#apache22> to verify Apache Test Page is accessible.

&#x20;7\. Shutdown Apache.

```
PREFIX/bin/apachectl -k stop
```

{% hint style="info" %}
If the prefix is not given, then the server is installed in the usr/apache system directory.
{% endhint %}


# Installing the Tomcat connectors

1. Go to [http://apache.osuosl.org/tomcat/tomcatconnectors/jk/tomcat-connectors-1.2.41-src.tar.gz](http://apache.osuosl.org/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.41-src.tar.gz) > <http://tomcat.apache.org/download-connectors.cgi> and download the Tomcat connectors (*tomcat-connectors-1.2.41-src.tar.gz*).
2. Unzip the file in the stage location.

```
gunzip –d tomcat-connectors-1.2.41-src.tar.gz
tar xvf tomcat-connectors-1.2.41-src.tar
cd tomcat-connectors-1.2.41-src/native
```

&#x20;3\. Build the binaries from the source.

```
./configure -with-apxs=/usr/sbin/apxs
make
make install
```

&#x20; 4\. Copy mod\_jk.so file from *tomcat-connectors-1.2.41-src/native/apache-2.0 directory to /ua1001/cloudio/apache/modules/ directory.*

```
cp tomcat-connectors-1.2.41-src/native/apache-2.0/mod_jk.so /ua1001/cloudio/apache/modules/
```


# Installing the Tomcat native library

The Tomcat Native Library is a component that allows you to access the **Apache Portable Runtime** (APR).

1. Navigate to <http://download.nextag.com/apache/tomcat/tomcat-> > <http://tomcat.apache.org/download-native.cgi> and download connectors/native/1.1.33/source/tomcat-native-1.1.33-src.tar.gz.
2. Unzip the file in stage location using:

```
tar xvzf tomcat-native-1.1.33-src.tar.gz
cd tomcat-native-1.1.33-src/jni/native
```

&#x20;3\. Build binaries from the source.

```
./configure --with-apr=$HOME/APR \
--with-java-home=$JAVA_HOME \
--with-ssl=$HOME/OPENSSL \
--prefix=$CATALINA_HOME
E.g.
./configure --with-apr=/usr/bin/apr-1-config --with-java-home=/ua1001/cloudio/java/jdk1.7.0_79 --with-
ssl=/usr/include/openssl --prefix=/usr/lib64
make
make install
cd /usr/lib64
ln -s lib/libtcnative-1.so.0.1.22 libtcnative-1.so
ln -s lib/libtcnative-1.so.0.1.22 libtcnative-1.so.0
```

## Installing Tomcat Server

Refer [Installing and configuring the Tomcat Server](/setting-up-the-cloudio-platform/platform-installation/installing-the-servers/installing-and-configuring-the-tomcat-server).


# Configuring the setup

1. Update the */ua1001/cloudio/apache/conf/httpd.conf* file with the *mod\_jk* connector module information.

```
LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogFile logs/jk.log
JkLogLevel error
JkMount /* router
JkMount /jk_status status
```

{% hint style="success" %}
The Apache configuration reads the worker.properties file to obtain the list of Tomcat servers associated with it and to load the balance based on the priority assigned. All the Tomcat servers that are to be added to the worker setup should be listed as workers using the AJP port in the Tomcat\_Home/conf/server.xml file.
{% endhint %}

&#x20;2\. If the platform version is 2.4 Fusion, update the *httpd.conf file* for code compression at worker level.

```
<IfModule mod_mime.c>
AddType application/javascript .js
AddType text/css .css
</IfModule>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/css text/html text/plain text/xml application/javascript
<IfModule mod_setenvif.c>
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
</IfModule>
```

&#x20;3\. Create */ua1001/cloudio/apache/conf/workers.properties* file with the content listed below

```
worker.list=router,status

worker.worker1.port=8109
worker.worker1.host=localhost
worker.worker1.type=ajp13
worker.worker1.lbfactor=1
worker.worker1.sticky_session=0

worker.worker2.port=8209
worker.worker2.host=localhost
worker.worker2.type=ajp13
worker.worker2.lbfactor=1
worker.worker2.sticky_session=0

worker.worker3.port=8309
worker.worker3.host=localhost
worker.worker3.type=ajp13
worker.worker3.lbfactor=1
worker.worker3.sticky_session=0

worker.router.type=lb
worker.router.balance_workers=worker1,worker2,worker3

worker.status.type=status
```

&#x20;4\. Start all the Tomcat instances using the following commands:

```
cd $TOMCAT_HOME/bin
./startup.sh
```

&#x20;5\. Start the Apache server using the following command:

```
PREFIX/bin/apachectl -k start
```

&#x20;6\. While the Tomcat instances are running, open the console and confirm access to the CloudIO application.


# Launching the installer

1. Open ports 80 and 443 (Tomcat/Web server Port) through the firewall, if any.
2. Enter hostname.com in the DNS pointing to the application server where the platform WAR is deployed. Example: docs.cloudio.io
3. Restart the server.
4. Launch the CloudIO Platform through your browser to access the CloudIO Installer.
5. Launch the CloudIO installer, and fill the required details to complete the installation process.

{% hint style="info" %}
In case of a worker environment, the installation must be done using a single Tomcat port.
{% endhint %}


# Installing the CloudIO platform

## Prerequisites

Obtain the license key from the CloudIO support team through the customer portal before installing the platform.

The following details must be sent to the CloudIO support team to obtain the license key:

* License start date
* Serial number of the machine

## Installing the platform

### Launch the installer

1. Launch the installer and click **Continue**. The **Setup Application URL** page is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-T4F52igVTcpMRgz4y%2F-M-TAoOCLcq286iVaNfg%2Fstep%201.png?alt=media\&token=50ddbff8-b037-4670-bf35-05fb88ab4e0e)

### Validate License&#x20;

2\. Upload the Activation/License file obtained from CloudIO support team.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-TB-Hcc5lkRLD6YBCX%2F-M-TFUHXgCM5yVhLmqXW%2FStep%202.png?alt=media\&token=003871e6-064d-4db5-9121-7f28fcf67306)

### Setup Application URL&#x20;

3\. Enter the following details in the **Setup Application URL** page:

* **Subdomain** is the name using which you can access the application. E.g. : apps is the subdomain for <http://apps.cloudio-idc.com>
* **Email** which will serve as your login id and to which the access details will be sent.
* **New Admin Password** and **Confirm Password**

{% hint style="info" %}
All fields in the Setup Application URL page are mandatory.
{% endhint %}

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-TB-Hcc5lkRLD6YBCX%2F-M-TG6Pa-dNbbMGHE8c0%2FStep%203.png?alt=media\&token=ff53bc6b-0bda-4a37-b146-928663ac5b23)

### **Setup Platform Schema**&#x20;

4\. Click **Continue**. The **Setup Platform Schema** page is displayed.

![Setup Platform Schema](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-TH9Sh85IaiVDtIYyv%2F-M-TKe8T0QVXhzHyDH3W%2Fstep%204.png?alt=media\&token=9b9e949e-6cfd-4ebb-8ecd-d20509ed5ce9)

&#x20;5\. Enter the following details of the **Setup Platform Schema** page:

&#x20;  **a. For Oracle database**

* From the **Database Type** list, select **Oracle**.
* Enter **DB Host Name**.&#x20;
  * E.g.: server.cloudio.com
* Enter **DB Port**.&#x20;
  * E.g.: 1521
* Enter **SID/Service name**.&#x20;
  * E.g.: rapapp
* Enter **Username**. Use the username created during the platform schema creation.
  * E.g.: User Name: xxrademo
* Enter **Password**. Use the password created during the platform schema creation.
  * E.g.: Password: xxra
* Click **Continue**. The **Setup Application Schema** page is displayed.

&#x20; **b. For MySQL database**

![Setup Platform Schema for MySQL database](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-TH9Sh85IaiVDtIYyv%2F-M-TMA8q5iizUv_n6RQH%2Ffor%20MySQL%20database.png?alt=media\&token=19456d34-6c27-4774-bd3b-a8ea8e131c51)

* From the **Database Type** list, select **MySQL**.
* Enter **DB Host Name**.&#x20;
  * E.g.: 192.168.10.60
* Enter **DB Port**.&#x20;
  * E.g.: 3306
* Enter **Database name**.&#x20;
  * E.g.: xxcloudio
* Enter **Username**.&#x20;
  * E.g.: User Name: xxcloudio\qa
* Enter **Password**.&#x20;
  * E.g.: Password: xxcloudio\qa\@123
* Click **Continue**. The **Setup Application Schema** page is displayed.

### **Setup Application Schema**&#x20;

&#x20;6\. Enter the following details of the **Setup Application Schema** page.

![Setup Application Schema for Oracle database](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-TH9Sh85IaiVDtIYyv%2F-M-TNUhNrnEPStP2aUaV%2Fstep%206.png?alt=media\&token=b9f4670f-a517-43f0-9806-73d938596abb)

&#x20;**a. For Oracle database**

* From the **Database** **Type** list, select **Oracle EBS Using DBC File**.
* Enter the required **DBC File Path**. You may have to generate a new DBC file for this host. Place the DBC file under $TOMCAT\\\_HOME directory and enter its path.
* Enter **Username**. The ASADMIN user must be enabled.
* If the objects are already created, select the option - **Check this if CloudIO Objects already exists in Application Schema**
* Click **Continue**. The **Setup SMTP details** page is displayed.

{% hint style="info" %}
**Note**:&#x20;

Enabling ASADMIN : [https://docs.oracle.com/cd/E18727\_01/doc.121/e12169/T511175T517162.htm#sigig\_setupasadm\_in](https://docs.oracle.com/cd/E18727_01/doc.121/e12169/T511175T517162.htm#sigig_setupasadmin)
{% endhint %}

{% hint style="info" %}
You can also use APPS or any other Application User with 'Apps Schema Connect Role' (UMX|APPS\_SCHEMA\_CONNECT) role. If you would want to use APPS directly (instead of custom Oracle Application schema or ASADMIN), you can proceed with the default **Database Type** by providing the Username and Password.
{% endhint %}

&#x20;**b. For MySQL database**

![Setup Application Schema for MySQL database](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-TH9Sh85IaiVDtIYyv%2F-M-TOEX78wEH75qgLKmE%2Fstep%206b.png?alt=media\&token=7b8a3ead-a122-4f7d-9743-b73149133a97)

* From the **Database** **Type** list, select **MySQL**
* Enter **DB Host Name**.&#x20;
  * E.g.: 192.168.10.60
* Enter **DB Port**.&#x20;
  * E.g.: 3306
* Enter **Database name**.&#x20;
  * E.g.: xxapps
* Enter **Username**.
  * E.g.: User Name: xxcloudio\qa
* Enter **Password**.&#x20;
  * E.g.: Password: xxcloudio\qa\@123
* Click **Continue**. The **Setup SMTP details** page is displayed.

### **Setup SMTP details**&#x20;

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2CdY5Yr725FMk_dCSp%2F-M2Cdw72xNQ8O3lf75Sy%2FSet%20up%20SMTP%20details.png?alt=media\&token=b8077334-a720-4aec-b0a0-a12efa6463ff)

* In the **SMTP Host Name**, enter the Internet Service Providers (ISP) used to send the emails. E.g.: smtp.gmail.com, smtp.hotmail.com&#x20;
* In **SMTP Port**, enter the outgoing mail port. E.g.: 465&#x20;
* In **From Name**, enter the name that must appear in the sent list. E.g.: CloudIO Dev&#x20;
* In **From Email**, enter the email id which must be used to send outgoing emails. E.g.: \[<noreply@cloudio.com>]\(<https://cloudio.io/docs/noreply@cloudio.com)&#x20>;
* Select **SMTP Requires Authentication**.&#x20;
* To allow a server to accept requests to use SSL over TCP/IP from remote servers that connect anonymously, select **Enable the use of the STARTTLS command**.&#x20;
* If required, select **Requires the use of the STARTTLS command**.&#x20;
* Enter **Username** and **Password** of the outgoing email account.&#x20;
* Enter **Admin Name** and **Admin Email**.&#x20;
* Click Continue. The **Setup Profile Values** page is displayed.

### Setup Profile Values

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2CdY5Yr725FMk_dCSp%2F-M2Cf8I-yWqRuUgnT94H%2FProfile%20values.png?alt=media\&token=a7d57d49-1b42-49f8-90d4-19beee674420)

Enter the required details and click **Continue**. *All the fields are optional.*

The confirmation page is displayed and contains a path along with the schema details.

![Review profile details before proceeding](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-TH9Sh85IaiVDtIYyv%2F-M-TV-rKjtdBwK6ZAOBR%2Fsuccess%20for%20profile.png?alt=media\&token=10d25eea-e348-4546-8d0a-7dc1df60f59c)

### Install and Upgrade Tool&#x20;

Click **Install**. On completion, a success message is displayed

![Proceed to sign-in](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-TVTMeCZaT2wSNLFx6%2F-M-U2hKtm3UjstqQDvdu%2FInstaller%20installed.png?alt=media\&token=5807f29f-fda8-4d06-98d2-fc0f6302e29c)

{% hint style="info" %}
The CloudIO platform application URL is *\<subdomain>.\<hostname>*.

In case of error, an error message is displayed. You must contact the CloudIO Support through the **Customer Portal** for such issues. The install process populates the CloudIO Platform Metadata objects in xxcloudio schema and deploys the seeded platform UI patch. The log is saved in $TOMCAT\_HOME/logs and is displayed as shown below:
{% endhint %}

![Installer log](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-TVTMeCZaT2wSNLFx6%2F-M-U35BeCFZenRSOid6t%2Finstaller%20in%20action.png?alt=media\&token=c591ee57-c16a-414a-938b-a69f5918fa3e)

{% hint style="info" %}
After the completion of the installatio&#x6E;**,** [**login in to the CloudIO platform**](/setting-up-the-cloudio-platform/platform-installation/signing-in-to-the-cloudio-platfrom) and navigate to **Upgrade Tool** under the Administration role. It provides the scripts to be executed if there are any changes within the application.
{% endhint %}

1. After successful installation, click **Sign in** and login using the username admin and the password provided in step 3.
2. Move *$TOMCAT\_HOME/webapps/ROOT/WEB- INF/classes/ra.properties* file to *$TOMCAT\_HOME/lib* folder and restart the Tomcat.

{% hint style="info" %}
By default, the platform assigns the Administrator, Developer and Patch manager roles to the Admin user. You must contact the CloudIO support team for additional requirements.
{% endhint %}


# Performing post-installation activities

Enabling GZIP compression

Gzip compression is a part of post installation.

## Enabling GZip compression in Tomcat

* Navigate to {{tomcat-home}}*/conf/server.xml* file and add the following lines to the HTTP Connector configuration.

```
compression="on" useSendfile="false" 
compressableMimeType="text/css,text/javascript,application/javascript"
```

* For example, an HTTP Connector configuration with compression  enabled is described as follows:

```
<Connector port="8080" maxHttpHeaderSize="8192"maxThreads="150" minSpareThreads="25" maxSpareThreads="75"enableLookups="false" redirectPort="8443" acceptCount="100"connectionTimeout="20000" disableUploadTimeout="true"compression="on" compressionMinSize="8192"

userSendfile="false" compressableMimeType="text/css,text/javascript,application/javascript"/>
```

## Enabling GZip compression in Apache (Worker Environment)

1. Ensure that the following modules are available in&#x20;   {{apache-home}}/modules/\*
   1. mod\_deflate.so&#x20;
   2. mod\_mime\_magic.so
   3. mod\_headers.so
   4. mod\_mime.so
   5. mod\_setenvif.so
2. Add the following to {{apache-home}}*/conf/httpd.conf or cloudio.conf* depending on your configuration:

```
LoadModule deflate_module modules/mod_deflate.so
<IfModule mime_module>
AddType application/javascript .js
AddType text/css .css
</IfModule>
<IfModule deflate_module>
AddOutputFilterByType DEFLATE text/css text/html text/plain text/xml application/javascript
<IfModule mod_setenvif.c>
 BrowserMatch ^Mozilla/4 gzip-only-text/html
 BrowserMatch ^Mozilla/4\.0[678] no-gzip
 BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>
<IfModule mod_headers.c>
 Header append Vary User-Agent env=!dont-vary
</IfModule>
</IfModule>
```

{% hint style="info" %}
If compression is enabled in Apache, then compression in Tomcat is not required.
{% endhint %}


# Signing in to the CloudIO platform

{% hint style="info" %}
If you’re a new user, you need to contact your administrator for your user credentials. The administrator will create a user and add the required roles as requested, and send your user credentials on your email id.
{% endhint %}

1. Launch the CloudIO platform URL.
2. Enter Login and Password.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M0wHMIC3khAz6QdfNeN%2F-M0wItYfcDdD_rZFCh5K%2FSign%20In.png?alt=media\&token=f7b27481-389d-423a-925c-8903aa833e08)

&#x20;3\. Click **Sign-In**.

The homepage, as configured by the administrator, is displayed.

{% hint style="info" %}
If you’re logging in for the first time, you’ll be directed to the **Change Password** page where you must update the password.
{% endhint %}


# Signing out of the CloudIO platform

1. On the upper right corner of the menu bar, click on your profile icon.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M0wJGB8mDf5ofvtjCE1%2F-M0wJaKAgbNacqBRBVxL%2FClickProfileIconToChangePassword.png?alt=media\&token=82b67f66-5045-4a15-9e62-8eb6d5b2258f)

&#x20;2\. From the pop-up list, click **Sign Out**.

You are signed out of the application.


# Working with the Setup page

In the **Setup** screen, you can authenticate the user login and establish database connections while making database calls to application data.

1. Login to the CloudIO platform. The **CloudIO homepage** is displayed.
2. In the upper right corner, in the menu bar, click. The **Navigation** pane is displayed.
3. Under the Administration role, click **Setup**. The **Setup** screen is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-U5MUh7fWdkrcwVkrU%2F-M-U68Cxmg7SIPFlLFqW%2Fsetup%20page.png?alt=media\&token=7854cb65-0653-42c5-8e30-fa4ebcc653e7)

&#x20;4\. In the left navigation pane, click **General**. The **Details** page is displayed.

&#x20;5\. Enter your required contact details and in the **Authentication Provider Type** list, select the required authentication provider to validate the user login.

Currently, CloudIO Platform supports the following authentication types:

* **Native**: for user native to/created in the CloudIO Platform
* **Active Directory**: for users using LDAP authentication
* **AdPlusOracle**: for both LDAP and Oracle Apps users.
* **AdPlusNative:** for both LDAP and Native CloudIO users
* **OracleAppsLocal**: for only for Oracle Apps users
* **Oracle Internet Directory**: for only for Oracle Internal Directory users
* **Google**: for users against their Google account used at the time of sign in
* **GoogleOrOracle**: for users against their Google account or for Oracle Apps users
* **Yahoo**: for users against their Yahoo account used at the time of sign in
* **LinkedIn**: for users against their Yahoo account used at the time of sign in
* **WS02**: for logged in users against their WS authentication


# Using additional connections

By default, the platform derives application data using the application schema connection given at the time of installation. However, for some instances, the application may need to acquire data from a different database schema or a database instance.

To add additional connections,

1. In the Setup screen, in the left navigation pane, click **Connection Details**. The **Default Connection** page is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-U5MUh7fWdkrcwVkrU%2F-M-U7Djodlmz-sEBdx5i%2FCreatingAdditionalConnections.png?alt=media\&token=11f84400-8ba9-44a3-bda7-b64fbef75f22)

&#x20;2\. To add a connection, click ![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-U5MUh7fWdkrcwVkrU%2F-M-U6sn_qai5r9REBlXY%2FAddNewConnection.png?alt=media\&token=a56406bf-cd4a-4abf-bd75-448b2613e387).

The **New Connection** window is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-U5MUh7fWdkrcwVkrU%2F-M-U7KKosesPrwdReGCP%2FNew%20Connection.png?alt=media\&token=db925334-72e8-4c95-9b82-d8e06e9408ff)

&#x20;3\. Enter the required connection details and click **Save**.

The new connection details are saved and are displayed in the

**Additional Connections** section.

![Additional connections](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-U5MUh7fWdkrcwVkrU%2F-M-U7PUcDpy_ktbj8q6w%2FSavedConnections.png?alt=media\&token=d19c025e-c2a9-446e-9727-81e050c90a3d)

* In addition to this, from the Setup page, you can:
  * Change email properties
  * Apply custom styles using global CSS
  * Set the password policy for native authentication
  * Change the logo and wallpaper settings

![Additional setup connections](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-U5MUh7fWdkrcwVkrU%2F-M-U7WXt3FzM-B8jeHEX%2FAdditionalFunctions.png?alt=media\&token=72c3a03e-5c97-4a77-8e53-e7dc9e7e552e)


# Setting up live connectors

We need to setup up Live Connectors to access data from sources other than a database, that support API based CRUD operations.

To setup a Live Connector,

1. Login to the **CloudIO** platform. The **CloudIO homepage** is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-U8YRYChEcBDa7AQ1F%2F-M-U9qAvgZiX89_Lodr3%2FhomePage.png?alt=media\&token=1b7ddfff-c32a-4411-993c-49c5904aef40)

&#x20;2\. In the upper right corner, in the menu bar, click ![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-UB4EpaQqpaid4F7nL%2F-M-UBB-CB71eRqi0Vhir%2FAdministrationNavigationMenu.png?alt=media\&token=d71ea766-505b-4810-bf02-6312544ab35d) .

The **Navigation** pane is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-U8YRYChEcBDa7AQ1F%2F-M-UA0ChX912W2x1yuBd%2FNavigation%20page.png?alt=media\&token=c0ad2872-dfdd-4471-b2b0-6aab551fead9)

&#x20;3\. To setup a live connector, under **Administration**, click **Live Connectors**.

The **Live Connectors** page is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-U8YRYChEcBDa7AQ1F%2F-M-UAJDTs2TEiVzbbf6I%2FLiveConnectors.png?alt=media\&token=c722101c-e1dd-47c4-8735-1452ae6a2bec)

&#x20;4\. To setup a live connector using predefined service provider like Oracle SaaS or SFDC, open the corresponding service provider and click **Add New Connection**.

The **Setup Connection** widow is displayed. Enter the required connection details

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-U8YRYChEcBDa7AQ1F%2F-M-UA_7IgvIJUaK5VLtz%2FPre-defined%20service.png?alt=media\&token=a040c7af-5d3c-4e1a-a42a-13fba739a793)

&#x20;5\. To setup a generic REST service provider, open the generic REST service provider and click **Add New Connection**.&#x20;

The **Setup Connection** widow is displayed. Enter the required connection details

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-U8YRYChEcBDa7AQ1F%2F-M-UAegd62kMVvj4B4Fu%2FGeneric%20REST%20service.png?alt=media\&token=d59af543-39bd-4d35-b226-73cff287a7df)

&#x20;6\. To complete the configuration, update the describe API in Params JSON along with any other relevant attributes.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-U8YRYChEcBDa7AQ1F%2F-M-UAvoHGqFj89KWBfpa%2Fupdate%20API.png?alt=media\&token=fb1f63dc-2af2-4d0b-b2d6-d3750dbff660)

&#x20;7\. Copy and paste the following JSON excerpt in the **Describe JSON**.

```
{       
    "describe_api": "https://xxx.xx/{service_name}/describe",
    "root_node" : "fields",         
    "display_name": "label",        
    "column_name" :"name",      
    "data_type" : "type",       
     "primary_key" : "Id", 
    "data_length" : "length",                   
    "DOUBLE" : "percent,currency,double,int",       
    "VARCHAR2" : "string,picklist,phone,reference,ID,boolean,url,email,address,collection",          
    "DATE" :"dataTime,date"      
}
```

&#x20;8\. To create a connection, click **Submit**.


# Setting up the Active Directory

1. Login to the CouldIO platform. The CloudIO homepage is displayed
2. In the upper right corner, in the menu bar, click ![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuS4UzYNo2bSHViYUO%2F-MHuSJTelL-2aZbabaqM%2Fnavigation%2520menu.png?alt=media\&token=67018dc8-b28e-426e-ba1e-bcc8c110fef6). The **Navigation** page is displayed.
3. Under the Administration role, click **Setup**. The **Setup** screen is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M0ved3wbQfVvOQvbrKy%2F-M0w4bWQup_8U77-BIFj%2Fimage.png?alt=media\&token=a160590a-97e8-40d9-958a-40769c6dca93)

&#x20;6\. In the left navigation pane, click **General**. The **Details** pane is displayed.

&#x20;7\. Enter the required details.

&#x20;8\. Under **Authentication Provider**, from the **Authentication Provider Type** list, select **Active Directory**. The active directory details field is displayed.

&#x20;9\. Enter the following details: Provider URL and Domain

{% hint style="info" %}
You must contact your system administrator to obtain the provider URL and the domain name.
{% endhint %}

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M0ved3wbQfVvOQvbrKy%2F-M0w531DnNXSO37GuRTc%2Fimage.png?alt=media\&token=99ed82b2-7aed-4a8d-90f2-134de77e9dd9)


# Syncing roles

## Active Directory role-sync prerequisites

* The **Active Directory** roles that are required to be synced must be created in CloudIO platform.
* The role code in the CloudIO platform must be the same as in the **Active Directory**.

### For syncing the roles of the organization with the **Active Directory**, assign values to the following CloudIO profiles:

* AD\_ADMIN\_USER\_NAME
* AD\_ADMIN\_USER\_PASSWORD
* ALLOW\_AUTO\_SYNC\_AD\_GROUP\_USERS

To assign values to the profiles,

1. In the upper right corner of the CloudIO homepage, in the menu bar, click ![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M0w6hnSiH_qdk0XYOUh%2F-M0w8WNzqhFHRNGdXCRp%2FNavigationMenu.png?alt=media\&token=c5afcb54-330a-45f0-b2eb-b07a759e350c). The **Navigation** page is displayed.
2. Under the Developer role, click **Manage** **Profile Values**. The **Manage** **Profile Values** page is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M0w8kK3vlj7YjkkEkbc%2F-M0w9JY9h43z_vns8dHP%2FManage%20Profiles.png?alt=media\&token=abb13816-f69b-40ac-9f1d-32162daa121d)

&#x20;3\. Search the following profiles and set the **Org Value** for each of them:

a. AD\_ADMIN\_USER\_NAME

b. AD\_ADMIN\_USER\_PASSWORD

c. ALLOW\_AUTO\_SYNC\_AD\_GROUP\_USERS

{% hint style="info" %}
**Note: Org Value** represents the value for your company domain. For ALLOW\_AUTO\_SYNC\_AD\_GROUP\_USERS, the value must be set to **Y.**
{% endhint %}

&#x20;4\. Click **Save.**

### To sync **Active Directory** roles

1. In the upper right corner of the CloudIO homepage, in the menu bar, click![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M0wBnyR16uhnnq0Rr8l%2F-M0wCzkavMT1IguAYzaa%2FNavigationMenu.png?alt=media\&token=941545ef-3a3d-4b5c-82c6-12381b489068)**. The Navigation** page is displayed.
2. Under the Administration role, click **Manage Roles**. The **Manage Roles** page is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M0wDFntiIG6wfhPoMjp%2F-M0wFtmNjyYrRPfnIxXp%2FManage%20Roles.png?alt=media\&token=715a7836-7a11-4040-b0ad-6a298ff1bdf3)

&#x20;3\. Click on the role to be synced with the **Active Directory**.

The role details page are displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M0wDFntiIG6wfhPoMjp%2F-M0wGG4cYtfuYq2CX3sy%2FRole%20details.png?alt=media\&token=e340acf7-27c0-491d-879d-7aa41a5f1ffd)

&#x20;4\. In the upper right corner, click **Edit**.

The Edit page is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M0wDFntiIG6wfhPoMjp%2F-M0wGbov4ocXsqubVLzi%2FEdit%20role.png?alt=media\&token=dd775e78-a896-469d-b743-b17f7ebd046a)

&#x20;5\. From the **Actions** list, select **Sync AD Role**. A confirmation box is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M0wDFntiIG6wfhPoMjp%2F-M0wGrIV3uOj6Y6qD8cU%2FSynce%20AD%20Role.png?alt=media\&token=3f0e8ba3-1c43-4768-9708-cf1ff7b4e27a)

&#x20;6\. Click **Yes**. The selected role is synced successfully.

{% hint style="info" %}
**Note:** You must not log out of the CloudIO Platform before the successful syncing of roles. If you require logging out while the syncing of roles is in progress, you must change the initial setup for the authentication provider type.
{% endhint %}


# Setting up Instance Types

## **FS (Frontend Server**)

This is preferred in cases where the platform operations are handled on the front-end.

E.g. simple excel download, upload on the client side.

If the instance type is set as "**FS**" at the io.properties or ra.properties level, the functionality which is controlled by the following profile options will be disabled. This is for making sure that all these services are not enabled when you are creating a Dev/UAT servers.

* **IS\_BULK\_IMPORT\_ENABLE** : Enables the BulkImportJobManager Job
* **ENABLE\_GOOGLE\_DRIVE\_FAIL\_OVER\_PROCESSOR** : Enables the transition of files from  RA\_FILES to Google drive
* **ENABLE\_EMAIL\_PROCESSOR** : Enables the EmailRequestJob which will get all the pending requests from email\_request table and and process the emails
* **ENABLE\_INBOUND\_EMAIL\_PROCESSOR** : Enable Inbound Email Processor
* **ENABLE\_FILE\_UPLOAD\_PROCESSOR** : Enable File Upload Processor
* **ENABLE\_OFFLINE\_STORAGE\_SCHEDULER** : Turn on/off backend scheduler for processing all the offline data transactions
* **IS\_GOOGLE\_CALENDAR\_ENABLE** : Enable the Google Calendar Job to have all the meeting scheduled google calendar
* **ENABLE\_SCHEDULE\_PROCESSOR** : Enable ScheduleServiceManager which gets all the scheduled jobs(snippets) and executes the jobs
* **ENABLE\_EXPORT\_JOB** : Will add Export excels as an asynchronous job

By default when you are setting up a new instance , instance type will not be set and it is defaulted to "**BS**" and all these services will be enabled.

## **BS (Backend Server)**

Mostly preferred in cases of asynchronous operations like Asynchronous upload and download. And actions like send email notifications, Code snippet executions and workflow operations.

### Advantages

In case of BS, these asynchronous operations are queued to get executed from the backend (from server) there by lessening the load on the client side.

{% hint style="info" %}
**Recommendation**

Always recommended to configure one BS and the rest as FS type.
{% endhint %}


# Setting up Security Best Practices

#### **I. Enable profile “ENABLE\_DEBUG” at the site level to disable the sql(where clause) in all the network calls for non admin and non developer users.**

**Impact:**

* Such information can lead  an attacker to gain advantage in the fingerprinting of the web application and can be prone to do sql injection attacks on web applications as we are able to change sql query present in api's JSON formed request body.
* Error-based SQLi is an in-band SQL Injection technique that relies on error messages thrown by the database server to obtain information about the structure of the database. In some cases, error-based SQL injection alone is enough for an attacker to enumerate an entire database.
* Error-Based SQL Injection is typically easy to exploit as it returns verbose error information when a SQL query fails such as when the syntax is incorrect. An attacker can learn the exact query being executed by the SQL server and use this information to craft malicious requests.

**Verification:**

![](https://lh4.googleusercontent.com/YWZzjDkE_G1VcSm0FufPGhHzsRZt-z5Xj6CawbWmmpqZZaWZEhhixvM4b_8h3YsJ-QK8w5-DtGphZlefJb6PafY40ljHVdhQUOz4IlwyppOuOVHjIGvdyVWAeSgJRbP_VJTi21RF)

#### **II. Weak password policy - Weak passwords can be easily guessed and are an easy target for brute force attacks. This can compromise system security.**

**Recommendation :**

* Passwords must be at least 8 characters in length.
* Password must contains below categories:&#x20;
  * At least 1 uppercase character (A through Z).
  * At least 1 lowercase character (A through Z).
  * At least 1 base 10 digits (0 through 9).
  * At least 1 non-alphabetic characters (for example: @, $, #, % etc).
* Passwords will expire every 60 day(s).&#x20;
* You can't use the last 1 password(s).&#x20;

#### **III. Enable the “Session time out” profile at the application level**

**Impact:**

* Session ID Exposure through URL - The GET request URL can be saved in the browser's history, passed through refers to other web sites, stored in web logs, or otherwise recorded in other sources. If a GET request contains sensitive information such as username, passwords, session identifiers, then attackers can use this information to launch further attacks.

#### **IV. Configure your web server to prevent information leakage from the SERVER**&#x20;

To hide Apache version add the following line to the Host section of your Apache Tomcat server.xml file

```
   <Valve className="org.apache.catalina.valves.ErrorReportValve"
    showReport="false" 
    showServerInfo="false"/>
```

**Impact:**

* The version of servers can lead to information disclosure to an intruder and can gain advantage in fingerprinting of the application.


# Building Your First Application


# Understanding the use case

The use-case for the tutorial is **Ticket Management System**.

The process-flow of the use-case is as follows:

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuNnUIjvHmkfmvJmeG%2F-MHuQVyggsYArpz0PNG6%2FUse-case_process-flow.png?alt=media\&token=735da76e-f8b8-4362-91fd-dc330badf3fb)

#### Understanding the process to build the application

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuNnUIjvHmkfmvJmeG%2F-MHuQaqaDL59QmZzSz00%2FApplication%2520Development_process%2520flow.png?alt=media\&token=2c34718a-6746-4b18-b14e-d1269684ec8b)

##


# Creating tables

Tables are mainly database objects containing the required data in a tabular form.

We have used **Oracle** **DB** to create the tables for our use-case.

List of tables and their corresponding attributes are as follows:

| **Table name**                       | **Attributes**                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **CPTM\_PRODUCT\_CUSTOMER\_MAPPING** | <p>Ticket Id</p><p>Issue Description</p><p>Ticket Type</p><p>External Ticket Number</p><p>Priority</p><p>Application Name</p><p>Application Version</p><p>Platform Version</p><p>Status</p><p>UI Component Name</p><p>Assigned To</p><p>Planned Resolution Name</p><p>Actual Resolution Name</p><p>Is Internal</p><p>Created By</p><p>Creation Date</p><p>Last Update By</p><p>Last Update Date</p><p>Customer Id</p><p>Requested By</p> |
| **CPTM\_CUSTOMER\_USER\_MAPPING**    | <p>User Id</p><p>Creation Date</p><p>Last Updated Date</p><p>Created By</p><p>Last Update By</p><p>Purpose</p><p>Customer Id</p><p>End Date</p>                                                                                                                                                                                                                                                                                          |
| **CPTM\_AVIS\_CUSOTMERS**            | <p>Account Name</p><p>Account Type</p><p>Description</p><p>Account Number</p><p>Status</p><p>Currency Code</p><p>Payment Term ID</p><p>Tax code</p><p>Attribute 1</p><p>Attribute 2</p><p>Attribute 3</p><p>Attribute 4</p><p>Attribute 5</p><p>Attribute 6</p><p>Attribute 7</p><p>Attribute 8</p><p>Attribute 9</p><p>Approver</p><p>Sales Contact</p><p>Creation date</p>                                                             |
| **CPTM\_AVIS\_LOOKUPS**              | <p>Lookup Type</p><p>Lookup Code</p><p>Meaning</p><p>Description</p><p>Created By</p><p>Creation Date</p><p>Last Updated By</p><p>Last Update Date</p><p>Start Date</p><p>End Date</p>                                                                                                                                                                                                                                                   |
| **CPTM\_AVIS\_TICKET\_SUMMARY\_V**   | <p>Customer Id</p><p>New</p><p>In Progress</p><p>Awaiting Testing</p><p>Awaiting Response</p><p>On Hold</p><p>Closed</p><p>Under Review</p>                                                                                                                                                                                                                                                                                              |

{% hint style="info" %}
*The table names can be different as per your convenience and requirements. However, the following tutorial contains the names as specified.*
{% endhint %}


# Creating datasources

Data sources are used to fetch the data from and perform DML operations (for example, insert, update, delete) on underlying database objects or cloud services.

1. In the top right corner of the menu bar, click <img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuS4UzYNo2bSHViYUO%2F-MHuSJTelL-2aZbabaqM%2Fnavigation%2520menu.png?alt=media&amp;token=67018dc8-b28e-426e-ba1e-bcc8c110fef6" alt="" data-size="original">.\
   The navigation pane is displayed.
2. Under the **Developer** role group, click **Manage Datasources**. The **Manage DataSources** page with the list of data sources is displayed.
3. In the upper right corner, click **New**.\
   &#x20;The **NewDatasource** page is displayed.
4. In the **Details** tab, under **Properties**, fill-in the following mandatory fields:
   1. **Name:** A unique name used to refer to the data source object within the application. For example: **CptmCustomers.**
   2. **Table Name:** The name of the database object containing the data; for example: **CPTM\_AVIS\_CUSTOMERS**.&#x20;
5. Click **Save**. The datasource is created and can be accessed from the **Manage** **Datasources** page.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuS4UzYNo2bSHViYUO%2F-MHuSPLPjtZnbdyczvuA%2FDatasource-table%2520name.png?alt=media\&token=8049ba49-86b4-438a-89c3-e5e6ff1127f8)

{% hint style="info" %}
*To know more about datasources, visit the* [***Working with Datasources*** ](/creating-datasources/working-with-datasources/understanding-the-cloudio-data-sources)*section.*
{% endhint %}


# Defining attribute properties

When a datasource is created using a table, the platform generates an attribute for each column in the table. You can also create an attribute manually. You can edit the properties of the attributes as per the requirement.

The data from the database is displayed in the table in the **Attributes** section.&#x20;

* To fetch all the attributes and their values from the database, in the **Attributes** tab, in the upper-right of the **actions** bar, click <img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuSRuXFwoOfU_I189Q%2F-MHuSbhxTYBWjfP6u17o%2Frefresh_attributes.png?alt=media&amp;token=2ccf9b62-957e-4afe-9a48-7af7e4388085" alt="" data-size="line">.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuSRuXFwoOfU_I189Q%2F-MHuSflXtkLSe_3rUwiQ%2Fdatasource-attributes.png?alt=media\&token=4afc55fd-d9ae-4bdb-8760-dbbc429f6951)

* The **CptmCustomers** datasource will contain the following attributes:
  * Account Name
  * Account Type
  * Account Number
  * Description
  * Status
  * Currency code
  * Payment Type ID
  * Tax code
  * Attribute 1
  * Attribute 2
  * Attribute 3
  * Attribute 4
  * Attribute 5
  * Attribute 6
  * Attribute 7
  * Attribute 8
  * Attribute 9
  * Approver
  * Sales Contact
  * Creation date

{% hint style="info" %}
*To verify the attributes of all the datasources, visit the* [***Creating tables*** ](/building-your-first-application/building-your-first-application/creating-tables)*section.*
{% endhint %}


# Assigning roles to a datasource

Datasources are secured by assigning roles with permissions for access and other operations. You can control their level of access by selecting the required permissions during the creation of datasources.

1. To assign roles to a datasource, open the **\</>Roles** tab.\
   The **Roles** pane is displayed.
2. To select a role to assign permissions, in the upper right corner of the **Roles** pane, click **Add**.\
   A row is added in the **Roles** table.
3. Under the **Role** column, from the list, select **Developer** role, to which permissions are assigned.
4. Select the following checkboxes to assign permissions to the selected role in the respective columns:

| **Permission**     | **Description**                                                                                                                                                                                |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Insert allowed** | Indicates permission to insert a new record                                                                                                                                                    |
| **Update Allowed** | Indicates permission to update an existing record                                                                                                                                              |
| **Audit Allowed**  | <p>Indicates permission to view the changes made by others from the Audit Page</p><p><strong>Note:</strong> Audit Page can be accessed from <strong>File> Record> Audit menu item</strong></p> |
| **Delete Allowed** | Indicates permission to delete an existing record                                                                                                                                              |
| **Query Allowed**  | Indicates permission to fetch data                                                                                                                                                             |
| **Primary Key**    | Select an attribute as the primary identification component of the datasource.                                                                                                                 |

&#x20;   5\. Click **Save**. The  selected permissions are assigned to the\
&#x20;       **Developer** role.

{% hint style="info" %}
*To know more about adding roles, visit the* [***Working with Roles and Users*** ](/managing-roles-and-users/working-with-roles-and-users/creating-a-role)*section*
{% endhint %}

* To view the created datasource:
  * Go to the **Manage** **Datasources** page.
  * On the left-end of the search bar, click <img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuSorefWcV_sauD839%2F-MHuSxcuPhLCP8HONsJh%2Frefresh_attributes.png?alt=media&amp;token=16d92097-bccc-413c-a175-6752313f0b62" alt="" data-size="line"> . The newly created datasource can be viewed on top of the list of existing datasources.

For the tutorial, we have created individual data sources for the tables created.

* Repeat these steps to create data sources and add attributes for all the required tables.
* *List of t**ables mapped to the corresponding datasource** for the tutorial are as follows:*

| **Datasource name**        | **Table name**                   |
| -------------------------- | -------------------------------- |
| CptmProductCustomerMapping | CPTM\_PRODUCT\_CUSTOMER\_MAPPING |
| CptmCustomerUserMapping    | CPTM\_CUSTOMER\_USER\_MAPPING    |
| CptmCustomers              | CPTM\_AVIS\_CUSTOMERS            |
| CptmLookups                | CPTM\_AVIS\_LOOKUPS              |
| CptmCustomerTickets        | CPTM\_AVIS\_CUSTOMER\_TICKETS    |
| CptmLookupTypeView         | CPTM\_CP\_LOOKUP\_TYPES\_V       |
| CptmTicketSummaryView      | CPTM\_AVIS\_TICKET\_SUMMARRY\_V  |


# Creating pages

A page is the canvas on which the user interface of the application is built. We build the user interface by placing various components on the page.

## Creating home-page

1. In the **Navigation** **menu**, under the **Developer** role, in the **Developer** group, click **Pages**. The list of all existing pages is displayed.
2. On the top-right corner, click <img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuTBKn0uPXUMKj558j%2F-MHuTPihVdYn9sDa4Mwi%2Fnew_page.png?alt=media&amp;token=e9e9a39e-55d8-4a0a-95a4-e19c555fedf8" alt="" data-size="line"> . A new page is created, and its properties are displayed.
3. Under the **Page** **Details** tab, enter the following details:

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuTBKn0uPXUMKj558j%2F-MHuTTBQKaOZRYh9AiLb%2Fpage%2520details.png?alt=media\&token=d05e4bb4-2a0b-4125-adcf-7110d2a1f710)

| **Label**    | **Description**                                                                                                                                                                                                           |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Page Name    | **cphome**                                                                                                                                                                                                                |
| Icon         | <p>Select a suitable icon for the page from the list that will be displayed in the browser tab.</p><p>By default, the page holds a desktop icon.</p>                                                                      |
| Group Header | <p><strong>Ticket Management System</strong></p><p>This is the menu group under which you can view the page in the <strong>Navigation</strong> <strong>menu.</strong></p><p><em>By default, it is My Menu Group.</em></p> |

{% hint style="warning" %}
***Page Code, Page Params, Page State, Seq No., and URL** are auto-generated. These values are used to define navigation across pages.*
{% endhint %}

&#x20;   4\. Under the **Roles** **Granted** tab, on the top-right corner, from the\
&#x20;       **Actions** list, click **Add** **Role**. A blank row is created.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuTBKn0uPXUMKj558j%2F-MHuTaIt9uRsxBFmkMvp%2Froles%2520added%2520to%2520page.png?alt=media\&token=03e1d7e6-dd51-400d-83e5-8b9281cd35c9)

&#x20;          1\. Under the **Role** column, from the list, select **Developer** role.

&#x20;          2\. Select the **Start** **Date** and the **End** **Date** to define the period\
&#x20;              for which the role has access to the page.

&#x20;     5\. On the top-right corner, click **Save**.

* To view the created page:
  * Go to the **Pages** page.
  * On the left-end of the search bar, click <img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuTBKn0uPXUMKj558j%2F-MHuTiBfQpdn2Ur7Jw9I%2Frefresh.png?alt=media&amp;token=20bad537-3a7f-4ff3-95a1-7757bab709b0" alt="" data-size="line"> . The newly created page can be viewed on top of the list of existing pages.

{% hint style="info" %}
*To know more about pages, visit the* [***Working with pages*** ](/creating-pages/working-with-pages/creating-a-page)*section.*
{% endhint %}

For the tutorial, we need to create individual pages for easy navigation.\
Repeat these steps to create multiple pages.

Pages to be created for the use-case are as follows:

* ***cphome***
* ***cpticketmgmt***
* ***LookupPage***

*The new ticket page will be automatically created as the new ticket is added to the datasource.*

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuTBKn0uPXUMKj558j%2F-MHuTrr9rQr7AxAellWE%2FPages%2520in%2520navigation%2520menu.png?alt=media\&token=2546b3c7-4c5e-4c45-8431-b32444a0e17c)

## Accessing the home-page

You can add various components to make the page interactive and user-friendly.

To add components to a page:

* In the Navigation menu, under the **Developer** role, in the **Ticket Management System** group, click ***cphome***. The homepage canvas is displayed.\
  ***Note:** You can also access the page from the **Pages** page.*
* On the **Pages** page, against the application homepage entry, under the **URL** column, click the **URL** of the homepage. The application homepage canvas is displayed.

{% hint style="info" %}
*To know how to add components to a page, visit the* [***Working with page components***](/creating-pages/working-with-pages/working-with-page-components) *section.*
{% endhint %}


# Designing the user interface

You can build the user interface by placing various components on the page.

1. To design the user interface, on the menu bar, click the **Enable Developer mode** icon.\ <img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuTvxbRlL84meohYuB%2F-MHuUB7aZ6Pb1gs7ABwQ%2Fenable%2520developer%2520mode.png?alt=media&amp;token=bc79438d-f918-4196-9007-84e808ba7bdf" alt="" data-size="original">&#x20;
2. &#x20;To open the page designer, click <img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuTvxbRlL84meohYuB%2F-MHuUFF9bBSuPk9tltnw%2Fcomponent_panel.png?alt=media&amp;token=1be95d8b-eaff-44d2-860a-6d43ad075743" alt="" data-size="line">.
3. To add components, right click on the parent component. The list of all existing child components is displayed.

   <img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuTvxbRlL84meohYuB%2F-MHuUKaMIjE_SLm7Q4Zy%2Fcomponents%2520panel.png?alt=media&amp;token=791b0776-8d90-459c-b3b4-eccfadc804ed" alt="" data-size="original">&#x20;
4. Select the required component from the list.

{% hint style="info" %}
*To know how to add components to a page, visit the* [***Working with page components*** ](/creating-pages/working-with-pages/working-with-page-components)*section.*
{% endhint %}

## Adding components to the homepage

You can view that the page is already added as a component in the **Tree** tab.

1. In the page designer, right click on the **Page** component, add a **Vertical Layout Panel** component to arrange the page elements vertically in a single column.\
   *By default, the child component, **Vertical*** ***Section**, is added.*

2. Right-click on the first **Vertical** **Section** component, and add a **Card** **Wrapper** component to clearly define the sections of the page into header and body. \
   *By default, the child components, **Card Header** and **Card Body**, are added.*

   1. Right-click on the **Card Header** component, and click **Delete**. We can add the title to the page under the **Card** **Body** component.
   2. Right-click on the **Card** **Body** component and select a header component, namely **H1**.
   3. Double-click on the **H1** component, the properties tab is displayed.\
      Under **General** properties, in the **Text** field, type the required page title. For example: **Welcome to the Customer Portal!**

3. Right-click on the second **Vertical** **Section** component, and add a **Card** **Wrapper** component.

   1. In the **Properties** tab of the **Card Header** component, under **General** properties, in the **Title** field, type the required section title. For example: **Ticket Management.**\
      *The section title will be used as a placeholder to navigate to the ticket summary page.*

4. Right-click on the **Card** **Header** component, and add **Trigger On Click**.
   1. To define an action on click, right-click on the trigger and add the **Go To Page** action.
   2. In the **Properties** tab of the **Go To Page** action, under **General** properties, in the **Page State** field, type the **Page state** of the ticket summary page. \
      For example: **app.cptickets**

{% hint style="info" %}

* *To copy the **Page State** of a component:*
  * *In the **Navigation*** ***menu**, under the **Developer** role, in the **Developer** group, click **Pages**.*
  * *Under the Page column, double-click on the ticket summary page name, **cpticketmgmt.** The **Page Details** page is displayed.*
  * *Copy the value in the **Page*** ***State** field. You can use this value to navigate to the **cpticketmgmt** page canvas.*
    {% endhint %}

&#x20;   5\. To add an explanation to the section, right-click on the **Card**\
&#x20;        **Body** component, and add a **Paragraph** component.

&#x20;          1\. In the **Properties** tab of the **Paragraph** component, under\
&#x20;              **General** properties, in the **Text** field, type the required\
&#x20;              description.\
&#x20;              For example: **Create, Prioritize, and Monitor tickets**

{% hint style="info" %}
*You can change the font color and font type for the description under the **Text*** ***Style** properties.*\
&#x20;*You can also change the position of the description by changing the margin values under **Layout** properties.*
{% endhint %}

&#x20;   6\. Right-click on the **Card** **Body** component, and add a **Button**\
&#x20;       component.\
&#x20;       *By default, the **Trigger On Click** is added.*

&#x20;          &#x31;*.* In the **Properties** tab of the **Button** component, under **Label**\
&#x20;              properties, in the **Text** field, type **View Lookups**.

&#x20;          2\. Right-click on the trigger and add the **Go To Page** action.

&#x20;          3\. In the **Properties** tab of the **Go To Page** action, under\
&#x20;              **General** properties, in the **Page State** field, type the Page\
&#x20;              state of the lookup page. For example: **app.lookuppage**

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuTvxbRlL84meohYuB%2F-MHuUTQ66yPyjnFSWT6S%2Fhome%2520page-tree.png?alt=media\&token=3b67ab89-577a-4e6c-9899-531773e08052)

&#x20;   7\. On the menu bar, click <img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuTvxbRlL84meohYuB%2F-MHuU_yWcPD9ju4jxYI6%2Fsave-enable%2520developer%2520bar.png?alt=media&amp;token=a2547825-e9ae-4952-833f-1033248d4ee1" alt="" data-size="line"> . The components added to the page\
&#x20;       are saved.

&#x20;   8\. To view the page functionalities, on the menu-bar, click <img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuTvxbRlL84meohYuB%2F-MHuUcQOBeD-bY249rAB%2Fpreview_button.png?alt=media&amp;token=62fd4159-17f8-49cb-ae17-72c9625ac1ae" alt="" data-size="line"> . You\
&#x20;        can now access the page with all the defined functionalities.


# Adding components to the lookup page

Navigate to the **LookupPage** page canvas.

You can view that the page is already added as a component in the **Tree** tab.

1. Right-click on the **Page** component, and add the **Data** **Store** component.\
   You can fetch the data from the datasource that is to be displayed on the UI.
   1. In the **Properties** tab of the **Data Store** component, under **Datasource** properties, in the **Data Source** field, select the **CptmLookups** datasource.\
      By default, in the **Data Source Alias** field, an alias name for the datasource is created.\
      *You can use the alias name of the data source henceforth.*
2. Right-click on the **Page** component and add a **Card Wrapper.**
3. Change the **Card Header** title to **Manage Lookups.**\
   *Add a suitable icon for the title.*
4. Right-click on the **Card Header** and add an **Action Button** component. \
   A separate trigger is not needed for the **Action Button**, as it contains pre-defined actions.
   1. In the **Properties** tab of the **Action Button**, under **Action** properties, in the **Action** field, select **New**.
   2. In the **Data Source Alias** field, select **CptmLookupsAlias.**
   3. Under **General** properties, in the **Text** field, type **NEW.**\
      *You can select a suitable icon for the button, for example: **plus-circle.***\
      *You can also align the button by changing its margin values under **Layout** properties.*
5. Right-click on the **Action Button** and click **Duplicate.** The triggers and properties of the **Action** **Button** are copied.
   1. Change the **Title** to **SAVE**.
   2. In the **Action** field, select **Save**.
6. Duplicate the **Action Button** and change the **Title** to **DELETE**.
   1. In the **Action** field, select **Delete Selected.**
7. Right-click on the **Card Body** and add a **Vertical Layout Panel**.
   1. Right-click on the first **Vertical section** and add a **Smart Search** component.
   2. In the **Properties** tab of the **Smart Search** component, under **General** properties, in the **Data Source Alias** field, select **CptmLookupsAlias.**
   3. Right-click on the **Smart Search** component, and click **Auto Populate Attributes.**\
      The attributes of the **CptmLookups** datasource are added to the search component.\
      *You can use these attributes to search for a particular ticket. You can add, delete, or modify any of the filters added to the **Smart*** ***Search** component.*
8. Right-click on the second **Vertical section** and add a **Grid** component.
   1. In the **Properties** tab of the **Grid** component, under **DataSource** properties, select the **Use the Existing Data Source** checkbox.
   2. In the **Data Source Alias** field, select **CptmLookupsAlias**.
   3. In the **Properties** tab of the **Grid** component, under **General** properties, select the **Auto Fill Columns** checkbox.\
      *The grid will automatically take the width of the page.*
   4. Right-click on the **Grid** component, and click **Auto Populate Attributes.** The datasource attributes are automatically added to the **Grid.**\
      *You can remove any column component as per your requirement.*

      1. Add the **Checkbox Column** component to the **Grid**.\
         &#x20;This component allows you to select a particular entry and perform any of the added operations (save or delete).

      <img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuUdjxMKmUsSuV44Zt%2F-MHuV1jqnEs57ROgd_Mi%2Flookup%2520components.png?alt=media&amp;token=9dcb10f3-9f0a-4def-9759-88b3b5db4a94" alt="" data-size="original">&#x20;
9. On the menu bar, click <img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuUdjxMKmUsSuV44Zt%2F-MHuV92ezSP3rUcT1Lt7%2Fsave-enable%2520developer%2520bar.png?alt=media&amp;token=1be37942-b1c1-41d3-a001-cba317ab5bce" alt="" data-size="line"> . The components added to the page are saved.
10. To view the page functionalities, on the menu-bar, click<img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuTvxbRlL84meohYuB%2F-MHuUcQOBeD-bY249rAB%2Fpreview_button.png?alt=media&amp;token=62fd4159-17f8-49cb-ae17-72c9625ac1ae" alt="" data-size="line"> . You can now access the page with all the defined functionalities.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuUdjxMKmUsSuV44Zt%2F-MHuUnLjudvy2MvMgN3P%2Flookup%2520page.png?alt=media\&token=bdee0641-4b9f-49ac-b3ba-cdf3073cfa3c)


# Adding components to the ticket summary page

Navigate to the **cpticketmgmt** page canvas.

You can view that the page is already added as a component in the **Tree** tab.

## To add popup to the page

1. Right-click on the **Page** component and add the **Data Store** component .
   1. Add the **CptmCustomerTickets** to the **Data** **Store** component.
2. Add the following data sources to separate **Data** **Store** components:
   1. CptmCustomerUserMapping
   2. CptmCustomers
   3. CptmTicketSummaryView
3. Right-click on the first **Page** component, and add a **Card** **Wrapper** component.
4. Right-click on the first **Page** component, and add a **Popup** component.\
   *By default, the **Vertical Layout Panel** component along with its child components is added.*
5. Right-click on the **Card** **Header** component, and add a **Button** component.
   1. In the **Text** field of the **Button** component, change the title to **New** **Ticket**.
   2. In the **Icon** field, select a suitable icon from the list.\
      For example: **folder-plus**.
   3. Add the **Show** **Popup** action to the trigger.\
      The button will be used to add a new ticket to the datasource.
   4. In the **Properties** tab of the **Popup** component, under **Standard** properties, copy the value in the **Item** **ID** field.
   5. In the **Properties** tab of the **Show** **Popup** action, under **General** properties, in the **Popup Item ID** field, paste the **Item ID** of the **Popup** component.

### To add triggers to the Popup

* Right-click on the **Popup** component and add the following triggers:&#x20;
  * **Trigger After Popup Close**
  * **Trigger Before Popup Open**

1. Right-click on the **Trigger Before Popup Open** and add the **Refresh** **DataSource** action.
   1. In the **Properties** tab of the **Refresh DataSource** action, under **General** properties, in the **Target Data Source Alias** field, select **CptmCustomerTicketsAlias.**
   2. To add a new ticket to the datasource, right-click on the trigger and add the **Insert** **Record** action.
   3. In the **Properties** tab of the **Insert** **Record** action, under **General** properties, in the **Target Data Source Alias** field, select **CptmCustomerTicketsAlias.**
   4. To insert a new ticket row on top of the datasource entries, select the **Insert At Top** checkbox.
   5. To specify the mandatory ticket information columns, in the **Tree** tab, right-click on the **Insert** **Record** action, and add the **Input** component.
   6. In the **Properties** tab of the **Input** component, under **General** properties, in the **Value** **Expression** field, click. The **Expression Builder: Value Expression** dialog box is displayed.
      1. Under **Category** column, select **Datasource**.
      2. Under **Choose a Datasource Alias** column, select **CptmCustomersAlias**
      3. Under **Choose an Attribute** column, select **customerId**.
      4. Click **Submit**. The customer Id attribute of the Customers datasources is added.
   7. In the **Target Attribute** field, select **Customer** **Id**.
   8. Repeat the steps to add the following input elements:
      1. ticketType
      2. priority
      3. status
      4. requestedBy
2. Right-click on the **Trigger After Popup Close** component and add the **Refresh** **DataSource** action.
   1. In the **Properties** tab of the **Refresh DataSource** action, under **General** properties, in the **Target Data Source Alias** field, select **CptmCustomerTicketsAlias**.
   2. Expand the child components of the **Vertical Layout Panel** component, and delete the second **Vertical Section** component. Also, delete the **Scroll** **Layout** component from the first **Vertical Section** component.
3. To add text fields to the popup for ticket description, add the **Form** component to the **Vertical Section** component.
4. In the **Properties** tab of the **Form** component, under **DataSource** properties, in the **Data Source Alias** field, select **CptmCustomerTicketsAlias.**
5. Right-click on the **Form** component and add the **Text Field** component.
   1. In the **Properties** tab of the **Text Field** component, under **Label** properties, in the **Field Label** field, type **Ticket Title.**\
      This text field is for the user to add a title to the ticket.
   2. Under **Data** properties, in the **View Attribute** field, select **Title** from the list.
   3. Select the **Insert Allowed** and **Update Allowed** checkboxes.\
      *You can set the column size and change the font color and style under the **Label*** ***Style** properties. For the tutorial we have kept the column size as 12.*
   4. Add the **Text** **Field** component for the following mandatory ticket information details:
      1. Ticket Title
      2. Ticket Description
      3. Application URL
      4. Username
      5. Password\
         *Select the corresponding datasource element for each field in the **View*** ***Attribute** field.*
6. Right-click on the **Form** component and a **Button**.
   1. In the **Text** field of the **Button** component, change the title to **Create**.
   2. In the **Icon** field, select a suitable icon from the list.\
      For example: **folder-plus**
   3. Add the **Save DataSource** action to the trigger.\
      *The button will complete the action of adding the new ticket to the datasource.*
   4. In the **Properties** tab of the **Save DataSource** action, under General properties, in the **Target** **Data Source Alias** field, select **CptmCustomerTicketsAlias.**
   5. Right-click on the **Save DataSource** action, and add the **Hide** **Popup** action.\
      *This action will close the popup once the new ticket is added in the datasource.*
   6. In the **Properties** tab of the **Hide** **Popup** action, under **General** properties, in the **Popup Item ID** field, paste the **Item ID** of the **Popup** component.
7. Right-click on the **Form** component and a **Button**.
   1. In the **Text** field of the **Button** component, change the title to **Cancel**.
   2. In the **Icon** field, select a suitable icon from the list.\
      For example: **folder-minus**
   3. Add the **Hide** **Popup** action to the trigger.
   4. In the **Properties** tab of the **Hide** **Popup** action, under **General** properties, in the **Popup Item ID** field, paste the **Item ID** of the **Popup** component.&#x20;
8. On the menu bar, click <img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuUdjxMKmUsSuV44Zt%2F-MHuV92ezSP3rUcT1Lt7%2Fsave-enable%2520developer%2520bar.png?alt=media&amp;token=1be37942-b1c1-41d3-a001-cba317ab5bce" alt="" data-size="line"> . The components added to the page are saved.\
   You have successfully added components to the page header and the popup.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuVEwbkabRIGos78sW%2F-MHuVaTj7CVfWIx0chVn%2Fpopup%2520components.png?alt=media\&token=5dc8b89d-e2f2-4570-833a-13424d18a8f6)

The **cpticketmgmt** page will be used as a summary page to view the status of the available tickets in the database.

You need to add components to display and differentiate between the status of the available tickets.

## To add components to view the ticket count:

1. Right-click on the **Card** **Body** and add a **Vertical Layout Panel** component.
2. Delete the second **Vertical Section** component.
3. Right-click on the **Vertical Section** component and add a **Card Wrapper.**\
   *You can delete the **Card Header** component.*
4. Right-click on the **Card Body** and add a **Row** component.\
   *We will be creating a row with multiple columns to display the ticket statuses.*\
   *By default, a **Col** component is added to the **Row** component.*
   1. Right-click on the **Col** component and add a **Card Wrapper**.
   2. In the **Title** field, type **Open**.
   3. Right-click on the **Card Header** component and add the **Icon** component.
   4. In the **Properties** tab of the **Icon** component, under **General** properties, in the **Icon** field, select a suitable icon.\
      For example: **folder-open.**
   5. Right-click on the **Card Body** component and add a header component, namely **H1**.
   6. In the **Text** field, type 0.
   7. Right-click on the **Row** component and add **Col** components for the following ticket statuses:

| **Ticket status** | **Corresponding datasource attribute** |
| ----------------- | -------------------------------------- |
| Open              | New                                    |
| In Progress       | In Progress                            |
| Awaiting Response | Awaiting Response                      |
| In Testing        | Awaiting Testing                       |
| On Hold           | On Hold                                |
| In Review         | Under Review                           |
| Closed            | Closed                                 |

### To view the ticket details

1. Right-click on the **Card Body** and add another **Row** component.
   1. Right-click on the **Col** component and add a **Smart** **Search** component.
   2. In the **Data Source Alias** field, select **CptmCustomerTicketsAlias**.
   3. Right-click on the **Smart Search** component and click **Auto Populate Attributes.**
   4. Add another **Col** component to the row.
   5. Right-click on the **Col** component and add a button.
   6. Add the **Export Data** action to the trigger.
   7. In the **Properties** tab of the **Export Data** component, under **General** properties, from the options under **Field** **Type**, select **Excel**.\
      *You can download the ticket summary datasource table as an Excel sheet in your device.*
2. Right-click on the **Card Body** and add **Card Table** component.\
   *You can view the ticket details in a tabular form.*
   1. In the **Properties** tab of the **Card Table** component, under **DataSource** properties, in the **Data Source Alias**, select **CptmCustomerTicketsAlias.**
3. Right-click on the **Card Table** and add the **Card Table Column** component.
4. Right-click on the **Card Table Column** and add a **Paragraph** componen&#x74;**.**
   1. In the **Text** field, type **Ticket ID**.
   2. In the **View Attribute** field, select **Ticket Id.**\
      *You can change the length of the component by changing the pixels in **Max*** ***Width** field.*
5. Add separate **Card Table Column** components for each ticket details attribute.
6. Add the following child components to fill-in the **Card Table**:

| **Component**  | **Ticket details attribute** |
| -------------- | ---------------------------- |
| Paragraph      | Title                        |
| Paragraph      | Ticket Type                  |
| Paragraph      | Requested By                 |
| Row-Col        | User Picture                 |
| Row-Col        | Assigned To                  |
| Badge          | Status                       |
| Badge          | Priority                     |
| Paragraph-Date | Created On                   |
| Paragraph-Date | Update On                    |
| Paragraph      | Application Name             |
|                |                              |

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuVEwbkabRIGos78sW%2F-MHuVrw1WKFFvww6tWpD%2Fticket%2520count%2520components.png?alt=media\&token=379a898c-5b46-4f30-864d-d77dcb10beff)

&#x20;   7\. On the menu bar, click <img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuUdjxMKmUsSuV44Zt%2F-MHuV92ezSP3rUcT1Lt7%2Fsave-enable%2520developer%2520bar.png?alt=media&amp;token=1be37942-b1c1-41d3-a001-cba317ab5bce" alt="" data-size="line"> . The components added to the page\
&#x20;        are saved.

&#x20;   8\. To view the page functionalities, on the menu-bar, click <img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuTvxbRlL84meohYuB%2F-MHuUcQOBeD-bY249rAB%2Fpreview_button.png?alt=media&amp;token=62fd4159-17f8-49cb-ae17-72c9625ac1ae" alt="" data-size="line"> . You\
&#x20;        can now access the page with all the defined functionalities.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuVEwbkabRIGos78sW%2F-MHuW-vGbnJCNVPglF-t%2Fcpticketmgmt%2520page.png?alt=media\&token=09bb493f-74e5-4c59-9bc8-23e692ceba9b)


# Adding components to a new ticket page

Navigate to the **cpticketmgmt** page, and add a new ticket.

1. On the top-right corner of the **cpticketmgmt** page, click **New Ticket**. The **Add Ticket** dialog box is displayed.
2. Fill-up the necessary details in the form and click **Create**.
3. Refresh the page, and you can now see the newly added ticket as the first entry in the **Card Table**.
4. Double-click on the first entry. The new ticket page canvas is displayed.
5. On the menu bar, click <img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuUdjxMKmUsSuV44Zt%2F-MHuV92ezSP3rUcT1Lt7%2Fsave-enable%2520developer%2520bar.png?alt=media&amp;token=1be37942-b1c1-41d3-a001-cba317ab5bce" alt="" data-size="line"> . The components added to the page are saved.

## **To add components to the ticket details page component:**<br>

1. Right-click on the **Page** component and add separate **Data Store** components for the following datasources:
   1. CptmCustomerUserMapping
   2. CptmCustomerTickets\
      *Select the **Auto-Query** and **Update Allowed** checkboxes to inherit and modify the datasource attributes.*
2. Right-click on the **CptmCustomerTickets** **Data Store** component and add **Trigger on Query.**
   1. Add the **Show Popup** action to the trigger.
3. Right-click on the **Page** component and add three **Popup** components.
   1. In the **Properties** tab of the **Popup** component, under **General** properties, in the **Title** field, enter **Change** **history**.
   2. Change the **Title** of the second **Popup** to **Notes**.
   3. Change the **Title** of the second **Popup** to **Update Title**.
4. Right-click on the **Change** **history** popup and add the **Trigger After Popup Open**.\
   Add the **Query DataSource** action to the trigger.
5. Right-click on the **Vertical Section** child component of the **Notes** popup and add a **Card Wrapper**.
   1. Change the **Card Header Title** to **Internal Comments**.
   2. Right-click on the **Card Body** and add the **Collaboration** component.
   3. In the **Properties** tab of the **Collaboration** component, under **General** properties, in the **Collaboration Datasource Alias**, type **CptmCustomerTickets.**
   4. In the **Context** field, type **Internal Comments.**
   5. In the **Context** **Value** field, type **#{params.ticketId}**
   6. In the **Date** **Format** field, type **DD-MM-YYYY HH:mm**
   7. Select the **Show Likes, Show Attachments, and Always Show Delete** checkboxes.
6. Add a button to the second **Vertical Section** of the **Notes** popup.
   1. Change the **Button** **Title** to **Close**.
   2. Add the **Hide** **Popup** action to the trigger.
   3. In the **Properties** tab of the **Hide** **Popup** action, under **General** properties, in the **Popup Item ID** field, paste the **Item ID** of the **Notes** popup component.
7. Add a **Row** component to the **Update Title** popu&#x70;**.**
   1. Add a header component to the **Col** component, namely, **H5**.
   2. In the **Text** field, type **Update Title**.
8. Add another **Col** component to the row.
   1. Right-click and add an **Icon** component to the column.
   2. Add the **Refresh DataSource** and **Hide Popup** actions to the trigger.
   3. In the **Properties** tab of the **Refresh DataSource** action, under **General** properties, in the **Target Data Source Alias** field, select **CptmCustomerTicketsAlias.**
   4. In the **Properties** tab of the **Hide** **Popup** action, under **General** properties, in the **Popup Item ID** field, paste the **Item ID** of the **Update Title** popup component.
9. On the menu bar, click <img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuUdjxMKmUsSuV44Zt%2F-MHuV92ezSP3rUcT1Lt7%2Fsave-enable%2520developer%2520bar.png?alt=media&amp;token=1be37942-b1c1-41d3-a001-cba317ab5bce" alt="" data-size="line"> . The components added to the page are saved.

## **To add components for ticket status and description:**

1. Right-click on the **Page** component and add a **Vertical Layout Panel** component.
   1. In the **Properties** tab of the **Vertical Section** component, under **General** properties, in the **Height** field, type **0.1.**
2. Add a **Card Wrapper** to the **Vertical Section** component.
   1. Delete the **Card** **Header**.
   2. Add a **Row** component to the **Card Body**.
   3. In the **Properties** tab of the **Rol** component, under **DataSource** properties, select the **Use the Existing Data Source** checkbox.
   4. In the **Data Source Alias** field, select **CptmCustomerTicketsAlias**.
   5. Add a header component to the **Col** component. For example: **H3**.
   6. In the **Properties** tab of the **H3** component, under **General** properties, in the **View Attribute** field, select **Ticket Id**.\
      *The header component will now display the ticket Id fetched from the datasource.*
3. Add another **Col** component to the row.
   1. Right-click on the **Col** component and add a **Badge** component, to display the status of the ticket.
   2. In the **Properties** tab of the **Badge** component, under **General** properties, in the **Text** field, enter **New**.
   3. In the **Badge Color** field, click **Enter Custom** and again click **Expression Builder.** The **Expression Builder: Badge Color** dialog box is displayed.
   4. In the bottom of the dialog box, in the **Expression** text box, enter the following expression: **decode(#{CptmCustomerTicketsAlias.status},'1','danger','2','primary','3','warning','4','default','5','success')**
   5. Click **Submit**. The expression specifies the badge color according to the status of the ticket.
   6. In the **View Attribute** field, select **Status** from the list.
   7. Add another **Badge** component to the column and in the **Text** field, enter **Status**.
   8. To add badge color, repeat step d. The expression specifies the badge color according to the priority status of the ticket.
   9. In the **View Attribute** field, select **Priority** from the list.
4. Add another **Col** component to the row.
   1. Add a **Text Field** component to the column.
   2. In the **Properties** tab of the **Text Field** component, under **Label** properties, delete the text in **Field Label** field.
   3. In the **Placeholder** field, click. The **Expression Builder: Tool Tip** dialog box is displayed.
      1. Under **Category** column, select **Datasource**.
      2. Under **Choose a Datasource Alias** column, select **CptmCustomerTicketsAlias**
      3. Under **Choose an Attribute** column, select **Title**.
      4. Click **Submit**.
5. Add another **Col** component, and set the base size, so that the column is displayed in left corner of the page.R
   1. Right-click on the **Col** component and add the **Icon** component.
   2. Add a **Trigger On Click** to the **Icon** component.
   3. Add the **Set as Current StoreRecord** and **Show Popup** actions to the trigger.
6. Add another **Col** component to the row
   1. Add a button to the **Col** component.
   2. In the **Text field**, enter **Ticket Summary**.\
      *You can select a suitable icon under the **Icon** field.*
   3. Add the **Go To Page** action to the trigger.
   4. In the **Properties** tab of the **Go To Page** action, under **General** properties, in the **Page State** field, enter **app.cptickets** (the page state of the **cpticketmgmt** page).
7. Add another button to the **Col** component, and set the button title as **Changes History.**
   1. Add the **Show Popup** action to the trigger.
8. Add another button to the **Col** component, and set the button title as **Internal Comments.**
   1. Add the **Show Popup** action to the trigger.
9. Add another button to the **Col** component, and set the button title as **Close**.
   1. Add **Confirm Message** action to the trigger.
   2. In the **Properties** tab of the **Confirm Message** action, under **General** properties, in the **Message** field, type ‘**Do you want to close this ticket?’**
   3. Add **Update StoreRecord** action to the trigger.
   4. In the **Properties** tab of the **Update** **StoreRecord** action, under **General** properties, in the **Target Attribute** field, select **Status** from the list.
   5. In the **Value Expression** field, type **5.**
   6. Add **Save** **DataSource** action to the trigger.
   7. In the **Properties** tab of the **Save** **DataSource** action, under **General** properties, in the **Target Data Source Alias** field, select **CptmCustomerTicketsAlias.**
   8. Add **Refresh DataSource** action to the trigger.
   9. In the **Properties** tab of the **Save** **DataSource** action, under **General** properties, in the **Target Data Source Alias** field, select **CptmCustomerTicketsAlias.**
10. **Duplicate** the **Close** button. The triggers are copied as well.
    1. Change the button title to **Re-Open.**
    2. In the **Message** field of the **Confirm Message** action, type ‘**Do you want to re-open this ticket?**’
    3. In the **Value Expression** field of the **Update** **StoreRecord** action, type **10.**
11. Add another button to the **Col** component and set the button title as **Save Changes.**
    1. Add **Update StoreRecord** action to the trigger.
    2. In the **Properties** tab, under **General** properties, in the **Target Data Source** **Alias** field, select **CptmCustomerTicketsAlias.**
    3. Under **Target Attribute**, select **Status** from the list.
    4. In the **Value** **Expression** field, click. The **Expression Builder: Value Expression** dialog box is displayed.
       1. Under **Category** column, select **Datasource**.
       2. Under **Choose a Datasource Alias** column, select **CptmCustomerTicketsAlias**
       3. Under **Choose an Attribute** column, select **Status**.
       4. Click **Submit**.
    5. In the **Enable** **Condition** field, click. The **Expression Builder: Enable Condition** dialog box is displayed.
       1. Under **Category** column, select **Datasource**.
       2. Under **Choose a Datasource Alias** column, select **CptmCustomerTicketsAlias**
       3. Under **Choose an Attribute** column, select **Status**.
       4. Click **Submit**.
12. On the menu bar, click <img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuTvxbRlL84meohYuB%2F-MHuU_yWcPD9ju4jxYI6%2Fsave-enable%2520developer%2520bar.png?alt=media&amp;token=a2547825-e9ae-4952-833f-1033248d4ee1" alt="" data-size="line"> . The components added to the page are saved.

You have added the components to view the current ticket status.<br>

## **To add components to the second Vertical Section for ticket description:**

1. Right-click and add **Vertical Layout Panel** to the **Vertical Section** component.
2. For clear sectioning of the page, add a **Horizontal Layout** component to the **Vertical Section** component.\
   *By default, the child component, **Horizontal*** ***Section**, is added.*
3. Add a **Card Wrapper** to the **Horizontal** **Section** component.
   1. In the **Title** field of the **Card** **Header**, type **Ticket Comments** and set a suitable icon.
4. To view comments or reviews related to the ticket, add the **Collaboration** component to the **Card Body**.
   1. In the **Properties** tab of the **Collaboration** component, under **Context** properties, in the **Collaboration Datasource** **Alias** field, select **ticketCollaboration**.
      1. In **Context** field, select **issueId**.
      2. In **Date Format** field, enter **DD-MM-YY HH:mm**
      3. Select the **Show Likes, Show Attachments, and Always Show Delete** checkboxes.
   2. In **Context Value** field, click. The **Expression Builder: Context Value** dialog box is displayed.
      1. Under **Category** column, select **Datasource**.
      2. Under **Choose a Datasource Alias** column, select **CptmCustomerTicketsAlias**
      3. Under **Choose an Attribute** column, select **ticketId**
      4. Click **Submit**.
   3. Under **Look & Feel** properties, in the **Height** field, type **1**.
5. On the menu bar, click <img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuTvxbRlL84meohYuB%2F-MHuU_yWcPD9ju4jxYI6%2Fsave-enable%2520developer%2520bar.png?alt=media&amp;token=a2547825-e9ae-4952-833f-1033248d4ee1" alt="" data-size="line"> . The components added to the page are saved.

## **To add components to the second Horizontal Section component:**

1. Add a **Card Wrapper** to the **Horizontal Section** component.
   1. In the **Title** field of the **Card** **Header**, type **Ticket Details** and set a suitable icon.
2. Right-click on the **Card Body** and add a **Form** component.
   1. In the **Properties** tab of the **Form** component, under **DataSource** properties, select the **Use the Existing Data Source** checkbox.
   2. In the **Data Source Alias** field, select **CptmCustomerTicketsAlias**
3. Add a **Row** component to the **Form** component.
   1. In the **Properties** tab of the **Row** component, under **DataSource** properties, select the **Use the Existing Data Source** checkbox.
   2. In the **Data Source Alias** field, select **CptmCustomerTicketsAlias**.
   3. In the **Properties** tab of the **Col** component, under **General** properties, in the **Horizontal Alignment** field, select **Default**.
   4. In the **Vertical Alignment** field, select Default.
4. Add the **Paragraph** component to the **Col** component.
   1. In the **Text** field of the **Paragraph** component, enter **Created on**.
   2. Add a **Date** component to the **Col** component, and place it against the **Paragraph** component.
   3. In the **Properties** tab of the **Date** component, under **General** properties, in the **View Attribute** field, select **Creation Date**.
   4. Add a **User** **Picture** component to the **Col** component., and place it against the **Date** component.
   5. In the **Properties** tab of the **User Picture** component, under **General** properties, in the **View Attribute** field, select **Creation By**.\
      *You can change the alignment of individual components or the **Row** on whole by changing the margin values or **Display** alignment position.*
5. Duplicate the **Col** component.
   1. Change the **Text** value of the **Paragraph** component to **Updated on.**
   2. Change the **View Attribute** of the **Date** component to **Last Update Date.**
6. Right-click on the **Row** component and add a **Text Field** component.
   1. In the **Properties** tab of the **Text Field** component, under **General** properties, in the **Field Label** field, enter **Ticket Description**.
   2. Under **Data** properties, in the **View Attribute** field, select **Issue Description**.
   3. In the **Total lines** field, enter **6.**
7. Right-click on the **Row** component and add a **Select** component.
   1. In the **Field Label** field of the **Select** component, enter **Priority**.
   2. In the **View Attribute** field, select **Priority**.
   3. Under **Select** **DataSource** properties, in the **DataSource** field, select **CptmLookups**.
   4. In the **Data** **Source Alias** field, enter **CptmLookupsAlias1**.
   5. In the **Default Where Clause field**, type **LOOKUP TYPE=’TICKET\_PRIORITY’**
   6. In the **Order By Clause** field, type **#meaning#ASC.**
   7. In the **Value Attribute** field, select **Lookup Code**.
   8. In the **Display Attribute** field, select **Meaning**.
8. Duplicate the **Select** component.
   1. Change the **Field** **Label** value to **Ticket Type**
   2. Change the **Default Where Clause field** to **LOOKUP TYPE=’TICKET\_TYPE’**
9. Duplicate the **Select** component.
   1. Change the **Field** **Label** value to **Requested By.**
   2. Change the datasource selected in the **DataSource** field to **CptmCustomerUserMapping**.
   3. Change the **Order By Clause** field to **#userName#ASC.**
   4. In the **Value Attribute** field, select **User Id.**
   5. In the **Display Attribute**, select **User Name**.
   6. Right-click and add the **Trigger Before Select Query**.
   7. Add the **Set Query Filter Value** action to the trigger.
   8. In the **Properties** tab of the **Set Query Filter Value** action, under **General** properties, in the **Value Expression** field, click. The **Expression Builder: Value Expression** dialog box is displayed.
      1. Under **Category** column, select **Datasource**.
      2. Under **Choose a Datasource Alias** column, select **CptmCustomerTicketsAlias**
      3. Under **Choose an Attribute** column, select **customerId**.
      4. Click **Submit**.
10. Right-click on the **Requested By Select** component and add the **Trigger Before Render.**
    1. Add the **Query DataSource** action to the trigger.
    2. In the **Properties** tab of the **Query DataSource** action, under **General** properties, select the **Force** checkbox.
    3. In the **Properties** tab of the **Query Param** action, under **General** properties, in the **Value Expression** field, click. The **Expression Builder: Value Expression** dialog box is displayed.
       1. Under **Category** column, select **Datasource**.
       2. Under **Choose a Datasource Alias** column, select **CptmCustomerTicketsAlias**
       3. Under **Choose an Attribute** column, select **customerId**.
       4. Click **Submit**.
    4. In the **Param Attribute** field, select **Customer Id**.
    5. In the **Filter Type** field, select **=.**
    6. In the **Data Source Alias** field, select the **Item Id** of the datasource added to the **Select** component.
11. Duplicate the **Select** component.
    1. Change the **Field** **Label** value to **Assigned To.**
    2. Change the datasource selected in the **DataSource** field to **CptmCustomerUserMapping**.
    3. In the **Value Attribute** field, select **User Id.**
    4. In the **Display Attribute**, select **User Name**.
12. Right-click on the **Assigned To Select** component and add the **Trigger Before Render.**
    1. Add the **Query DataSource** action to the trigger.
    2. In the **Properties** tab of the **Query DataSource** action, under **General** properties, select the **Force** checkbox.
    3. In the **Data Source Alias** field, select the **Item Id** of the datasource added to the **Select** component.
    4. In the **Properties** tab of the **Query Param** action, under **General** properties, in the **Value Expression** field, click. The **Expression Builder: Value Expression** dialog box is displayed.
       1. Under **Category** column, select **Datasource**.
       2. Under **Choose a Datasource Alias** column, select **CptmCustomerTicketsAlias**
       3. Under **Choose an Attribute** column, select **customerId**.
       4. Click **Submit**.
    5. In the **Param Attribute** field, select **Customer Id**.
    6. In the **Filter Type** field, select **=.**
13. Similarly, add components for the following ticket details:

| **Component name** | **Ticket details**      |
| ------------------ | ----------------------- |
| Text Field         | Application URL         |
| Text Field         | User Name               |
| Text Field         | Password                |
| Text Field         | Ext Ticket Number       |
| Text Field         | Available on Build      |
| LOV                | Application Name        |
| Date Field         | Planned Resolution Date |
| Date Field         | Actual Resolution Date  |
| Text Field         | Justification           |
| Text Field         | Root Cause Analysis     |
| Text Field         | Customer-Specific Tags  |

&#x20;   14\. On the menu bar, click <img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuUdjxMKmUsSuV44Zt%2F-MHuV92ezSP3rUcT1Lt7%2Fsave-enable%2520developer%2520bar.png?alt=media&amp;token=1be37942-b1c1-41d3-a001-cba317ab5bce" alt="" data-size="line"> . The components added to the\
&#x20;          page are saved.

&#x20;   15\. To view the page functionalities, on the menu-bar, click<img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuTvxbRlL84meohYuB%2F-MHuUcQOBeD-bY249rAB%2Fpreview_button.png?alt=media&amp;token=62fd4159-17f8-49cb-ae17-72c9625ac1ae" alt="" data-size="line"> .\
&#x20;          You can now access the page with all the defined\
&#x20;          functionalities.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuW502hE9-fmCv4Hfg%2F-MHuWFaNr6vzZOR9Q0vo%2Fimage_2.png?alt=media\&token=41eb8ef5-17a6-4e24-ae5c-d4b6b52aa6fd)


# Viewing the final output

After adding all the components, you can view the pages as follows:

![Home Page](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuWdIeWeAqEUzk8teU%2F-MHuWm_GceglMkgGQDVg%2Fcphome.png?alt=media\&token=bc220e25-8c99-43f6-84fc-fb7fa0aec817)

![Lookup Page](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuWdIeWeAqEUzk8teU%2F-MHuWsTRpFiD_jCkdGie%2Fcp1.png?alt=media\&token=1d13ea10-9fef-4e0f-845a-0be18093a1da)

![Ticket Details](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuWdIeWeAqEUzk8teU%2F-MHuWxtC6l-HL_esFVNw%2Fcp2.png?alt=media\&token=0592f111-fd5b-4504-a0a4-82b05ea20772)

![Ticket Summary](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHuWdIeWeAqEUzk8teU%2F-MHuX1RhMKspPhx6aQKF%2Fcp3.png?alt=media\&token=ba9c0013-fa0c-4989-bde4-aec2cc4ce136)


# Understanding the User Interface


# Working with the menu bar

The menu bar has the following elements:

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2HjY7RJD7XAxgLPz6i%2F-M2HlFkAa9mJpGdJp4gN%2Fmenubar.png?alt=media\&token=45e590ff-758f-4d66-952e-3b7a82fc5967)

| **Label** | **Description**                                                                                                                           |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **1**     | Click to view notifications.                                                                                                              |
| **2**     | <p>Click to enable the developer mode.</p><p><em>Developer mode can is available only for users having access to developer role.</em></p> |
| **3**     | Click to navigate to the home page.                                                                                                       |
| **4**     | Click to view the navigation menu.                                                                                                        |
| **5**     | Click to view the language list. From the given list, select the language for the user interface labels.                                  |
| **6**     | View the user display name.                                                                                                               |
| **7**     | Click to change profile preferences.                                                                                                      |


# Managing user preferences

To change the preferences:

1. Click the profile photo and from the dropdown, click **Preferences**.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2HmDWx91dvz7NodSLD%2F-M2HmKIB0AS2-BuYWury%2Fpreferences.png?alt=media\&token=3b316ed5-5669-4cc3-967e-5f68eb446c2a)

&#x20;2\. Edit the following profile preferences as required:

{% hint style="success" %}
**Note:** Username and email address cannot be edited.
{% endhint %}

| **Field name**    | **Description**                                                                                                                                                                                                                |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Profile Photo** | <p>To upload a profile photo:</p><ol><li>Under <strong>Profile</strong>, click <strong>Upload</strong>.</li><li>Select the required image.</li></ol>                                                                           |
| **Display name**  | Enter the name you want to be displayed on the menu bar.                                                                                                                                                                       |
| **Home Page**     | From the **Home** **Page** list, select the required page. This page will be set as the home page and be displayed as you login.                                                                                               |
| **Time Zone**     | <p>Search and select the required time zone:</p><ol><li>Click. The <strong>List of Values: Time Zone</strong> dialog box is displayed.</li><li>Select the required time zone.</li><li>Click <strong>Select</strong>.</li></ol> |
| **Auto-Refresh**  | <p>Select to reload the pages automatically.</p><p><em>Only the pages that do not fetch data from data sources can be reloaded automatically.</em></p>                                                                         |

&#x20;3\. To save the changes, on the top-right corner, click **Save.**

*If there are no changes, **Save** will be disabled.*


# Changing password

1. Click the profile photo and from the dropdown, click Change Password.

   The **Change** **Password** page is displayed.

   *The user display name cannot be edited here.*

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M3QQB_sugfm3yd_wi26%2F-M3QRAHkl9rxDSutK3il%2Fchange%20password.png?alt=media\&token=f8549aa3-f69e-443c-8caa-ff6764db98df)

&#x20;2\. Change the **password**

&#x20;3\. Click **Save**


# Working with navigation menu

To view the navigation menu, in the menu bar, on the right, click![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fcloudio-new-documentation%2F-M2HHy_Ft5bm5camEmi7%2F-M2HJVW6G8yl3H4otnVL%2F0.png?generation=1584076557118048\&alt=media) .

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2HpnKdGV5BAdfTCXjV%2F-M2HqOyAITHsk4OFWge4%2Fnavigation%20pane.png?alt=media\&token=a9ceb49a-fe0d-4baa-8732-4f911a7a6705)

The navigation menu displays application components available when developing an application. The application components are grouped under the roles assigned to you.


# Working with the developer group of the developer role

You can manage (search, add, edit, and/or delete) the various application components.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2WTWIC02QBmR3fMYbW%2F-M2WXOCSPE4Il-1BoIiV%2FDeveloper%20role.png?alt=media\&token=cff89c79-07dd-444b-8312-6c84d777bd7e)

Click the required group to access its details.

| **Option**                 | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Developer Dashboard**    | <p>Displays your dashboard. You can view and navigate to the recent pages, datasources, roles, and users.</p><p>To know more, refer to the Working with the Developer Dashboard section.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| **Expression Playground**  | <p>Enables you to evaluate any expression and fetch the relevant dynamic data.</p><p>By default, the expression displays the Session ID.</p><p><strong>Examples:</strong></p><ol><li><strong>#{session.sessionId}:</strong> Displays the session Id for the current session.</li><li><strong>#{session.orgId}:</strong> Displays the Id of the instance of CloudIO in use.</li><li><strong>#{session.userId}:</strong> Displays the Id of the logged-in user.</li><li><strong>#{session.userName}:</strong> Displays the user name of the logged-in user.</li></ol><p><em>The list of expressions and their syntax can be viewed in the Expression builder in the <strong>developer mode.</strong></em></p> |
| **Manage Images**          | Displays a list of images uploaded to the platform. The details displayed includes the name of the file, timestamp of the upload, and thumbnail of the image.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **Manage Custom Handlers** | Displays a list of custom handlers that implement custom code to perform DML (Insert, Update, Delete) operations on the datasource.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **Manage Datasources**     | <p>Displays a list of existing datasources.</p><p><em>To know more, refer</em> <a href="/creating-datasources/working-with-datasources/managing-datasources"><em>Managing data sources</em></a><em>.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **Manage HTML Requests**   | <p>Displays a list of custom JSON, JavaScript, or Java code snippets.</p><p>The item Id of the code snippet can be later as and when needed.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| **Manage HTML Templates**  | <p>Displays a list of custom HTML code snippets. You can also add JSON, JavaScript, or Java code snippets.</p><p>The item Id of the code snippet can be later as and when needed.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| **Manage Java Snippets**   | <p>Displays a list of custom Java code snippets.</p><p>The item Id of the code snippet can be later as and when needed.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **Manage Language**        | <p>Displays a list of languages that can be used to localize the interface.</p><p>To add a language, use its universal language code. Under the <strong>Dictionary</strong> <strong>management</strong> role, you have to define rules for localization for the language added.</p>                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **Manage Profile Values**  | <p>Displays a list of conditions that govern access rights.</p><p>Profiles can be updated at the following levels as defined during creation:</p><p>a. site (server) level</p><p>b. org (instance) level</p><p>c. role level</p><p>d. user level</p><p><em>You cannot add a new profile in this page.</em></p>                                                                                                                                                                                                                                                                                                                                                                                              |
| **Manage Profiles**        | <p>Displays a list of existing profiles created by the administrator as well as the developer.</p><p>To know more, refer to the <em><strong>Managing profiles</strong></em> section.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **Manage Database Log**    | <p>Displays the database log.</p><p><em>You can only view and clear the log.</em></p><p><em>Need more information from CloudIO to update the content.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **Monitor Email Requests** | <p>Displays the list of all the emails sent, along with the receiver and sender details, status of the email, subject, email body, and email sent date.</p><p>You can also select and resend a particular email email(s).</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **OfflineRules**           | <p>Displays the list of rules set for offline transactions.</p><p>The platform allows you to access the pages offline.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **Page Fragments**         | Displays a list of the existing reusable page fragments. To use a particular page fragment, use the unique **Fragment Id** in the **Expression** **builder**.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **Pages**                  | <p>Displays the list of existing pages.</p><p>To know more, refer to the <a href="/creating-pages/working-with-pages/understanding-pages-and-their-types">Working with Pages</a> section.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **Upload Requests**        | Displays the recent uploads.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |


# Working with other developer role groups

You can manage (search, add, edit, and/or delete) the various application components.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2WTWIC02QBmR3fMYbW%2F-M2WXEWR0hHTvQBs8JuR%2FOther%20groups%20in%20Developer%20role.png?alt=media\&token=8e4beb42-12a2-4006-9140-b9c10725bdb7)

| **Group**            | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                 |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Inbound Emails**   | <p>The emails received can be viewed here.</p><ol><li>Under <strong>Inbound</strong> <strong>mails</strong> tab, you can view the list of received emails.</li><li>Under <strong>Inbound</strong> <strong>Setup</strong> tab, you can configure a template for auto-generated replies.</li><li>Under <strong>OCR Setup</strong> tab, you can configure the OCR (Optical character recognition) text to field mapping.</li></ol> |
| **My Menu Group**    | <p>The pages created under the developer role are displayed under this group</p><p>The group is defined when the page is created.</p><p>By default, a new page is placed under <strong>My Menu Group.</strong> A page created under any other role will be placed under this group under that respective role.</p>                                                                                                              |
| **Screen Generator** | <p>You can generate a page using the <strong>Screen</strong> <strong>Generator</strong> option.</p><p>To know more, refer to the Building your application using screen generator section.</p>                                                                                                                                                                                                                                  |
| **Workflow**         | The existing workflows and workflow nodes                                                                                                                                                                                                                                                                                                                                                                                       |


# Managing Profiles

Displays a list of existing profiles created by the administrator as well as the developer.

Profiles specific to application characteristics can be created by the developer using the application URL of the platform.

While creating a new profile, you can do the following:

1. set the profile as active or inactive
2. add SQL queries to define the condition
3. allow the user to update the profile at different levels

{% hint style="warning" %}
Profiles specific to the platform characteristics can be created only by the administrator using the admin URL of the platform. You can only view these profiles, and not edit or duplicate it.
{% endhint %}


# Working With Roles And Users


# Defining a role

A role is used to provide controlled access to users, pages, workflow, data sources, java snippets, HTML requests and/or HTML templates.

{% hint style="info" %}
Roles can only be created and managed by the administrator.
{% endhint %}

To create a role,

1. In the upper right corner of the CloudIO homepage, in the menu bar, click![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-mcOhZsp5ySNX8xlW5%2F-M-mqQrhvyhl1QdlDK3f%2FNavigationMenu.png?alt=media\&token=137cfe8b-62de-45ca-a442-bc7ac65f96c3). The **Navigation** page is displayed.
2. Under the **Administration** role, click **Manage Roles**. The **Manage Roles** page is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M00wTLjU9htCMEECDDb%2F-M00zoHefU_Ibfr6tEsB%2FAdd%20role.png?alt=media\&token=660d8991-dcf9-4aa7-b9fd-50b1fd7db2d2)

&#x20;3\. In the upper right corner, click **Add Role**.

The role-details page is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M012PZPH0bodhvJI5vI%2F-M015R-wf_XQfY3cFhoT%2FAssigning%20components%20to%20roles.png?alt=media\&token=54b6c950-9d18-477b-84d1-7adb4dc2013a)

&#x20;4\. Enter the following details:

| User Detail       | Description                                                                                                                                                                                                                                     |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Role Name         | The name of the role                                                                                                                                                                                                                            |
| Role Code         | A unique code for the role that can be accessed from functions like hasRole()                                                                                                                                                                   |
| Responsibility Id | <p>The responsibility ID obtained from <strong>Oracle Apps</strong></p><p><em><strong>Note</strong>: This field is applicable only for Oracle EBS customers that is when the platform is configured using <strong>Oracle EBS</strong>.</em></p> |
| Application Id    | <p>The application ID obtained from <strong>Oracle Apps</strong></p><p><em><strong>Note</strong>: This field is applicable only for Oracle EBS customers that is when the platform is configured using <strong>Oracle EBS</strong>.</em></p>    |
| Start Date        | The start date for the role to be active                                                                                                                                                                                                        |
| End Date          | The end date for the role to be active                                                                                                                                                                                                          |
| Auto Assign       | Indicates that the role is to be automatically assigned to a newly created user                                                                                                                                                                 |
| Is AD Group       | Indicates that the **Authentication Provider** is of the type **Active Directory**                                                                                                                                                              |
| Is BI Enabled     | Gives permissions to the role for using CloudIO dataSense 3.0 for creating and viewing reports                                                                                                                                                  |

&#x20;5\. If required, assign one or more of the following components to the role through the respective tabs:

* Datasources
* Java Snippets
* HTML Requests
* HTML Templates
* Workflow Nodes
* Workflow Definitions

&#x20;6\. Click **Save**. The role is created.

&#x20;7\. To assign the created role with pages and/or users, in the respective section, click ![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M02JUZ4VkZEPTWf4mW0%2F-M02NlGa7CRPsZxlf2eh%2FAddNewConnection.png?alt=media\&token=31d356df-bd0a-4803-9e4c-0245e2ae475a), select the required user(s) or page(s) and click **Save**.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M02JUZ4VkZEPTWf4mW0%2F-M02NxevPBAIINM35YWq%2FAssign%20pages%20and%20users%20tp%20roles.png?alt=media\&token=79cb162d-1260-474a-93f4-502f6e98f53f)

The role is assigned to the selected users and/or pages accordingly.


# Understanding the types of roles

The CloudIO platform provides a default Administrator role when it is set up. Additionally, the CloudIO platform has the following predefined roles that can be assigned to users:

## Administrator

A user with the administrator role has the permissions to:

* manage the application setup
* create new roles and users
* create subdomains

## Developer

A user with the developer role has the permissions to create new datasources and pages.

## Patch Manager

A user with the patch manager role has the permissions to create and apply patches of the application components.

## Site Developer

A user with the site developer role can make cosmetic changes to the application if the solution built on the CloudIO platform is implemented at the customer site.

**Limitations for Site Developer Role:**

1. Has read-only access to **Manage Datasources**
2. Cannot create a new page but can redesign the existing one
3. Cannot create custom workflow nodes

## Site Administrator

A site administrator can make changes in setup, add new users and assign existing customized roles to these users if the solution built on the CloudIO Platform is implemented at a customer site.

**Limitations for Site Administrator**

1. Cannot create any role
2. Can create user and assign customized roles to the user, but not the pre-defined platform roles
3. Can schedule request by selecting customized roles


# Creating a user

Users can access and control the components of the application based on the roles that they are assigned to.

{% hint style="info" %}
Users can only be created and managed by the administrator.
{% endhint %}

For the native authentication provider type, to create a native user,

1. In the upper right corner of the CloudIO homepage, in the menu bar,  click![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-mcOhZsp5ySNX8xlW5%2F-M-mqQrhvyhl1QdlDK3f%2FNavigationMenu.png?alt=media\&token=137cfe8b-62de-45ca-a442-bc7ac65f96c3).  The **Navigation** page is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M01ZDBS7xBei9soElAh%2F-M01ZNiqggPWG-1n4yax%2FNavigation%20page_Manage%20users.png?alt=media\&token=4c28f476-d390-48ac-b4dd-cc89e01dd5a8)

&#x20;2\. Under the **Administration** role, click **Manage Users.**

The **Manage Users** page is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M01anm_aS_ZAictFzpo%2F-M01smGAFTeixIO4z4HO%2FAdd%20user.png?alt=media\&token=ca165ab3-9fa6-4760-8c2b-b1a91be1d391)

&#x20;3\. Click **Add User.**

The user details page is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M01ZmLnMiILbta7K6b5%2F-M01_rwHyo9Zng0J-Vx2%2FUser%20Details.png?alt=media\&token=e10df9b9-ade7-4cbc-af42-981d1a7a329f)

&#x20;4\. Enter the following user details:

| User Detail  | Description                                                                               |
| ------------ | ----------------------------------------------------------------------------------------- |
| User Name    | The login name for the user                                                               |
| Email        | The email ID of the user                                                                  |
| Display Name | The name of the user that should be displayed in the user profile                         |
| Start Date   | The start date for the user to be active                                                  |
| End Date     | The end date for the user to be active                                                    |
| Manager      | The name of the manager for the user                                                      |
| API Key      | The API key value for the user that will be used to make REST API calls                   |
| API Secret   | The API secret value for the user that will authenticate them while making REST API calls |

&#x20;5\. Click **Save**.

The user is added and their details can be accessed from the

**Manage users** page.

**OR**

To assign roles to user, click **Next**.

The roles page is displayed.


# Assigning a role to the user

After a user is created, the administrator can assign roles to the user for controlling the access to the application components.

1. In the upper right corner of the CloudIO homepage, in the menu bar,  click![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-mcOhZsp5ySNX8xlW5%2F-M-mqQrhvyhl1QdlDK3f%2FNavigationMenu.png?alt=media\&token=137cfe8b-62de-45ca-a442-bc7ac65f96c3).  The **Navigation** page is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M01ZDBS7xBei9soElAh%2F-M01ZNiqggPWG-1n4yax%2FNavigation%20page_Manage%20users.png?alt=media\&token=4c28f476-d390-48ac-b4dd-cc89e01dd5a8)

2\. Under the **Administration** role, click **Manage Users.**

The **Manage Users** page is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M01yWA9UL4sDBn12YRZ%2F-M02DC0Rqbd-bTyJGO4Q%2FManage%20Users%20page.png?alt=media\&token=56a66e38-1963-447e-873a-e8c2e764f9d9)

3\. Click on the required user.

The **User Details** page is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M02DquF8n8Fy9zrrbwP%2F-M02DvoSTUDQKQ7y5ver%2FUser%20Details.png?alt=media\&token=092933fd-f108-4e32-bb1a-eefc8a8be27d)

4\. In the upper right corner of the **User Details** section, click **Next**.

The roles page is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M02DquF8n8Fy9zrrbwP%2F-M02HXMfYdrne-N53vb1%2FAssign%20role.png?alt=media\&token=ff6bf600-fb41-410e-a5ff-e0ad85c967db)

5\. In the upper right corner of the **User Roles** section, click **Add Role** and in the role column, select the role to be assigned to the user.

6\. Enter the details for the role and click **Save**. The user is assigned to the role.


# Managing roles and users

## Managing a role

1. In the upper right corner of the CloudIO homepage, in the menu bar, click![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-mcOhZsp5ySNX8xlW5%2F-M-mqQrhvyhl1QdlDK3f%2FNavigationMenu.png?alt=media\&token=137cfe8b-62de-45ca-a442-bc7ac65f96c3). The Navigation page is displayed.&#x20;
2. Under the **Administration** role, click **Manage Roles**. The **Manage Roles** page is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M02OfRULWaLwWxasCne%2F-M02QWFHeeXRX0U1x5Iz%2FManage%20roles.png?alt=media\&token=681d4fa8-0cdd-4dbc-b160-71afc3e6ffd6)

3\. For the required role, click on the required icon from the following options:

| Icon                                                                                                                                                                                                                                         | Description                             |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
| ![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M0GYTIV9I2E8JE0JRkJ%2F-M0GrBwpsQC3QQnmPsri%2FEdit%20role%20icon.png?alt=media\&token=7d74a081-67d6-4974-bdac-82f73ca217ac)      | Edit role                               |
| ![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M02OfRULWaLwWxasCne%2F-M02Rlo1MmTbJS3_to7u%2FUsers%20icon.png?alt=media\&token=d38e4b2f-6b4c-48b1-8816-8ffb3d900e9f)            | Manage user assignments                 |
| ![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M0GYTIV9I2E8JE0JRkJ%2F-M0GrOsifIn1KOL-SJlf%2FPages%20icon.png?alt=media\&token=c3a80cb5-a2f0-442b-b909-3d2fca651d14)            | Manage page assignments                 |
| ![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M0GYTIV9I2E8JE0JRkJ%2F-M0GrgBYBYoU0oXfSfT2%2FDatasources%20icon.png?alt=media\&token=ecb5c825-907c-4ccc-83a7-5f05e52b1077)      | Manage datasource assignments           |
| ![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M0GYTIV9I2E8JE0JRkJ%2F-M0GruqLyOMsgV-TGfQA%2FJava%20Snippets%20icon.png?alt=media\&token=e173fef6-3e2e-437c-be0c-52f04ab6a758)  | Manage the assignment of Java snippets  |
| ![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M0GYTIV9I2E8JE0JRkJ%2F-M0GsdANlqHKs6RzV-ke%2FHTML%20icon.png?alt=media\&token=294410e0-2de5-4d9e-b1f1-c7f0f3d6a0fb)             | Manage the assignment of HTML resources |
| ![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M0GYTIV9I2E8JE0JRkJ%2F-M0GsjsUQQBDQjzTZ5M_%2FHTML%20template%20icon.png?alt=media\&token=61eea7f2-ea69-4867-a2b1-41822b7019a7)  | Manage the assignment of HTML templates |
| ![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M0GYTIV9I2E8JE0JRkJ%2F-M0GwLaPcmPQpqZbdoUz%2FWorkflow%20Nodes%20Icon.png?alt=media\&token=9e4ceaed-2040-47e4-8747-0c7646106f79) | Manage the assignment of workflow nodes |

## Managing a user

1. In the upper right corner of the CloudIO homepage, in the menu bar, click![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-mcOhZsp5ySNX8xlW5%2F-M-mqQrhvyhl1QdlDK3f%2FNavigationMenu.png?alt=media\&token=137cfe8b-62de-45ca-a442-bc7ac65f96c3). The Navigation page is displayed.&#x20;
2. Under the **Administration** role, click **Manage Users**. The **Manage Users** page is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M0H1dSvKewa8XJE31lW%2F-M0H2XpxtPdwWvLMbKFo%2FManage%20Users.png?alt=media\&token=dfe0527b-18a9-4b0f-bc39-2c6e951d09c3)

3\. To manage the roles for a user, for the required user, click ![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M0Gwx0omTDyHhnFxd6u%2F-M0H1TeXNVFjs4TYV3Ym%2FUser%20roles%20icon.png?alt=media\&token=1598c2ce-32bf-4a53-8142-06571e94ee56).

The **User Roles** page is displayed. You can update the user role details as required

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M0HKtHkJzQZ8l8pu2gA%2F-M0HMXqWnx8ws7BpgBKh%2FManage%20user%20roles.png?alt=media\&token=e64b4a39-3ce9-48ef-9bcb-a8b693d2f431)

&#x20;4\.  To update other user details, click **Previous**. The **User Details** page is displayed. You can update the user details as required.


# Working with DataSources


# Understanding the CloudIO data sources

Data sources are used to fetch the data from and perform DML operations (for example, insert, update, delete) on underlying database objects or cloud services. The components of the user interface such as *Grids*, *Charts* or *Form Fields* interact with the database through a data source.

## Naming conventions

Every data source must have a unique name which is used while interacting with the database. Ideally, the data source name must be simple, concise and user-friendly.

* The data source name must not contain any special characters or space.
* The data source name can have maximum 128 characters.
* As a standard practice, you should name your data sources using the Title/Camel Case. For example, if your table name is *MTL\_SYSTEM\_ITEMS*, then your data source name should be *MTLSystemItems*.

## Benefits of CloudIO data sources

CloudIO data sources encapsulates the database objects and provides an additional layer of security on top of what the database already provides. It combines the data access layer along with the business logic you have defined. Developers can control the way the system generates the SQL query for fetching the data.

The use of the CloudIO data source has the following benefits:

* **Flexible**: Data sources are defined using a highly flexible metadata layer. The developer can configure/customize the process of retrieving data from and posting data to the underlying object.
* **Secure**: Data sources are highly secured and one can grant access privileges based on roles. For example, a user role can be granted to only view the data, while an admin role can be granted access to perform delete operations. You can also control the access to individual columns and specify whether a user can view or update a specific column.
* **High-speed**: Data sources exhibit high performance with speeds measured in milliseconds.
* **Customizable queries**: The SQL query generated by the data  source may not be the one preferred by an SQL expert. In such cases, the developer can change the construction of the query.
* **Audit**: The changes made to the data through the data source are audited and the user with the appropriate access privileges can view all the changes made to a given row.
* **REST Enabled**: A data source in CloudIO is a single source where you can define all your business and data access logic using the REST APIs.
* **Proactive**: Data sources will proactively send email alerts to the developer if there is any performance issue or if a user encounters a programmatic error. In other words, as a developer, you will know the issue even before the user reports it to you.


# Accessing data sources

1. In the top right corner of the menu bar, click ![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2C9pVyrDvQA42f_qmt%2F-M2CBUuJzOcOF7Pp1US7%2Fimage.png?alt=media\&token=19924627-1fdc-489e-9678-8d6bd158edf5) . The Navigation pane is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2C9pVyrDvQA42f_qmt%2F-M2CBoImMsDTPcKaIENZ%2FHomepage.png?alt=media\&token=e0b84020-f19d-401b-b87f-5a3f46dbf0e9)

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2C9pVyrDvQA42f_qmt%2F-M2CC5X1JBuDLFpoLHiW%2FNavigation%20pane.png?alt=media\&token=8e407c54-9d1b-4911-91b6-6b436c8f463c)

2\. Under the required role group, click **Manage Datasources**.

The **Manage DataSources** page with the list of datasources is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2rQonVKlLATph_uoHq%2F-M2rRDQFa288KFDkn7Pf%2FManage%20Datasources%20page.png?alt=media\&token=9c23425d-1ba4-48a6-8e86-aca94dfa67d8)

3\. To view the details of a datasource, click on the required datasource.

All the details of the selected datasource are displayed. You can view and manage these details from here.


# Creating a data source

Go to the **Manage Datasources** page and in the upper right corner, click **New**.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2CFMKOPgbQyWWMCwGT%2F-M2CG1RGuBxCO4czy1Iu%2FManage%20Datasources%20page.png?alt=media\&token=7e14bcaa-8aaa-47bc-8a81-98d1baed81b1)

The **NewDatasource** page, consisting of the following tabs, is  displayed:

* [Details](/creating-datasources/working-with-datasources/creating-a-data-source/defining-data-source-details)
* [Attributes](/building-your-first-application/building-your-first-application/creating-datasources/defining-attribute-properties)
* [Server-side validations](/creating-datasources/working-with-datasources/creating-a-data-source/defining-server-side-validations)
* [Pre Query](/creating-datasources/working-with-datasources/creating-a-data-source/defining-a-pre-query)
* [Post Query](/creating-datasources/working-with-datasources/creating-a-data-source/defining-a-post-query)
* [Roles](/building-your-first-application/building-your-first-application/creating-datasources/assigning-roles-to-a-datasource)


# Defining data source details

In the **Details** tab, under **Properties**,

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2CHRlKYN8XoiIVGp9W%2F-M2CHasO5jwv__T34Wz3%2FDetails%20Tab.png?alt=media\&token=1a125f68-75db-4402-995e-fc94c22ae868)

Complete the following **details** :

| **Property**               | **Description**                                                                                                                                                                                                                                                                                                                                         |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Name**\*                 | A unique name used to refer to the datasource object within the application                                                                                                                                                                                                                                                                             |
| **Table Name**\*           | The name of the database object containing the data; for example, name of the Table, View or REST API                                                                                                                                                                                                                                                   |
| **API Name**               | The name of the stored procedure, if any, that is used to perform DML operations                                                                                                                                                                                                                                                                        |
| **Object Type**            | The type of the underlying data source                                                                                                                                                                                                                                                                                                                  |
| **Object Connection Code** | <p>A connection code for connecting to different schemas/databases.</p><p><em><strong>Note:</strong> The object connection details of these schemas/databases must be defined in the <strong>Setup</strong> page. If you are using the default application schema under the current subdomain, you must not select any Object Connection Code.</em></p> |
| **Object Handler Class**   | The class name of the custom java code, if any, that required to access the datasource                                                                                                                                                                                                                                                                  |
| **Enable logging**         | <p>Select <strong>Yes</strong> to enable logging of database operations.</p><p><em><strong>Note</strong>: This is useful for debugging the pre-query, post query or server-side validation scripts.</em></p>                                                                                                                                            |

If applicable, select the following **checkboxes** :

| **Name**                   | **Description**                                                                                                                                                                     |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Active**                 | <p>Indicates that the datastore is active.</p><p><em>If inactivated, any UI component, that is bound to the object, will throw an error while trying to access the object.</em></p> |
| **UseAPI**                 | Indicates the use of the APIs for standard DML operations                                                                                                                           |
| **Call Post Query**        | Indicates that the defined post query will be invoked                                                                                                                               |
| **Skip Query For Updates** | Indicates that the update query operation, if any, will be skipped for the data source                                                                                              |
| **Email On Insert**        | Sends email notifications when the user performs an insert operation                                                                                                                |
| **Email On Update**        | Sends email notifications when the user performs an update operation                                                                                                                |
| **Email On Delete**        | Sends email notifications when the user performs a delete operation                                                                                                                 |
| **Confirmation Enabled**   | Indicates that a confirmation message will pop up in the **UI** before an action is to be performed.                                                                                |

Click **Save**. The datasource is created and can be accessed from the **Manage Datasources**.


# Defining attribute properties

When a datasource is created using a table, the platform generates an attribute for each column in the table. You can also create an attribute manually. You can edit the properties of the attributes as per the requirement.

An attribute can have the following properties:

| **Property**                 | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Name**                     | <p>The name of the attribute being created</p><p><strong>Note</strong>: The name should not contain any special character other than space.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **Type**                     | <p>The data type of the column</p><p><strong>Note</strong>: The number columns are of the data type decimal and the character columns are of the data type String.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **Length**                   | The maximum length of the data                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| **Scale**                    | The maximum number of decimal places allowed in numeric data                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **Default Value**            | <p><strong>Note</strong>: You can define a default value for the attribute that will be set if the user does not enter the value for the attribute.</p><ul><li>UUID: generates and populates the attribute value with a Universally Unique Identifier (UUID)</li><li>OrgID: populates the attribute value with the Org Id of the current subdomain</li><li>SYSDATE: current date</li><li>master.attributeName: Populates the attribute value from a parent/master row</li><li>CURRENTUSER: The username of the signed in user</li><li>CURRENTUSERID: The user id of the signed in user</li><li>=SELECT: Executes the given select statement and populates the attribute with the resulting value</li><li>PASSWORD: Populates the attribute value with the hash value of a randomly generated 12 alphanumeric value. The actual password value in clear text will be populated withattributeName\_clear. For example, if pwd is the attribute name, then pwd\_clear will have the generated value and pwd will have the hash value.</li><li>String or Number Constant Value: If the specified value doesn't fall under any of the above, then it is treated as a constant value.</li></ul> |
| **Insert**                   | Indicates whether the user can provide a value while inserting a row                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **Update**                   | Indicates whether the user can change the value while updating a row                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **Calculated**               | Indicates whether the attribute is a calculated value and should not be included in Insert or Update                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **Column name**              | The column name in the database that the attribute is mapped to                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **Out Parameter**            | Applicable when **UseAPI** is selected while defining the datasource details. The parameter in the API will be treated as IN OUT type.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **Primary**                  | Indicates that the attribute is a primary key                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| **Auto Sequence**            | <p>Indicates that the value is generated from a database sequence.</p><p>If selected, in the <strong>Default Value</strong> column, enter the sequence name</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **Optional**                 | Indicates if the attribute can be left blank by the user                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **Audit**                    | Indicates if the changes to the attribute value should be audited                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **Query**                    | <p>Indicates that the column should be automatically included in the Where Clause when a value is passed during a query.</p><p>When this property is not selected, the platform will not include the column in the where clause even if a value is specified. The developer should programmatically handle its value through the pre-query script.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **Disable Uppercase Search** | <p>By default, the where clause is constructed as <code>UPPER(column) LIKE 'VALUE%.</code></p><p>When this property is selected, <code>column = 'Value'</code> is constructed instead, which gives better performance when the column is indexed without using the UPPER function</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **Select**                   | Indicates if the column is a part of the select clause                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **Export**                   | Indicates if the column is a part of the select clause while exporting the data                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **Param Name**               | Applicable when Use API is selected while defining the datasource details. By default, the parameter name is assumed to be P\_COLUMN\_NAME. If the parameter name in the API is other than P\_COLUMN\_NAME, then specify the exact parameter to be used here.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |

* To fetch all the attributes and their values from the database, in the **Attributes** tab, in the actions bar, click![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2Fsync%2F09fdce2515a6c62ca30f412ecd756ec9d61bd62d.png?generation=1600439426902315\&alt=media). The data from the database is displayed n the table in the **Attributes** section.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2Fsync%2Fe588fd2de72092767fd71ee5a7ad59ef960a7221.png?generation=1600439426764105\&alt=media)

* To create an attribute, in the **Attributes** tab, in the actions bar, click ![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2Fsync%2F610bce9b29d67fab8ec4c9ae1dc08f8468305ab3.png?generation=1600439426498215\&alt=media). A row is added in the **Attributes** section. You can select/enter the required properties for each attribute.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2CL4FawRAfaE3p3muk%2F-M2CMDgvKRmMB22lSTuR%2FAttribute%20row%20added.png?alt=media\&token=74115b86-ae46-40f6-bdcd-6f735223e3c7)

* To set the attribute property, for the required attribute name, enter or select the appropriate values for the corresponding columns.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2DHUBIujcEgUDfVZdW%2F-M2DIfn9NnbLtOLlPEMc%2FSet%20Attribute%20Property.png?alt=media\&token=d0e450c2-d52f-4323-902a-f7d9dad65bbb)

* To search for a specific attribute value,

a. In the **Attributes** tab, in the actions bar, click<img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2CL4FawRAfaE3p3muk%2F-M2CNP00nqyPiw6dVjMx%2Fsearch%20icon.png?alt=media&amp;token=4122d2ab-d96d-4404-baae-48da864e123b" alt="" data-size="line">. Search filters are displayed for each attribute. Clicking on<img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2CL4FawRAfaE3p3muk%2F-M2CNP00nqyPiw6dVjMx%2Fsearch%20icon.png?alt=media&amp;token=4122d2ab-d96d-4404-baae-48da864e123b" alt="" data-size="line">again will hide with search filters.

b. To search for a specific attribute values, in the search filters for the respective attribute(s), select the search criteria. The attributes are displayed as per the search criteria.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2Fsync%2Ff603c07d732c21cfc976db40e9e08f408ba8bfb4.png?generation=1600439426235980\&alt=media)

* To delete a data row, in the checkbox column,

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2D9YVpzigjM3Ym9I_Q%2F-M2DFw8jI4pBVk6E9x4Q%2FDelete%20row-%20attribute.png?alt=media\&token=0e71a050-297e-42dd-9c1f-ef719586df8b)

a. Select the row(s) that you want to delete and click <img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHvebuFmgEPSTubejja%2F-MHvfdc-1JoqNltPHb8S%2Fdelete_activity%2520streams.png?alt=media&amp;token=b1509d38-0617-4d93-8961-1533b4a20f90" alt="" data-size="line"> .

b. Click **Delete**. The selected row(s) are deleted.

* To refresh the table, in the **Attributes** tab, in the actions bar, click ![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2D9YVpzigjM3Ym9I_Q%2F-M2DHP0xIst2ZzNToUrA%2FRefresh%20datasources.png?alt=media\&token=a9bc18c8-8a22-4ec8-90b8-46ba4f29b618) .


# Defining a Pre Query

The pre-query script lets you specify any custom search clause that will be appended to the default search criteria generated by the platform. You can manipulate the different components of the query that are used during the search. When your application requires implementing custom search, you can write pre query script on the datasource. The platform invokes the pre-query script for performing a search, allowing the developer to control the query being executed to obtain appropriate results.

You must write the pre-query script in the Java programming language.

* To define a pre-query, open the **\</>Pre Query** tab. The query editor is displayed. You can define your pre-query here as per the requirement.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2CYf9a4TRVsW3TB6oA%2F-M2CdTCJN9_eeptcUGNa%2FPre%20query%20tab.png?alt=media\&token=4b1a3dcc-6aee-4173-8823-7783bc65a99e)

{% hint style="info" %}

* You can call the predefined pre-query methods directly from the editor. On entering *db.* in the text editor, the list of methods is displayed. You can click on the required method from this list.
  {% endhint %}

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M3iv2e_qElxC7RccgdW%2F-M3j0PXEHi3X98CLPChh%2FPre%20query%20methods.png?alt=media\&token=5217ddd1-810a-4f49-a211-468601e8c134)


# Examples of pre-query scripts

1. The manipulation of the WHERE clause of a Search. The platform appends the result of this query to the result of the generated whereClause.

```
// check if whereClause already exists
if (whereClause.length() > 0) {
    // whereClause already exists. append AND or OR clause as required
    whereClause.append(" AND ");
}
// use bind variables. e.g. ? or :EVENT_STATUS
whereClause.append("x.EVENT_STATUS = ?");
// append the bind variable
params.add(101);
```

&#x20;2\. Advanced manipulation of the WHERE clause

```
String custNo = data.get("accountNumber");
// check if the custNo is entered by the user in the search region
if (custNo != null) {
    if (whereClause.length() > 0) {
        whereClause.append(" AND ");
    }
    if (custNo.indexOf("%") != -1) {
        // wildchar found, use LIKE instea
        whereClause.append("X.ACCOUNT_NUMBER LIKE ?");
    } else {
        whereClause.append("X.ACCOUNT_NUMBER = ?");
    }
    params.add(custNo);
}
```

&#x20;3\. Calling a PL/SQL procedure before executing the query

```
/ Get the required parameter values from the current search criteria
// provided by the user i.e. user entered values in the search panel
String customerNameDummy = data.get("partyName");
String customerNumberDummy = data.get("accountNumber");
String contactNameDummy = data.get("contactName");
String emailDummy = data.get("emailAddress");
String postalCodeDummy = data.get("postalCode");

// Prepare the model to be used invoke the Pre-Query PL/SQL Procedure
RPCModelData model = new RPCModelData();
model.set("customerName", customerNameDummy);
model.set("customerNumber", customerNumberDummy);
model.set("contactName", contactNameDummy);
model.set("contactEmail", emailDummy);
model.set("postalCode", postalCodeDummy);
model.set("searchCriteria", searchValue);
// Invoke the Pre-Query PL/SQL Procedure. This will call
// PACKAGE.INSERT_ROW Procedure
db.postObjectToDB("customerPreQueryAPI", model);
// Get the return value
Double searchValue = model.get("searchCriteria");
// Use the return value in the where clause
if (searchValue != null) {
    if (whereClause.length() > 0) {
        whereClause.append(" AND ");
    }
    whereClause.append("x.search_context_id = ? ");
    params.add(searchValue);
}
```

&#x20;4\. The manipulation of the ORDER BY clause of a search. The platform appends the result of this query to the result of the generated order by clause.

```
if (orderByClause.length() > 0) {
  orderByClause.append(", ");
}
orderByClause.append("x.NET_LOSS_AMOUNT");
```

&#x20;5\. Replacing the FROM clause of a query

```
if (someCondition) {
fromClause.setLength(0); // remove the existing FROM CLAUSE
fromClause.append(" FROM NEW_TABLE_OR_VIEW_NAME x"); // alias should always be x
}
```

&#x20;6\. Manipulating the bind variable

```
// make sure to uncheck the "Query Allowed" property for this attribute
// so that the system won't include this attr in the system generated
// where clause
String phoneNo = data.get("phoneNumber");
if (phoneNo != null) {
    if (whereClause.length() > 0) {
        whereClause.append(" AND ");
    }
    whereClause.append("x.transposed_phone_number LIKE ?");
    params.add(new StringBuilder(phoneNo.replaceAll("[^0-9]", "")).reverse().append("%").toString());
}
```

&#x20;7\. Replacing the query with a custom query with UNIONs

```
Double custAccountId = data.get("customerId");
if (custAccountId != null) {
    // backup the existing bind variables if any as we need the repeat
    // the where clause of every UNION
    List paramsCopy = new ArrayList();
    paramsCopy.addAll(params);
    StringBuffer newWhereClause = new StringBuffer();
    if (whereClause.length() > 0) {
        newWhereClause.append(" AND ");
    }
    // backup the select clause as we need to repeat for every UNION
    String sel = selectClause.toString();
    newWhereClause.append("x.bill_customer_id = ?");
    /**
     ** RA_TOTAL_ROWS will help the platform to know the total rows
     * thereby avoiding the use of an extra query to calculate the total
     * rows i.e. select count(1)
     **/
    fullSQL.append("SELECT X.*, count(1) over() RA_TOTAL_ROWS FROM (");
    fullSQL.append(sel).append(fromClause).append(" WHERE ").append(whereClause).append(newWhereClause);
    params.add(custAccountId);
    fullSQL.append(" UNION ");
    newWhereClause.setLength(0);
    if (whereClause.length() > 0) {
        newWhereClause.append(" AND ");
    }
    newWhereClause.append("x.ship_customer_id = ?");
    fullSQL.append(sel).append(fromClause).append("WHERE ").append(whereClause).append(newWhereClause);
    params.addAll(paramsCopy);
    params.add(custAccountId);
    fullSQL.append(" UNION ");
    newWhereClause.setLength(0);
    if (whereClause.length() > 0) {
        newWhereClause.append(" AND ");
    }
    newWhereClause.append("x.customer_id = ?");
    fullSQL.append(sel).append(fromClause).append("WHERE ").append(whereClause).append(newWhereClause);
    params.addAll(paramsCopy);
    params.add(custAccountId);
    fullSQL.append(") X");
    if (orderByClause.length() > 0) {
        fullSQL.append(" ORDER BY ").append(orderByClause.toString().toLowerCase().replaceAll("_", ""));
    }
}
```

&#x20;8\. Restricting blind query by appending the following code at the end of the pre-query script

```
if (whereClause.length() == 0) {
  throw new RAException("Blind Query", "You must specify atleast one search criteria");
}
```

&#x20;9\. Query allowed By default, all attributes are query allowed and the platform automatically generates whereClause when a user perform a search on an attribute. To programmatically control the whereClause, uncheck the Query Allowed property while [defining the attribute properties](/creating-datasources/working-with-datasources/creating-a-data-source/defining-attribute-properties) to ignore those attributes while generating the whereClause.&#x20;

&#x20;10\. Custom handling of grid filters

You can access the data related to the grid filters through [FilterConfig](http://dev.sencha.com/deploy/gxt-2.2.5/docs/api/com/extjs/gxt/ui/client/data/FilterConfig.html) object. You can use`data.getFilterConfigs()` method to retrieve the list of FilterConfig.

```
import com.extjs.gxt.ui.client.data.FilterConfig;

List<filterconfig> filterConfigs = data.getFilterConfigs();
if (filterConfigs != null) {
    for (FilterConfig filter : filterConfigs) {
      if ("item".equals(filter.getField()) && filter.getValue() != null) {
        whereClause.append(" AND x.ITEM LIKE ?");
        params.add(((String) filter.getValue()).toUpperCase() + "%");
      }
    }
}
```

&#x20;11\. Range query

By default, platform generates range search fields in a simple search panel for all date and number attributes. For custom search panel, while [defining the attribute properties](/creating-datasources/working-with-datasources/creating-a-data-source/defining-attribute-properties), you can define calculated from and to attributes with **Select** and **Query Allowed** unchecked. This will limit the range for search values.

```
Date from = data.get("dateFrom");
Date to = data.get("dateTo");
if (from != null) {
    // check if whereClause already exists
    if (whereClause.length() > 0) {
        // whereClause already exists. append AND or OR clause as
        // required
        whereClause.append(" AND ");
    }
    // use bind variables. e.g. ? or :EVENT_STATUS
    whereClause.append("x.ORDER_DATE >= ?");
    // append the bind variable
    params.add(from);
}
if (to != null) {
    if (whereClause.length() > 0) {
        whereClause.append(" AND ");
    }
    whereClause.append("x.ORDER_DATE <= ?");
    params.add(to);
}
```

&#x20;12\. Query by name

The following pre-query script shows a simple approach for performing search:

```
boolean showAll = "Y".equals(db.getProfile("SHOW_ALL_ACTIVITIES"));
// from a given customer... show all activities for that customer
if (whereClause.indexOf("CUST_ACCOUNT_ID") == -1) {
    String group = data.get("groupCode");
    String dueBy = data.get("dueBy");

    if ("MY".equals(group)) {
        if (whereClause.length() > 0) {
            whereClause.append(" AND ");
        }
        whereClause.append("x.OWNER_ID = ?");
        params.add(userId);
    } else if ("ME".equals(group)) {
        if (whereClause.length() > 0) {
            whereClause.append(" AND ");
        }
        whereClause.append("x.CREATED_BY = ?");
        params.add(userId);
    }

    if (data.get("creationDate") != null) {
        if (whereClause.length() > 0) {
            whereClause.append(" AND ");
        }
        whereClause.append("x.CREATION_DATE > ?");
        params.add(data.get("creationDate"));
    }
    Date fromDate = new Date();
    Calendar c = Calendar.getInstance();
    c.setTime(fromDate);
    c.roll(Calendar.DATE, false);
    fromDate = dateUtils.getEnd(c.getTime());
    Date toDate = dateUtils.getEnd(new Date());
    Date yestDate = dateUtils.getStart(new Date());

    String statusCode = "Closed";
    if (dueBy != null) {
        if (whereClause.length() > 0) {
            whereClause.append(" AND ");
        }
        if ("YESTERDAY".equals(dueBy)) {
            whereClause.append(" x.status_code != ? AND x.PLANNED_END_DATE < ?");
            params.add(statusCode);
            params.add(yestDate);
        } else {
            whereClause.append("x.PLANNED_END_DATE > ? AND x.PLANNED_END_DATE < ?");
        }
        if ("TODAY".equals(dueBy)) {
            params.add(fromDate);
            params.add(toDate);
        } else if ("TOMORROW".equals(dueBy)) {
            c.setTime(fromDate);
            c.roll(Calendar.DATE, true);
            fromDate = c.getTime();
            params.add(fromDate);
            c.setTime(toDate);
            c.roll(Calendar.DATE, true);
            toDate = c.getTime();
            params.add(toDate);
        } else if ("THIS WEEK".equals(dueBy)) {
            c.setTime(fromDate);
            c.add(Calendar.DAY_OF_WEEK, c.getFirstDayOfWeek() - c.get(Calendar.DAY_OF_WEEK));
            fromDate = c.getTime();
            params.add(fromDate);
            c.add(Calendar.DAY_OF_YEAR, 7);
            toDate = c.getTime();
            params.add(toDate);
        } else if ("NEXT WEEK".equals(dueBy)) {
            c.setTime(fromDate);
            c.add(Calendar.DAY_OF_WEEK, c.getFirstDayOfWeek() - c.get(Calendar.DAY_OF_WEEK));
            c.add(Calendar.DAY_OF_YEAR, 7);
            fromDate = c.getTime();
            params.add(fromDate);
            c.add(Calendar.DAY_OF_YEAR, 7);
            toDate = c.getTime();
            params.add(toDate);
        }
    }

    if (!showAll) {
        if (whereClause.length() > 0) {
            whereClause.append(" AND ");
        }
        whereClause
                .append("(x.GROUP_ID IN (SELECT G.GROUP_ID FROM JTF_RS_GROUP_MEMBERS M, JTF_RS_GROUPS_B G, jtf_rs_roles_vl RL, jtf_rs_role_relations RR")
                .append(" WHERE M.GROUP_ID = G.GROUP_ID AND G.START_DATE_ACTIVE < SYSDATE AND NVL(G.END_DATE_ACTIVE, SYSDATE+1) > SYSDATE AND G.ATTRIBUTE1 = 'Y' AND M.DELETE_FLAG = 'N' AND RR.ROLE_ID = RL.ROLE_ID AND RR.role_resource_type = 'RS_GROUP_MEMBER' AND RR.delete_flag = 'N' AND M.RESOURCE_ID = ?")
                .append(" AND RR.ROLE_RESOURCE_ID = M.GROUP_MEMBER_ID AND RL.ROLE_CODE = 'GWT_MANAGER')")
                .append(" OR x.GROUP_ID IN (SELECT G.GROUP_ID FROM JTF_RS_GROUP_MEMBERS M, JTF_RS_GROUPS_B G WHERE M.GROUP_ID = G.GROUP_ID AND G.ATTRIBUTE1 = 'Y' AND G.ATTRIBUTE2 = 'Y' AND M.RESOURCE_ID = ?)")
                .append(" OR x.OWNER_ID = ? OR x.CREATED_BY = ?")
                .append(" OR EXISTS (SELECT 1 FROM xxdaz_mace_subscriptions XMS WHERE  XMS.USER_ID = ? AND XMS.ACTIVITY_ID = X.ACTIVITY_ID AND XMS.SUBSCRIBED_FLAG = 'Y'))");
        params.add(db.getUserSession().getResourceId());
        params.add(db.getUserSession().getResourceId());
        params.add(userId);
        params.add(userId);
        params.add(userId);
    }
}
```


# Pre-query variables

| **Variable**       | **Description**                                                                                                                                                                                              | **Datatype**        |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------- |
|                    |                                                                                                                                                                                                              |                     |
| **data**           | An RPCModelData instance that contains user's input from the search panel                                                                                                                                    | RPCModelData        |
| **whereClause**    | The system generated whereClause, if any                                                                                                                                                                     | StringBuilder       |
| **params**         | Binds values in an array of objects                                                                                                                                                                          | ArrayList\<Object>  |
| **selectClause**   | The select portion of the SQL query                                                                                                                                                                          | StringBuilder       |
| **fromClause**     | The from portion of the query                                                                                                                                                                                | StringBuilder       |
| **orderByClause**  | The order by clause of the query, if any                                                                                                                                                                     | StringBuilder       |
| **fullSQL**        | selectClause + fromClause + whereClause + orderByClause                                                                                                                                                      | StringBuilder       |
| **db**             | An instance of ScriptUtil class                                                                                                                                                                              | NA                  |
| **dateUtils**      | An instance of DateUtils class                                                                                                                                                                               | NA                  |
| **user**           | The username of the signed in user                                                                                                                                                                           | NA                  |
| **userid**         | Userid of the signed in user                                                                                                                                                                                 | Double              |
| **subDomain**      | The subdomain of the current application                                                                                                                                                                     | NA                  |
| **dsName**         | The alias name of the current datasource                                                                                                                                                                     | NA                  |
| **skipQuery**      | To skip the query execution, set this to true while [defining datasource details](/creating-datasources/working-with-datasources/creating-a-data-source/defining-data-source-details)                        | boolean             |
| **rows**           | The data to be returned to the browser when skipQuery is set to true while [defining datasource details](/creating-datasources/working-with-datasources/creating-a-data-source/defining-data-source-details) | List\<RPCModelData> |
| **skipPagination** | To fetch all the rows in at once, set this to **Y** while [defining datasource details](/creating-datasources/working-with-datasources/creating-a-data-source/defining-data-source-details)                  | NA                  |


# Defining a Post Query

The post query script lets you manipulate the data after it is fetched from the database. You must write the post query script in the Java programming language.

{% hint style="warning" %}
In order to use a post query, you must ensure that you select the **Call Post Query** checkbox while [defining the data source details.](/creating-datasources/working-with-datasources/creating-a-data-source/defining-data-source-details)
{% endhint %}

* To define a post query, open the **\</>Post Query** tab. The query editor is displayed. You can define your post query here as per the requirement.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M3LD6U1r_f8HzpGlkTo%2F-M3LDO345DsqmVSCwIQl%2FPost%20query%20tab.png?alt=media\&token=65993ce4-718a-4e61-81d1-3d0cf7913f9d)

{% hint style="info" %}
You can call the predefined post query methods directly from the editor. On entering *db.* in the text editor, the list of methods is displayed. You can click on the required method from this list.
{% endhint %}

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M3j0ohwkfaZIf8saK8J%2F-M3j0vZqPHENW5q_IUNy%2FPost%20query%20methods.png?alt=media\&token=5056f34a-12a4-4d17-882d-bc9c2dbd587c)

## Examples

1. If you add the following post query to your datasource, on refreshing the data, the user will not able to view the time component in the start date. However, in the database, the start date will store the time component.

```
Date startDate =   data.get("startDate");
data.set("startDate",dateUtils.clearTime(startDate));
```

Another example

```
Object fileName = db.evaluateSeIectSQL("select File_name from RA_FILES WHERE FILE_ID = "+data.get("attachmentId") + "AND FILE_REVISION = 1");

Object fileSize = db.evaluateSelectSQL("seIect File_size from RA_FILES WHERE FILE_ID = "+ data.get("attachmentId") + " AND FILE_REVISION = 1");

if (fileName ! = null && fileName.trim().lastIndexOf(".") ! = -1) {
data.set("filetype", fileName.substring(fileName.trim().lastlndexOf(".")));
}

if (data.get("parentdocument") != null ) {
Object parentDocName = db.evaluatese1ectSQL("se1ect DOC_NAME from DMS_DOCUMENT_DATA WHERE DOC_ID =" + data.get("parentDocument"));
data.set("parentDocumentName", parentDocName);
}
```


# Passing data from pre-query to post query

To store a parameter value at the session level and then re-use it in a pre-query, post-query or server side validation script; use the following methods:

* To set the data at the session level,

```
db.setSessionData(key, value);
```

* To retrieve the stored value from the pre query/post query/server-side validation script,

```
db.getSessionData(key);
OR
db.removeSessionData(key);
```


# Defining server side validations

DML operations can be performed on a datasource that is based on a database table. The platform automatically generates appropriate insert, update and delete statements based on the metadata of the datasource and the operations performed by the user through the UI.

Server-side validations are actions that are performed to validate the data prior to posting it to the database or after fetching it from the database. The server-side validation script, written in the Java programming language, is executed in the sequence you defined.

For example, if there are fields named start date and end date in the user interface, the user must not be allowed to enter a start date that is greater than the end date. Such validations are performed using server-side validation scripts.

1. To define a server-side validation, open the **Server Side Validations** tab.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2DVmPPCJE2GsdukOBP%2F-M2DVrRG8L8Xo0K81vd2%2FServer%20side%20validations%20tab.png?alt=media\&token=339fa6db-b031-4280-baa5-95d61869c8cc)

&#x20;2\. To add a validation script, in the upper right corner of the **Validations** pane, click![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2DVmPPCJE2GsdukOBP%2F-M2DWYrm8yH4ei2vUrSK%2FAdd%20Attribute.png?alt=media\&token=2701e7e0-9e1b-4327-96a9-92c76a671e2e). In the **Validations** pane, a row for displaying the script details is added. In the right pane, the options for defining a server side script are enabled.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2DVmPPCJE2GsdukOBP%2F-M2DXATF3qwtWfIi-9Mv%2FSever%20side%20validations%20options%20enabled.png?alt=media\&token=6243b450-a436-42e6-ade6-cf1a1e758a08)

&#x20;3\. Enter and select the required parameters.

| **Parameter**       | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Seq**             | A sequence number that is used to execute the validation scripts in a defined order                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **Name**            | <p>A name for the validation script</p><p>For example, Active Dates Validation</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| **Active**          | Indicates that the validation script is active and will be fired based on the defined conditions                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| **Before Insert**   | <p>Indicates that the script is fired before inserting the row into the database. This is fired for each row and the row is available as a variable named ‘data’.</p><p>You can use the get and set methods on the data to access the attribute values. For example, you can use data.get("startDate"); and data.set("startDate", new Date()); to fetch and update the date.</p><p>General use cases:</p><p>a. Validating user submitted information before inserting into the database</p><p>b. Manipulating the data before inserting</p> |
| **After Insert**    | <p>Indicates that the validation script is fired after inserting the row into the database. The changes made to the data will not reflect in the database.</p><p>General use cases:</p><p>a. Send notification and/or email</p><p>b. Invoke/update another dataSource</p>                                                                                                                                                                                                                                                                   |
| **Before Update**   | Indicates that the validation script is fired before updating the row                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| **After Update**    | Indicates that the validation script is fired after updating the row                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| **Before Delete**   | Indicates that the validation script is fired before deleting the row                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| **After Delete**    | Indicates that the validation script is fired after deleting the row                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| **Before Validate** | <p>Indicates that the validation script is fired before validating the row.</p><p><strong>Note</strong>: Validate operation is fired only when the UI field has the ‘Server Validate On Change’ property enabled.</p>                                                                                                                                                                                                                                                                                                                       |
| **After Validate**  | Indicates that the validation script is fired after validating the row                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **Before Import**   | Indicates that the validation script is fired before importing the row from an MS Excel sheet                                                                                                                                                                                                                                                                                                                                                                                                                                               |

&#x20;4\. Enter your script in the script editor and click **Save**.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2DX_krg8m3CjEmZOEN%2F-M2DXci1hCmhe1e5nQ2K%2FSave%20server%20side%20validation.png?alt=media\&token=f7c026e9-a5bb-436c-9f3d-de9f96fb1e96)


# Validation sequence

The following sequence is followed for the execution of different types of validations when a DML operation is performed:

1. Call the method handleBeforeProcessRows() on the custom handler once for all the collection of rows that are being posted. The collection of rows includes rows with operations insert, update, delete and validate.
2. Check if the isSkipDML() method returns the value true on the custom handler. If so, then skip all the steps given below.
3. Check if the user has access to perform the insert operation on the DataSource. If not, an exception is thrown to the user and all the steps given below are skipped.
4. If you are performing an update operation, fetch the row from the database matching the primary key values and throw an exception when either zero or more than one rows match the primary key values.
5. Execute the before insert/update/delete/validate validation script in the order of given sequence.
6. Invoke the handleBeforeInsertRow(), handleBeforeUpdateRow(), handleBeforeDeleteRow() or handleBeforeValidateRow() method call on custom handler depending on the type of operation performed on a given row.
7. Set default values based on the attribute definition.
8. Post the data to the database.
9. Insert the activity stream.
10. Execute the after insert/update/delete/validate validation script in the order of given sequence.
11. Call the handleAfterInsertRow() method on the custom handler.
12. Call the handleAfterProcessRows() method on custom handler once for all the collection of rows that are being posted.

{% hint style="info" %}
**Note:** The steps 3 to 6 are performed in a group for each row in a loop. Similarly, steps 10-11 are performed in a group for each row in the collection.
{% endhint %}


# Adding conditional defaulting rules

You can define default attribute values for a given condition.

For example, if you want to populate the end date field when the Active checkbox is selected in the user interface, add the following validation script at the before insert and before update level.

```
String active = data.get("active");
String oldActive = null;
 if (dbdata != null) {
    oldActive = dbdata.get("active");;
}
if ("N".equals(active)  && (oldActive == null || "Y".equals(oldActive))) {
   data.set("endDate", new Date());
}
```

{% hint style="info" %}
**Note**: dbdata is available for the update scripts and has the values fetched from the database. You can use it to compare the old values to the values updated by the user.
{% endhint %}


# Assigning roles to a data source

Datasources are secured by assigning roles with permissions for access and other operations. You can assign a datasource to one or more roles. You can control their level of access by selecting the required permissions during the creation of datasources.

1. To assign roles to a datasource, open the **\</>Roles** tab. The **Roles** pane is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2HAxEKyIlOZ38_8y5d%2F-M2HClkU68-o83A2dBPi%2FRoles%20Pane.png?alt=media\&token=d734d895-627e-4775-91f6-e3eaef809748)

&#x20;2\. To select a role to assign permissions, in the upper right corner of the **Roles** pane, click **Add.**

A row is added in the **Roles** table.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fcloudio-new-documentation%2F-M2H9SQseC-rcy7QzMMw%2F-M2HALijEZLWmXd4ipm5%2F1.png?generation=1584074157661962\&alt=media)

&#x20;3\. Under the **Role** column, from the list, select a role for which permissions are to be assigned.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fcloudio-new-documentation%2F-M2H9SQseC-rcy7QzMMw%2F-M2HALikbtPDNc07lUU6%2F2.png?generation=1584074158846614\&alt=media)

&#x20;3\. To assign permissions to the selected role, select the required checkboxes in the respective columns.

The following permissions can be assigned to the roles:

| **Permission** | **Description**                                                                                                                                                              |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Insert allowed | Indicates permission to insert a new record                                                                                                                                  |
| Update Allowed | Indicates permission to update an existing record                                                                                                                            |
| Audit Allowed  | <p>Indicates permission to view the changes made by others from the Audit Page</p><p><strong>Note</strong>: Audit Page can be accessed from File>Record> Audit menu item</p> |
| Delete Allowed | Indicates permission to delete an existing record                                                                                                                            |
| Query Allowed  | Indicates permission to fetch data                                                                                                                                           |

&#x20;4\. If you want to assign permissions to another role, repeat steps 1 to 4 or click **Save**.

The selected permissions are assigned to the role(s).


# Defining email actions

Email actions are defined for a datasource to send email notifications when a user performs any DML operation through the user interface.

To define an email action,

1. In the **Details** tab, under **Actions**, click ![C:\Users\user\Dropbox\Preeti\_ibruk\CloudIO\Deliverables\Icons\Add Attribute.png](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fcloudio-new-documentation%2F-M2HCsG_ysFH61cWcVZL%2F-M2HD9PWLKP_N9IBkjoN%2F0.png?generation=1584074893574733\&alt=media). The **Actions** window is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fcloudio-new-documentation%2F-M2HCsG_ysFH61cWcVZL%2F-M2HD9PXHMz4uIMJp8fn%2F1.png?generation=1584074893626146\&alt=media)

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fcloudio-new-documentation%2F-M2HCsG_ysFH61cWcVZL%2F-M2HD9PYHWC6krkje1Ij%2F2.png?generation=1584074894627854\&alt=media)

&#x20;2\. Enter/select the following details:

| **Field**       | **Description**                                                                                                                                                           |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name            | The name of the action                                                                                                                                                    |
| Active          | Indicates an email is to be sent after every select operation                                                                                                             |
| Insert          | Indicates an email is to be sent after every insert operation                                                                                                             |
| Update          | Indicates an email is to be sent after every update operation                                                                                                             |
| Delete          | Indicates an email is to be sent after every delete operation                                                                                                             |
| Start Date      | The start date for the action                                                                                                                                             |
| End Date        | <p>The end date for the action</p><p><em><strong>Note</strong>: If end date matches with the system date ,then the action will become inactive.</em></p>                  |
| Description     | The description of the action being defined                                                                                                                               |
| Condition       | <p>The expression for the condition on which the email is to be sent<br><em><strong>Note</strong>: The email will be sent when the expression evaluates to true.</em></p> |
| Email Address\* | The email address to which the notification is to be sent                                                                                                                 |
| Attachment      | The attachment to be sent with the notification                                                                                                                           |
| Subject\*       | The subject of the notification email                                                                                                                                     |
| Cc/Bcc          | Email addresses of the participants to be copied                                                                                                                          |

&#x20;3\. In the rich text editor, enter the contents of the notification email that is to be sent and click **Save**.

The email action is saved for the datasource.

The following expressions can be used in place of dynamic values in the **Email Address**, **Subject**, **Body** and **Attachment** fields:

| **Expression**                                                 | **Function**                                                                                                                                      |
| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| #{attributeName}                                               | To replace an attribute value of the record being inserted, updated or deleted                                                                    |
| #{parent.attributeName}                                        | To use an attribute value from the master record, if it exists                                                                                    |
| #{dbrow\.attributeName}                                        | To refer a value from the database for update actions                                                                                             |
| #{session.sessionValue}                                        | To access session variables                                                                                                                       |
| #{SELECT 'x' from some\_table WHERE column = #{attributeName}} | <p>To create a nested expression.</p><p><em><strong>Note</strong>: The innermost expression will be evaluated before the out expression.</em></p> |


# Performing DML operations using stored procedures

By default, the CloudIO platform performs direct DML operations on a table. However, you should always perform DML operations through an API or stored procedures instead of direct table updates, as they act as an additional security layer between the application and the table.

To use API or stored procedures,

1. [While defining the datasource details](/creating-datasources/working-with-datasources/creating-a-data-source/defining-data-source-details), select the **Use API** checkbox.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2Fsync%2F1bead86b29a88456ff49614b194e9bbd8e1442d4.png?generation=1600439426362112\&alt=media)

&#x20;2\. In **API name**, enter the PL/SQL package name or the stored

procedure prefix for MySQL/MS SQL Server.

{% hint style="info" %}
**Note**: To download the boilerplate code, in the upper right corner, from the **Actions** list, click **PL/SQL spec**.
{% endhint %}

The following stored procedures can be used to perform DML operations on a table:

| **Stored procedure** | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| POST\_QUERY          | Will be invoked if the **Call Post Query** checkbox is selected while defining datasource details. Refer [Defining datasource details](/creating-datasources/working-with-datasources/creating-a-data-source/defining-data-source-details).                                                                                                                                                                                                                                                |
| INSERT\_ROW          | <p>Will be invoked when creating a new record.</p><p><strong>Note</strong>: There are some parameters that are IN OUT type. That is because they have either the Out Param or the Primary Key checkboxes selected while <a href="/creating-datasources/working-with-datasources/creating-a-data-source/defining-attribute-properties">defining the attribute properties</a>. When a parameter is IN OUT, then the values set in the procedure will be reflected in the user interface.</p> |
| UPDATE\_ROW          | Will be invoked when updating an existing record                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| DELETE\_ROW          | Will be invoked when deleting a record                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| VALIDATE\_ROW        | Will be invoked on changing a value of a field on the user interface of which the *Server Validate On Change* property is enabled.                                                                                                                                                                                                                                                                                                                                                         |
| POST                 | Will be invoked in the PL/SQL table mode, where all the dirty records (Insert/Update/Delete) will be passed at once as a PL/SQL table.                                                                                                                                                                                                                                                                                                                                                     |

{% hint style="info" %}
**Note**: All the procedures except POST are called once for every record.

If you want to invoke an existing PL/SQL API, use the auto generated package as a wrapper package to call any existing APIs.
{% endhint %}

{% hint style="danger" %}
**Note:** Whenever a new parameter is added, or an existing parameter name or data type is changed, ensure that you download boilerplate code again and check if the parameters in the database are in the right sequence as in the boilerplate code.

* Do not re-compile the boilerplate code in the database once you have implemented the business logic, as it may override any changes that you may have added to the database.
* Use the downloaded code only for reference purposes.
  {% endhint %}


# VALIDATE\_ROW procedure

The ***VALIDATE\_ROW*** procedure is invoked when the user makes changes to a field on the user interface for which the *Server Validate On Change* property is enabled. You can perform any business validation or define default values to fields in PL/SQL without writing any Java Code for server-side validations.

```
PROCEDURE VALIDATE_ROW(
 P_ACTIVE IN OUT VARCHAR2
 , P_CREATED_BY IN OUT NUMBER
 , P_CREATION_DATE IN OUT DATE
 , P_DESCRIPTION IN OUT VARCHAR2
 , P_END_DATE IN OUT DATE
 , P_LAST_UPDATED_BY IN OUT NUMBER
 , P_LAST_UPDATE_DATE IN OUT DATE
 , P_LIST_PRICE IN OUT NUMBER
 , P_LONG_DESCRIPTION IN OUT VARCHAR2
 , P_PRODUCT_CODE IN OUT VARCHAR2
 , P_PRODUCT_ID IN OUT NUMBER
 , P_PRODUCT_NAME IN OUT VARCHAR2
 , P_START_DATE IN OUT DATE
 , P_CHANGED_ATTRIBUTE IN OUT VARCHAR2
 , P_CHANGED_ATTRIBUTE_OLD_VALUE IN OUT VARCHAR2
 );
```

All the parameters are of the type *IN OUT*. You can set or change any field values in the *VALIDATE\_ROW* procedure and they get reflected in the UI.

P\_CHANGED\_ATTRIBUTE has the name of the parameter, the changes to which triggered the VALIDATE\_ROW call. For example, if the user changes the *Product Name* field on the user interface, P\_PRODUCT\_NAME will be the changed attribute.

P\_CHANGED\_ATTRIBUTE\_OLD\_VALUE will contain the old value of the parameter that was set before it was updated by the user. If there was no value initially, it is set to NULL. The actual parameter, P\_PRODUCT\_NAME in this case, will have the new value.


# POST\_QUERY procedure

**POST\_QUERY** procedure gets invoked for each row after data fetched from the database and before it is displayed to the user. You can use this procedure to populate any lookup meaning fields based on the lookup code/id values. If required, you can manipulate the data as per the business logic. All the parameters are of type *IN OUT*.


# Generating a data source

A quick way for creating a data source is by auto-generating it from a database table or a view. Here, we don't provide the table name while generating the data source. Instead, we fetch the required data by defining pre-queries and post queries.

1. In the top right corner of the menu bar, click ![C:\Users\user\Dropbox\Preeti\_ibruk\CloudIO\Deliverables\Icons\NavigationMenu.png](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fcloudio-new-documentation%2F-M2HHy_Ft5bm5camEmi7%2F-M2HJVW6G8yl3H4otnVL%2F0.png?generation=1584076557118048\&alt=media). The navigation pane is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fcloudio-new-documentation%2F-M2HHy_Ft5bm5camEmi7%2F-M2HJVW7gV7P8TiFT7q0%2F1.png?generation=1584076557162290\&alt=media)

&#x20;2\. Under the required role group, click **Manage Datasources**.

The **Manage DataSources** page with the list of datasources is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fcloudio-new-documentation%2F-M2HHy_Ft5bm5camEmi7%2F-M2HJVW8O5F25jbBrgWB%2F2.png?generation=1584076557141776\&alt=media)

&#x20;3\. In the upper right corner of the **Manage Datasources** page, click **Generate Datasource**.

The **Generate Datasource** window is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fcloudio-new-documentation%2F-M2HHy_Ft5bm5camEmi7%2F-M2HJVW9Gq7NwI8Tpd3W%2F3.png?generation=1584076557143373\&alt=media)

&#x20;4\. In **SQL Query or Table Name,** enter the API name without the environment URL or paste the data in JSON format.

Sample JSON:

```
{
 "Employee": {
 "FirstName": "Sriaknth",
 "LastName": "A"
 }
}
```

{% hint style="warning" %}
Note&#x20;

This field must be left **blank** if the data source is being generated using a **database object**.

Enter the value in this field only if the data source is being generated using a **live connector**.
{% endhint %}

&#x20;5\. Define the datasource details:

| **Datasource detail**                                                                                                                      | **Description**                                                                                                                                                                                                                                                                                                                                         |
| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Datasource Name                                                                                                                            | <p>A unique name for the datasource</p><p><em><strong>Note</strong>: The datasource name field does not accept any spaces and special characters.</em></p>                                                                                                                                                                                              |
| Assign To Role                                                                                                                             | The role to which the datasource is to be assigned                                                                                                                                                                                                                                                                                                      |
| Params                                                                                                                                     | ***Note**: Do not enter any value here.*                                                                                                                                                                                                                                                                                                                |
| Object Connection Code                                                                                                                     | <p>A connection code for connecting to different schemas/databases.</p><p><em><strong>Note:</strong> The object connection details of these schemas/databases must be defined in the <strong>Setup</strong> page. If you are using the default application schema under the current subdomain, you must not select any Object Connection Code.</em></p> |
| <p>Access permission checkboxes:</p><ul><li>Insert<br>Allowed</li><li>Update Allowed</li><li>Query Allowed</li><li>Audit Allowed</li></ul> | Indicate the access privileges to the role                                                                                                                                                                                                                                                                                                              |

&#x20;6\. Click **Generate**.

The datasource is generated. You can further edit and define details from the [Manage Datasources](/creating-datasources/working-with-datasources/managing-datasources) page.


# Managing datasources

The CloudIO platform provides a user-friendly interface for editing, deleting and duplicating datasources; downloading patches; and managing roles.

To manage your datasources,

1. In the top right corner of the menu bar, click ![C:\Users\user\Dropbox\Preeti\_ibruk\CloudIO\Deliverables\Icons\NavigationMenu.png](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fcloudio-new-documentation%2F-M2HL2PXcrM1Y-W_egV1%2F-M2HLS6UAcR2by3BCwTi%2F0.png?generation=1584077067276739\&alt=media). The navigation pane is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fcloudio-new-documentation%2F-M2HL2PXcrM1Y-W_egV1%2F-M2HLS6VqVnv66Nr9AKJ%2F1.png?generation=1584077067304026\&alt=media)

&#x20;2\. Under the required role group, click **Manage Datasources**.

The **Manage DataSources** page with the list of datasources is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fcloudio-new-documentation%2F-M2HL2PXcrM1Y-W_egV1%2F-M2HLS6WCvVrGshpvzsv%2F2.png?generation=1584077067315303\&alt=media)

&#x20;3\. To edit the datasource details, on the required datasource, click![C:\Users\user\Dropbox\Preeti\_ibruk\CloudIO\Deliverables\Icons\Edit datasources.png](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fcloudio-new-documentation%2F-M2HL2PXcrM1Y-W_egV1%2F-M2HLS6Xw3oCvaQQrmHF%2F3.png?generation=1584077067289216\&alt=media). The edit page is displayed. You can edit the required details here. For more information, refer [Creating a data source.](/creating-datasources/working-with-datasources/creating-a-data-source)

&#x20;4\. To duplicate a datasource, on the required datasource, click ![C:\Users\user\Dropbox\Preeti\_ibruk\CloudIO\Deliverables\Icons\Duplicate datasource.png](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fcloudio-new-documentation%2F-M2HL2PXcrM1Y-W_egV1%2F-M2HLS6Ybn0xICQaSdhM%2F4.png?generation=1584077067610816\&alt=media). A new datasource is created replicating the details of the selected datasource. You can edit the required details.

&#x20;5\. To prepare the patch for the datasource, on the required datasource, click ![C:\Users\user\Dropbox\Preeti\_ibruk\CloudIO\Deliverables\Icons\Download datasource patch.png](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fcloudio-new-documentation%2F-M2HL2PXcrM1Y-W_egV1%2F-M2HLS6ZNH1vf1kFkuiq%2F5.png?generation=1584077067291166\&alt=media). A confirmation box is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2HOfJjclFEXcyAuZwY%2F-M2HPCj5i5xlotjx7end%2FPrepare%20datasource%20patch.png?alt=media\&token=7ee1c456-3b35-40ee-81b7-042ab06bfcf3)

In the confirmation box, click **Yes**. A processing request message is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2HOfJjclFEXcyAuZwY%2F-M2HPg5FAKkuDCEZOhR2%2FPatch%20being%20processed.png?alt=media\&token=2d506f61-83f7-4bf7-87b2-18168030ecb3)

To view the patch, click **Go to patches screen**.&#x20;

OR

Click **Okay**.

&#x20;6\. To delete a datasource, on the required datasource, click <img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MHvebuFmgEPSTubejja%2F-MHvfdc-1JoqNltPHb8S%2Fdelete_activity%2520streams.png?alt=media&amp;token=b1509d38-0617-4d93-8961-1533b4a20f90" alt="" data-size="line">&#x20;

A confirmation box is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2HOfJjclFEXcyAuZwY%2F-M2HQG5mTmE-Ry7me4CV%2FDelete%20datasource.png?alt=media\&token=2d8f46fd-fbc6-41ff-93d3-0dcf4a040150)

In the confirmation box, click **Yes**. The selected datasource is deleted.

&#x20;7\. To manage the roles associated with the datasource, click <img src="https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MIIrmblSUqvzzRy45Sg%2F-MIIshicurBLY6Kth28D%2Fdatasourcerole.png?alt=media&amp;token=cd0616bf-8dcd-4a1f-8a57-0b86b2124383" alt="" data-size="line">&#x20;

The **Roles** window is displayed. You edit the required details here.&#x20;

For more information, refer [Assigning roles to a data source](/building-your-first-application/building-your-first-application/creating-datasources/assigning-roles-to-a-datasource).


# Accessing data sources using REST API

REST stands for Representational State Transfer also referred to as ReST and defines an architecture style for designing networked applications.. It is a set of rules that the developers follow while creating APIs and allowing programs to interact with each other.

REST is a simple, lightweight, full-feature alternative to complex mechanisms like COBRA, RPC (Remote Procedure Calls) and Web Services (SOAP, WSDL).

REST relies on a stateless, client-server, cacheable communications protocol; in virtually all the cases, this is Hyper Text Transfer Protocol (HTTP).

The World Wide Web that is based on HTTP can be viewed as a REST-based architecture. RESTful applications use HTTP requests to post data (create and/or update), read data (make queries), and delete data. Thus, REST uses HTTP for all four CRUD (Create/Read/Update/Delete) operations.

REST is not a ‘standard’. For example, there will never be a W3C recommendation for REST. Although there are REST programming frameworks, working with REST is simple and you can easily use it with standard library features in languages like Java, Perl or C.

CloudIO Platforms REST Services are built using Java around the datasources that are used by the user interface layer. Hence, you can reuse the existing business logic defined at the datasource layer between the User Interface and the REST Web Services Clients.

CloudIO Platform can pull and push data from any JDBC2 compliant databases natively via JDBC calls. Hence, if you are trying to build a user interface using CloudIO Platform against your existing database, you create a native JDBC connection between the CloudIO Platform and the database natively using JDBC.

Shown below are some use cases where CloudIO REST APIs can be used:

| **Use Case**                           | **Example**    |
| -------------------------------------- | -------------- |
| E-Commence web integration             | Magento        |
| Native mobile application development  | iOS or Android |
| 3rd party or legacy system integration | 3PLs           |


# Understanding CloudIO REST APIs

A REST resource in CloudIO can be any piece of information, ranging from a single data record to a collection of records. Each resource in the CloudIO REST API:

* is identified by a named URI
* is accessed using the standard HTTP POST method
* are used to interact with any datasource within CloudIO Platform

For example, you can:

* Obtain detailed information about any CloudIO datasource such as RaUsers or RaRoles
* Obtain detailed information about any application-specific datasource
* Perform a search on any datasource
* Insert, update or delete records

The prominent characteristics of the CloudIO REST API resources and architecture include:

* **Stateless**  Every request from the client to the server contains all the information necessary to understand the request along with the sessionId.
* **Caching** Since all the REST APIs are executed via a datasource and in real-time against a database, the results are not cacheable.
* **HTTP**  All REST APIs are accessed using the HTTP.
* **URI**  All REST APIs are named using a base URI that follows your CloudIO URI. For example, \[[https://host:port/api/Datasource\[/operation\](https://host:port/api/Datasource\[/operation)\\](https://host/:port/api/Datasource\[/operation]\(https://host:port/api/Datasource\[/operation\)/)] where operation is one of the following values—insert, update, delete, post or query


# Authentication

CloudIO REST API supports authentication using username and password, or with a key and secret, or with OAuth 2.0, an open protocol that allows secure API authorization.

## JSON

Both the request and response payloads are in JavaScript Object Notation (JSON) format with UTF-8 encoding. Date-time information is in ISO 8601 format. For example, 2012-08-30T02:56:20.000-0700

## Understanding authentication

CloudIO uses the OAuth protocol to allow the users of the application to securely access data without having to reveal their username and password credentials. For a simple integration, CloudIO supports username and password, or a key and secret option. Before making REST API calls, the client application must authenticate the application user using one of these methods. After successfully authenticating the client application user with CloudIO, the client receives a *sessionId* token which are used to make authenticated REST API calls.

To generate a token and secret key, sign into the CloudIO Platform and navigate to /api/keys though the browser.

The *sessionId* attribute in the response is stored by the client application and is passed in all the subsequent authenticated REST API calls. The *sessionId* expires if the client application is inactive for the number of minutes exceeding those specified in the *sessionTimeout* attribute. You can set the *sessionTimeout* for the REST client user using default session timeout CoudIO profile at the user level.

{% hint style="success" %}
**Note:** The client application will have access to the datasources that are assigned to the roles accessible to the connected user.
{% endhint %}

## Checking the validity of an existing session

The *sessionId* passed in every REST API request must be valid and active. You can use *validateSession* API to validate a given sessionId before making the actual REST API request.


# Error handling

It is possible that a REST API request may result in an error.

* You must always check for error or \_error in the response and if the value is Y, then you can conclude that the API has resulted in an error.
* You must check for errorTitle and errorMessage for the reason for the failure. If the failure is due to the expired *sessionId* passed, then *sessionExpired* will be set to Y.
* For debugging, you can check the corresponding sqlCall for the SQL query that caused the exception, and the corresponding datasource call for the datasource that caused the exception.
* If the client user is an administrator, then an additional attribute *adminMsg* is populated with a more detailed error message.


# Performing query operations

Query or search operations can be used to fetch data out of CloudIO Platform. Special characters in the attribute names and values can be passed with the request payload.

The name-value pairs specified as part of the data JSON Object may use the following special characters to perform a complex search

## Performing an insert operation

Using the insert operation, the client application can insert one or more rows in the table. JSON POST uses the JSON Array payload of the objects type with name-value pairs, where the name should match the datasource attribute name in camel case format.

For example, *Customer Name* attribute should be named as *customerName* for the key in the JSON Object.

The URI to perform the insert operation: */api/Datasource/insert.*

**Sample JSON payload for an insert operation**

```
[
 "accountNumber": "345354",
 "address1": "100 Main St",
 "creationDate": "2015-10-28T01:42:30.789Z",
 "createdBy": 1,
 "lastUpdateDate": "2015-10-28T01:42:46.964Z",
 "lastUpdatedBy": 1,
 "partyName": "CloudIO Inc."
,
 "accountNumber": "345355",
 "address1": "333 Main St",
 "creationDate": "2015-10-28T01:42:30.789Z",
 "createdBy": 1,
 "lastUpdateDate": "2015-10-28T01:42:46.964Z",
 "lastUpdatedBy": 1,
 "partyName": "CloudIO India Pvt. Ltd.
]
```

{% hint style="info" %}
**Note**: Ensure that all the attributes that are marked mandatory at the datasource level are populated.
{% endhint %}

## Performing an update operation

Using the update operation, the client application can update one or more rows in the table. JSON POST uses the JSON Array payload of the type—objects. All the primary key attributes must have a value, and only the values of the attributes that are passed in the payload are updated.

The URI to perform the update operation: /api/*DataSource*/*update*

## Performing a delete operation

Using the Delete operation, the client application can delete one or more records from the DB. JSON POST uses the JSON Array payload of the type—objects. Only the primary key attributes are required for the delete operation.

The URI to perform a delete operation: */api/DataSource/delete*


# CloudIO REST API playground

CloudIO Platform offers two REST API playgrounds for the developers to make REST API calls.

The first API playground can be accessed via a URI/api for making guided REST API calls. It offers a simple UI for the developer to select a data source and enter the parameter values for performing the REST API calls. The system automatically generates the REST payload in real-time.

The second API playground can be accessed via a URI /jsontest for testing the APIs with a given REST payload. In addition to this, it offers a simple solution for load testing of the REST APIs.


# Working with Pages


# Understanding pages and their types

A page is the canvas on which the user interface of the application is built. We build the user interface by placing various components on the page.

## Viewing the existing pages:

1. In the **Navigation menu**, under the **Developer** role, in the **Developer** group, click **Pages**. The list of all existing pages is displayed.

![List of existing pages](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2IeydQ9fT4EgGrMzGA%2F-M2IfUoqXbGVhVm-pbb2%2FList%20of%20pages.png?alt=media\&token=5681c5b4-812b-4e2c-be28-f60909647841)

{% hint style="info" %}
Note

To open the page canvas and design the user interface, click the required page URL.
{% endhint %}

## Understanding the types of pages

| **Page type** | **Description**                                                                                                                                                            |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Abstract**  | <p>These pages can be used as pre-defined template pages and to shelter multiple child pages.</p><p><em>You cannot edit the abstract pages through its leaf page.</em></p> |
| **Extension** | These pages can be used as a component in different user interfaces throughout the application.                                                                            |


# Creating a page

1. In the **Navigation** **menu**, under the **Developer** role, in the **Developer**

   group, click **Pages**. The list of all existing pages is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M1cvwzKOL9chBoVRmso%2F-M1cwcdxelAPW741sKn1%2FList%20of%20pages.png?alt=media\&token=d39c2099-05ee-4d73-be5a-a9e534d07006)

&#x20;2\. On the top-right corner, click ![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M1_9Ha4kZEJgLjsB7xQ%2F-M1_DCGfQvqSg3QeKR5W%2FCreate%20page%20icon%20using%20navigation%20menu.png?alt=media\&token=c0007ac3-12ca-4514-9961-bcdd56999cb0) .

A new page is created, and its properties are displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M1cwhef4Lc486vkFPpP%2F-M1cxveEbEEGHe3mrfcZ%2FNew%20Page%20screen.png?alt=media\&token=d902bf18-ea00-4063-a981-c91902d4b02b)

&#x20;3\. Under the **Page Details** tab, enter the following details as required:

| **Label**             | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Page Name**         | <p>Name of the page used by the developer to navigate to the page properties and page canvas.</p><p><em>We recommend that the page name reflects its functionality.</em></p>                                                                                                                                                                                                                                                                                                                                                                       |
| **Page Code**         | <p>Unique code assigned to the page that is used while accessing the page from a different page.</p><p><em>The value is auto-generated and you can edit it, if required.</em></p><p><em>The code is mainly required while specifying the page details in the <strong>Open URL</strong> component.</em></p>                                                                                                                                                                                                                                         |
| **Page State**        | <p>Unique code status assigned to the page that is used while accessing the page within a single application.</p><p><em>The value is auto-generated and you can edit it, if required.</em></p><p><br>The state object is where the property values that belongs to the component (a page as a whole) is referred. When the state object changes, the component re-renders.<br>This is important when designing single page applications.<br><em>The state is mainly required while specifying the page state in the Go to page component.</em></p> |
| **Page State Params** | <p>Parameters can be passed to page state in form of json. These params can be evaluated in the target page using expression: <strong>#{page.paramname}</strong><br><em>For example: { vendorno : ‘02150’, vendortype: ‘supplier’ }</em></p>                                                                                                                                                                                                                                                                                                       |
| **Seq No**            | <p>Sequence of the page name under the menu group</p><p><em>The value is auto-generated and you can edit it, if required.</em></p><p><em>When this value is duplicated, pages are displayed in alphabetical order.</em></p>                                                                                                                                                                                                                                                                                                                        |
| **URL**               | The URL to access the page in the application                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **Abstract**          | Select if the page is to be used as a template.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **Pre-Fetch**         | Select if the page is to be used for offline transactions.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **Icon**              | <p>Select a suitable icon for the page from the list that will be displayed in the browser tab.</p><p><em>By default, the page holds a desktop icon.</em></p>                                                                                                                                                                                                                                                                                                                                                                                      |
| **Group Header**      | <p>Menu group under which you can view the page in the <strong>Navigation</strong> <strong>menu</strong>.</p><p><em>By default, the newly created pages can be viewed under the <strong>My Menu Group</strong>.</em></p><p><em>You can edit the name to create a new group header. In the <strong>Navigation</strong></em> <em><strong>menu</strong>, this group header will appear under the roles assigned to the page.</em></p>                                                                                                                 |
| **Controller Name**   | <p>Unique page controller name</p><p><em>Currently, this feature is not in use.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **Start Date**        | <p>Date from which the page will be active</p><p><em>By default, it is the current date.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **End Date**          | Date after which the page cannot be accessed                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| **Description**       | An optional explanation of the page’s functionality and/or intended purpose.                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |

&#x20;4\. Under the **Roles Granted** tab, add the roles that can view and access the page.

* On the top-right corner, from the **Actions** list, click **Add Role.**  A blank row is create&#x64;**.**
* Under the **Role** column, from the list, select the required role.
* Select the **Start Date** and the **End Date** to define the period for which the role has access to the page.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2Ih_mQeA1eOlR5zwaI%2F-M2IiW63Gvlcb7EymIX0%2FRoles%20Granted_tab.png?alt=media\&token=51214d08-48e7-4773-9705-119de7581490)

5\. On the top-right corner, click **Save**.

6\. To view the page, open the **Navigation** **menu**, and refresh the browser. The newly created page name is displayed in the Navigation menu, under the assigned role, under the page group header added


# Editing a page

{% hint style="info" %}
To know how to use the search bar, refer to the Searching platform components section.
{% endhint %}

* In the **Navigation** **menu**, under the **Developer** role, in the **Developer**  group, click **Pages**. Under the **Role** column, click the required page  name.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2Ih_mQeA1eOlR5zwaI%2F-M2IinO4P3dAiLG3K2bs%2FPage%20Navigation%20pane.png?alt=media\&token=8d90b88c-b494-4103-aa1a-ea80b14684dd)

* To edit the basic details of a page, from the left pane of the page, go to the **Page** **Details** tab. Edit the required details. *To know more, refer* [***Creating a page***](/creating-pages/working-with-pages/creating-a-page).
* To view and edit the metadata of the page and the components on it, from the left pane of the page, navigate to the **Metadata** tab.
* To upload the controller code (Deprecated) of the page, from the left pane of the page, navigate to the **Controller** tab.
* To add and edit the roles assigned to the page, from the left pane of the page, navigate to the **Roles** **Granted** tab. *To know more, refer* [***Creating a page***](/creating-pages/working-with-pages/creating-a-page).

{% hint style="danger" %}
You cannot delete a particular role added to any page, only the end date of that role should be set.
{% endhint %}

* To perform various other page related actions, on the top-right corner of the page, click **Actions**. The list has the following options:

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2Ih_mQeA1eOlR5zwaI%2F-M2Ij1UNUMt28uzwXPCz%2FActions%20dropdown.png?alt=media\&token=98230d88-cd5b-4653-97a4-01a8e7d4ca7b)

| **Options**       | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Prepare Patch** | <p>Page-level patches are used to migrate the individual page along with all the data, from one instance to another.</p><ol><li>Click to prepare the page-level patch.<br>The <strong>Request is being Processed</strong> dialog box is displayed.</li><li>Click <strong>OK</strong>.</li></ol><p><em>To understand how patches are used, refer to the</em> <a href="/working-with-patches/working-with-patches/understanding-patches"><em><strong>Working with patches</strong></em></a> <em>section.</em></p> |
| **Reset**         | Click to reset all the inputs for the page, to their initial values.                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| **New Page**      | <p>Click to create a new page.<br>The <strong>Page</strong> <strong>Details</strong> tab of the new page is displayed.</p>                                                                                                                                                                                                                                                                                                                                                                                      |
| **Add Role**      | <p>Click to view the <strong>Roles</strong> <strong>Granted</strong> tab, to add the roles that can view and access the page.</p><p><em>To know more, refer</em> <a href="/creating-pages/working-with-pages/creating-a-page"><em><strong>Creating a page</strong></em></a> <em>section</em>.</p>                                                                                                                                                                                                               |
| **Copy**          | <ol><li>Click to create a copy of the current page. A copy of the existing page is displayed.</li><li>To save the page, on the top-right corner, click <strong>Save</strong>.</li></ol>                                                                                                                                                                                                                                                                                                                         |
| **Delete Page**   | Click to delete the current page. The **Pages** page is displayed.                                                                                                                                                                                                                                                                                                                                                                                                                                              |


# Managing the version history of the page

1. In the **Navigation** **menu**, under the **Developer** role, in the **Developer** group, click **Pages**. Under the **Role** column, click the required page name.
2. Navigate to the **History** tab.
3. To revert any version of the page:

&#x20;        a. Select the required version entry.

&#x20;        b. Click **Revert To This Version**

&#x20;   4\. To compare two versions,

&#x20;       a. Select the required version entries.

&#x20;       b. At the top of the list, click the icon as shown below :

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M1_KjesF54TW1HrBJ3T%2F-M1_Mjh3AEp18sK23uBO%2FShow%20difference%20in%20versions.png?alt=media\&token=2fb4a697-7b31-4211-833d-e4787795c4c3)

The **Difference between** dialog box is displayed with the HTML code of the older version of the page with the changes in the newer version highlighted.

{% hint style="info" %}
To know how to add the components to a page, refer to **Building your application** using the Developer Console section.
{% endhint %}


# Working with page components

## Adding components to a page

1. In the **Navigation menu**, under the **Developer** role, in the **Developer** group, click **Pages**. The list of all existing pages is displayed.
2. To open the page canvas, under the **URL** column, click the URL of the required page. The page canvas is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MAerhCfs5O-9bIlCx3W%2F-MAesFr8_K93e71h_mfI%2FPage_canvas.png?alt=media\&token=1d9079e7-29dc-4ac7-98b7-45faf2dc5503)

&#x20;3\. To design the user interface, on the menu bar, click the **Enable Developer mode** icon.

&#x20;4\. To open the components panel, click. You can view that the page is already added under the **Tree** tab.

&#x20;5\. To add components, right click on the parent component. The lit of all existing child components is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MAerhCfs5O-9bIlCx3W%2F-MAesNacl_Gh9OrkDdC2%2FList_of_components.png?alt=media\&token=237ca72d-186e-4c58-9e4b-7e0822d2054a)

&#x20; 6\. Search and click on the required component.

{% hint style="info" %}
To understand the different tabs in the components panel, refer to the [***Understanding the components panel*** ](/creating-pages/working-with-pages/working-with-page-components/understanding-the-components-panel)section.

To view the list of components, refer to the [***Understanding the components of a page***](/creating-pages/working-with-pages/working-with-page-components/understanding-the-components-of-a-page) section.

To view the standard properties of a component, refer to [***Understanding the standard properties of components***](/creating-pages/working-with-pages/working-with-page-components/understanding-the-standard-properties-of-components) section.
{% endhint %}


# Understanding the components panel

In the ***component panel,*** following tabs are visible:

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-MAesV3dmVdjTAjfmr72%2F-MAesgl0AoHtn8AAiXKj%2FComponents_panel.png?alt=media\&token=fd95a017-d2d0-4256-986d-31f497bec646)

| **Tab**        | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Tree**       | <p>You can view the skeletal (tree) structure of all the components added to the page, as per hierarchy.</p><p><em>By default, <strong>page</strong> is the first component that is visible in the tree. All other components are added only to the page.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                        |
| **Properties** | <p>You can view and edit the properties of the components added. As per their functionality, you can change their properties to suit the UI of your application.<br>For example, for a Card Header, you can select an icon and the background color, whereas for a Slide Toggle component, you can set the component position.</p><p><em>The properties under the <strong>Standard</strong> section are common to all the components. Refer to</em> <a href="/creating-pages/working-with-pages/working-with-page-components/understanding-the-standard-properties-of-components"><em><strong>Understanding the standard properties of components</strong></em> </a><em>section.</em></p> |
| **Components** | You can view and add the components available under the selected component.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **DS**         | <p>You can view the attributes of the table added to the data source linked to the datastore. You can also select and add the attributes to certain components.</p><p><em>If a data source is not linked to the datastore, you can view the list of all existing data sources.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                   |


# Understanding the components of a page

List of ***parent components*** available in the platform. For more details refer to [UI Components](/ui-components/widgets):

| **Name of the Component**            | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Action Button**                    | <p>Contains certain pre-defined actions such as Save, Clear, Refresh, and Delete etc.</p><p><em>Provides 12 different actions for components with data sources.</em></p><p>As per requirement, under <strong>Action</strong> group, select the radio button to specify a particular action.</p><p>You can add triggers for the standard actions.</p><p><em>Action button is available only after adding a card wrapper.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **Aggregate Card**                   | <p>Displays the aggregate of data involved.</p><p>You can view the count of objects in the dashboard.</p><p><em>This component can be added to the page and <strong>Card Body</strong>.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **Attachment Drop Zone**             | <p>Allows the user to upload multimedia content.</p><p>For example: images, videos, pdfs etc.</p><p><em>Requires the <strong>Col</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **Attachment Upload**                | <p>Allows the user to upload multimedia content, verify details, revise, and existing files.</p><p>For example: images, videos, PDFs etc</p><p><em>Requires the Col parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **Auto Breadcrumb**                  | <p>Displays the current path of a page relative to its starting point.</p><p>Allows the users to understand their current context in a hierarchical structure and the ability to navigate up the structure easily.</p><p><em>This component can be added <strong>only</strong> to the page.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **Badge**                            | <p>Used as a part of a link or button to provide a counter.</p><p>You can use it to emphasize on a required value.</p><p>For example: Display the details of an employee from the table.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| **Barcode Scanner**                  | <p>Uses webcam to scan items and store its value in the view attribute.</p><p>It can read different types of barcode.</p><p>For example: Code128, Code 39, UPC etc.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| **Breadcrumb & Breadcrumb Items**    | <p>Displays a chain of pages for easy access of one or more of the navigation path pages.</p><p>Current path of a page with respect to the starting point is displayed.</p><p>You can understand the current context of a page in a hierarchical structure and the ability to navigate up the structure easily.</p><p>Use <strong>Breadcrumb item</strong> component to add item in <strong>Breadcrumb</strong>. This item can be used to navigate back.</p><p><em>This component can be added <strong>only</strong> to the page.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **Button**                           | <p>Allows to define an action, as per requirement.</p><p>For example: Submit a form.</p><p>Needs an <strong>On click event/ Button Actions</strong> to perform any action.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **Button Dropdown**                  | <p>Displays buttons in a drop-down menu.</p><p>Use the <strong>Button</strong> component to define an action.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **Button Group**                     | <p>Combines both <strong>Action buttons</strong> and regular <strong>Buttons</strong>.</p><p><em>The <strong>Action button/Button</strong> component can be used as per requirement.</em></p><p>Used as a container for a group of buttons.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| **Calendar**                         | <p>Displays the calendar item, used to represent events.</p><p>Presents the current month layout along with a scrollable navigation for year and month.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **Calendar Heatmap**                 | <p>Displays the month layout for the current year.</p><p>Visualizes values over days in a calendar-like view, making it easy to identify daily patterns or anomalies.</p><p><em>Specify different attributes for date & count attributes</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **Capture Image**                    | <p>Captures images after a particular action.</p><p>Uses the webcam connected to your device.</p><p>Returns the file Id which is a part of the view attribute.</p><p>Use the <em><strong>Trigger After/Before Upload</strong></em> component to perform various actions.</p><p>For Example: Use the below statement to display the captured image in <em><strong>Image Cropper</strong></em> by passing the value in src property:</p><p><em>service/aservice?fid=1234\&ds=MyDatasource\&attr=MyfileId\&sid=</em></p><p><em>${session.sessionId}</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **Card Table**                       | <p>Uses a blank table to represent tabular data in a card form.</p><p>Inherits and displays the content from the data source by adding <em><strong>cardTableColumn</strong></em><strong>.</strong></p><p>Add paragraph component to get the view attribute.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| **Card Wrapper**                     | <p>Divides the page canvas into header and body to ease the formatting and sectioning.</p><p>Is a flexible and extensible content container.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **Carousel**                         | <p>Allows the user to add multiple card wrappers to the page.</p><p>You can continue working on the card wrapper discretely.</p><p>This is a slideshow component for cycling through elements.</p><p><em>This component can be added <strong>only</strong> to the page.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **Change Role**                      | <p>Used to query the data based on selected role.</p><p>In case of multiple roles assigned to the page, use the component to change the role of the session</p><p>For example: If you have data for two different countries with same pages and data sources, the data will be rendered based on the role.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **Char Circle**                      | <p>Displays the first character of the text inside a coloured circle.</p><p>Lists the component to differentiate between records.</p><p><em>Requires the <strong>Col</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| **Chart**                            | <p>Supports graphical representation of data, as symbols.</p><p>Example: bar chart, line chart, or pie chart.</p><p>Represents tabular numeric data, functions, or some kinds of qualitative structure that provides different information.</p><p>The platform supports 10 different types of charts for graphical display of data.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| **CheckBox**                         | <p>Allows the user to make multiple choices, broadly used in forms and surveys.</p><p><em>Requires the <strong>FormSearch</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **Collaboration**                    | <p>Works like a comment box, for comments or reviews on any record along with context value and type.</p><p>Encourages collaboration within users of the application.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **Combination Chart**                | <p>Allows you to plot multiple datasets and chart types on the same chart.</p><p>The chart can be rendered in either 2D or 3D, single or dual y-axes, and can be stacked or multi series in nature.</p><p>For example: you can show the column, line, and area chart on the same chart canvas.</p><p><em>Use <strong>DataList</strong> to create multi-row cards with data.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **Datalist**                         | <p>Renders records as the list inside row/column.</p><p>Used to design interactive cards or list.</p><p><em>You can add a <strong>Card Wrapper</strong> to this component.</em></p><p>This component can be added only to the page.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| **Data store**                       | <p>Displays the data from the data source on the UI that is to be fetched and manipulated.</p><p>Used to create an instance of the data source, by providing the data store with the data source name & alias.</p><p><em>This component can be added <strong>only</strong> to the page.</em></p><p><em>You can only define store related triggers under this component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **Div**                              | <p>Acts as a container unit that encapsulates other page elements and divides the HTML document into sections.</p><p><em>The component can be added <strong>only</strong> to a <strong>Card Body.</strong></em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| **Dragsource/Drag Target**           | <p>Used as a drag wrapper.</p><p>Allows to drag the content across browsers.</p><p><em>This component can be added to the <strong>Horizontal Section, Vertical Section,</strong> or <strong>Col</strong> components.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **Extra Large View**                 | <p>Renders components for desktop devices. The size of the layout is pre-defined, that is, greater than equal to 1200 pixels.</p><p><em>This component can be added <strong>only</strong> to the page.</em></p><p>Used for sectioning of the page.</p><p>Components are not visible in other views, such as, small view, medium view, or large view.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| **Form**                             | <p>Acts as an input-based component, designed to collect users’ data.</p><p>For example: registration, login, contact form etc.</p><p>The component is same as an HTML form, containing form elements, such as, text fields, checkboxes, radio buttons, submit buttons, and many more.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **FormSearch**                       | <p>Acts as a container for the search fields.</p><p>Search fields are used to search and retrieve related information from the data source.</p><p>Specify the <em><strong>target item Id</strong></em> of the component where you want to perform the search.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **Fusion Chart**                     | Renders and manipulates your charts and graphs continuously across all browsers and devices.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| **Gantt Chart**                      | <p>Plots tasks visually in a date/time-based chart.</p><p>Represents the exact start and end dates/times of the tasks.</p><p>A Gantt chart is a series of horizontal lines that shows the amount of work done in a certain period of time in relation to the amount of work planned in those periods.</p><p>Used to define milestones for a project, keep track of the project progress and plan remedial actions to bring the project back on course, if there is a delay.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| **Gauges**                           | <p>Measures and gives a visual display of the screen</p><p><em>Requires the <strong>Col</strong> parent component</em></p><p>By adding the <strong>Color</strong> child component, you can associate colors with sections of the data to indicate specific ranges</p><p>For example: green for satisfactory, yellow for caution, and red for alarm.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| **Google drive attachment dropzone** | <p>Allows the user to upload multimedia content, such as, images, videos, pdf etc. to google drive folder.</p><p><strong>Prerequisites:</strong></p><ul><li>A Google drive service account.</li><li>A p12 credentials file</li></ul><p><strong>To upload a file:</strong></p><ol><li>Upload the required file using <em>custom handlers</em> with the name <strong>subDomain-gdrive.p12.</strong></li><li>Update profile value of <em>GDRIVE\_SERVICE\_ACCOUNT\_ID</em> with your service account email.</li><li>Create a profile with profile code as the concatenation of string '<em>GDF\_' and the datasource name.</em><br>For example: <em><strong>GDF\_MyDatasource,</strong></em> where <em>MyDatasource</em> is the datasource name.</li><li>The profile value will be in the google drive folder ID, where you want to upload the attachment.</li></ol><p><em>Use the <strong>Trigger After Upload</strong> parent component to get the uploaded file details.</em></p><ul><li><strong>#{props.acturl}</strong> to get the actual file URL</li><li><strong>#{props.fileId}</strong> to get the ra file ID.</li></ul> |
| **Google Map and Google Navigator**  | <p>Provides detailed information about geographical regions and sites in an application.</p><p>Use the <em><strong>Google Navigator</strong></em> component to track an object’s current position with respect to the destination, using Google map.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| **Gridster Layout**                  | <p>Builds an intuitive draggable layout using elements spanning across multiple columns.</p><p><em>You can also dynamically add and remove elements from the grid.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **Grid Layout**                      | <p>Aligns the elements into columns and rows.</p><p><em>The component uses HTML primitives for a draggable and resizable grid layout.</em></p><p>Used to divide a page into major regions and define size, position, and layer for the elements.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **Grid**                             | <p>Displays data in multiple rows and columns.</p><p><em>Requires the <strong>Card Body</strong> parent component.</em></p><p>You can add child components to customize the data displayed or accepted in each column.</p><p>For example:</p><ul><li><em><strong>Number column</strong></em> component displays/accepts only numbers.</li><li><em><strong>Icon column</strong></em> component displays/accepts icons against each row added.</li></ul><p><em>List of <strong>child components</strong> to design columns in a Grid:</em></p><ul><li>Attachment Column</li><li>Calculated Number Column</li><li>Calculated String Column</li><li>Checkbox Column</li><li>Custom Renderer Column</li><li>Date Column</li><li>Google Drive Attachment Column</li><li>Icon Column</li><li>LOV Column</li><li>Number Column</li><li>Progress Column</li><li>Row Col Column</li><li>Row Number Column</li><li>Row Selection Column</li><li>Select Column</li><li>Slide Toggle Column</li><li>String Column</li><li>Switch Column</li><li>Tree Column</li><li>UserPic Column</li><li>Wave Column</li></ul>                            |
| **Header tags (H1-H5)**              | <p>Displays selected text with different header formatting</p><p>The formatting can be used for the whole page or for partial on-page content.</p><p><em>Requires the <strong>Div</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| **HTML**                             | <p>Used to create HTML (Hypertext Markup Language) tags and display pre-formatted HTML content.</p><p><em>Requires the <strong>Div</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **Heatmap Chart**                    | <p>Uses colors to represent different types of data.</p><p>For example: tracking investments in the stock market, comparing the performance of different companies, etc.</p><p><em>The <strong>Color Range</strong> component is added along with the parent component to define colors.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **Horizontal Layout**                | <p>Arranges the child components in sections into a single row.</p><p>Creates a panel that allows you to change the proportion of the width of each section.</p><p><em>The <strong>Horizontal Layout Child</strong> component wraps its contents in the provided width.</em></p><p><em>You can provide width as -1 to let the component take the width of the content or 1 to take 100% width.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| **Icon**                             | <p>Works similar to a <strong>Button</strong>, without a description, only a symbol is displayed.</p><p>By default, the <em><strong>Trigger On Click</strong></em> component is added.</p><p><em>Requires the <strong>Div</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **Icon Select**                      | <p>Displays a collapsible list of icons as per the data source attribute specified in the <em><strong>View Attribute</strong></em> field.</p><p><em>Requires the <strong>Col</strong> or <strong>Form</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **IFrame**                           | <p>Acts as a blank canvas, to insert content from another source.</p><p>Used as an HTML document embedded in another HTML doc on a web page.</p><p><em>Requires the <strong>Card Body</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **Image**                            | <p>Embeds an image into the view.</p><p>Displays the container for selected image</p><p><em>Requires the <strong>Card Body</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **Image Cropper**                    | <p>Crops an image before uploading it.</p><p><em>Requires the <strong>Card Body</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| **Large View**                       | <p>Renders components for large devices. The size of the layout is pre-defined, that is, from 992 pixels to 1200 pixels.</p><p><em>This component can be added <strong>only</strong> to the page.</em></p><p>Used for sectioning of the page.</p><p>Components are not visible in other views, such as, small view, medium view, or extra-large view.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **LOV (List of Values)**             | <p>Binds a list of values for a specific field in the page.</p><p>Use the LOVField component.</p><p>Generally, used along with the <em><strong>Popup</strong></em> component to display the list of object values or database column values, for the user to choose.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| **Medium View**                      | <p>Renders components for medium screens. The size of the layout is pre-defined, that is, ranging from 768 pixels to 992 pixels.</p><p><em>This component can be added <strong>only</strong> to the page.</em></p><p>Used for sectioning of the page.</p><p>Components are not visible in other views, such as, small view, large view, or extra-large view.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **Mirror**                           | <p>Renders a copy of an existing item on the same page and avoid duplicate definitions.</p><p>Used to create a copy of existing page items with different views, such as, Mobile, Tablet, Desktop etc.</p><p><em>Requires the <strong>Col</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **Node Graph**                       | <p>Allows the user to drag and drop elements in a Workflow.</p><p><em>Requires the <strong>Card Body</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| **Number field**                     | <p>Performs searches on number columns, for exact match, between and lesser/greater than etc.</p><p><em>The component is one of the important form input elements.</em></p><p><em>Requires the <strong>FormSearch</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| **Password field**                   | <p>Acts as an input text field, used in a variety of components like forms, comment sections and forums.</p><p><em>Requires the <strong>FormSearch</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **Page Fragment**                    | <p>Creates reusable components of a page, such as, form, order detail popup etc.</p><p>Changes in a fragment, dynamically updates all the instances of the fragment, including those you have already added to pages.</p><p><em>Requires the <strong>Card Body</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| **Paragraph**                        | <p>Used as a header field to the page or any on-page content.</p><p><em>Requires the <strong>Card Body</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **Pivot Grid**                       | <p>Used for data visualization, allowing the users to perform operations over multi-dimensional/ pivot data.</p><p><em>Requires the <strong>Card Body</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **Popover**                          | <p>Displays a dialog box with a content on-hover.</p><p>Activated with a click and can be easily applied to any element.</p><p><em>The component is similar to a tooltip.</em></p><p><em>Requires the <strong>Card Body</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **Popup**                            | <p>Displays the basic information of the current page, such as, contact information, address information etc. in a separate dialog box.</p><p>You can view it on top of the current page as a small window.</p><p><em>This component can be added only to the page. By default, the <strong>Vertical layout</strong> component is added.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **Progress Bar**                     | <p>Displays an indicator showing the completion or progress of a task.</p><p><em>Requires the <strong>Col</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **Pulse**                            | Displays information to the users on hover, such as, details of functionality or list of contents, etc.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| **Quick Filter**                     | <p>Used to filter necessary data.</p><p><em>Requires the <strong>Card Header</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **Radiobox**                         | <p>Allows the user to select a single choice from a list of options.</p><p>You can specify a custom string in the names property to display each option.</p><p><em>Requires the <strong>Form, FormSearch,</strong> or <strong>Col</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| **Rich Text Editor**                 | <p>Acts as an interface for editing text within browsers.</p><p>Presents the content with a (WYSIWYG) editing area.</p><p><em>Requires the <strong>Card Body</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **Row/Col**                          | <p>Used as the basic building blocks for responsive layouts.</p><ul><li>Use Rows to create horizontal groups of columns.</li><li>Use Cols to create vertical groups of a row.</li></ul><p><em>The component can be added only to a <strong>Card Body.</strong></em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| **Saved Search Menu**                | <p>Allows the user to configure data grids by re-arranging the column display order, resizing the column widths, hiding few columns etc for future use.</p><p><em>Requires the <strong>Card Header, Card Footer,</strong> or <strong>Col</strong> parent components.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **Scroll Layout**                    | <p>Creates a panel to wrap the contents in a scrollable area.</p><p>You need to specify the value of length to display contents at a time.</p><p><em>This component can be added <strong>only</strong> to the <strong>page.</strong></em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **Select**                           | <p>Displays a collapsible list of multiple values on click.</p><p>Generally used in forms, menus, or surveys.</p><p>You need to specify the data source attribute that needs to be displayed in the dropdown.</p><p><em>Requires the <strong>Card Table</strong> or <strong>Form</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **Show Item**                        | <p>Used to select/display another UI item from the current page.</p><p>Requires the <em><strong>Trigger on Click</strong></em> parent component.</p><p>Uses the item Id of the UI item.</p><p>Similarly, in order to hide any UI item, use <em><strong>Hide Item</strong></em> action.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **Show Message**                     | <p>Displays a popup message with some text.</p><p>Requires the <em><strong>Trigger on Click</strong></em> parent component.</p><p>Used to display a message after some action.</p><p>For example: Confirmation message after the successful submission of a form.</p><p>This component is used only to display a message.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **Show Popup**                       | <p>Displays a popup window with a message.</p><p>Requires the <em><strong>Trigger on Click</strong></em> parent component.</p><p>Uses the item Id to define an action.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **Side Tab Panel and Side Tab Item** | <p>Acts as a container that includes tabs in it.</p><p>Can be displayed in it in top, or toggle left and right.</p><p>Used to define a navigation pane.</p><p>You can add the <strong>Side Tab Item</strong> component to specify multiple tabs.</p><p>For example: Display the user’s profile or the list of users.</p><p><em>This component can be added <strong>only</strong> to the page.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **Signature Pad**                    | <p>Accept user’s signature and displays it.</p><p><em>Requires the <strong>Col</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| **Slide Toggle**                     | <p>Used to activate one of the two predefined options, commonly used as an on/off button.</p><p><em>Requires the <strong>Card Header</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| **Slider**                           | <p>Used to select ranges between two or more values based on the number of handles added in the component.</p><p><em>Requires the <strong>Card Body</strong> parent component.</em></p><p>Add the <strong>Handle</strong> component to save the range in the selected attribute.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **Small View**                       | <p>Renders components for small screens. The size of the layout is pre-defined, that is, less than 768 pixels.</p><p><em>This component can be added <strong>only</strong> to the page.</em></p><p>Used for sectioning of the page.</p><p>Components are not visible in other views, such as, medium view, large view, or extra-large view.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| **Smart Search**                     | <p>Creates a search bar along with the parent component added.</p><p>You can search for the attributes added in the provided data source.</p><p><em>Requires the <strong>Card Body</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **Star Rating**                      | <p>Allows the user to specify rating in terms of stars, usually, in a scale of 1 to 5, the highest number of stars indicating the best quality.</p><p><em>Requires the <strong>Col</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **Switch**                           | <p>Evaluates an expression depending on its value.</p><p>The value of each expression is compared with the values of each case.</p><p>Cases are the possible outputs of the evaluated switch expression.</p><p>The <strong>Case</strong> component is added along with this component.</p><p>These components can be used to render the children of a matching case.</p><p>Only the children of the case which is equal to the evaluated expression from the switch, will be rendered.</p><p><em>Requires the <strong>Card Body</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| **Tab Panel and Tab Item**           | <p>Separates content placed in the same wrapper into separate panes.</p><p>Used to categorize and store content.</p><p>By default, the <strong>Tab Item</strong> component is added. According to the bootstrap customizations, you can change the color and add animations to differentiate between the tabs.</p><p><em>This component can be added <strong>only</strong> to the page.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **Table**                            | <p>Represents data in a tabular format.</p><p>Data is presented in a two-dimensional table comprising of rows and columns.</p><p><em>Requires the <strong>Card Body</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| **Text Field**                       | <p>Acts as a user-input component.</p><p>Can be used with a variety of components, such as, form, comment box, forum etc.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **Thumbnail**                        | <p>Displays the thumbnail of a selected image.</p><p>Linked images in grids or circular formats with markup can be displayed.</p><p><em>Requires the <strong>Col</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **Timeline**                         | <p>Displays the list of events in a chronological order.</p><p>It is a graphic design of a bar labelled with dates along with associated events.</p><p><em>Requires the <strong>Card Body</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **Transaction**                      | <p>Groups multiple datastores into a single transaction.</p><p>Defines the parent-child relationship between data sources, using the <strong>Mapping</strong> component.</p><p>Changes posted in the <strong>Save Transaction</strong> action, are updated in the datastores included in the transaction. If one data source fails, then all changes within this transaction will be rolled back.</p><p><strong>For example:</strong><br>Consider two data sources, Dept (Dept ID, Dept Name) & Emp (Emp ID, Emp Name & Emp Dept ID). Dept ID & Emp ID are auto generated on the server only after saving the transaction.</p><p>When you create a new department and employee at the same time and save the transaction, the platform will first create the department which would generate a Dept ID for the newly created department and then copy the Dept ID from the Dept data source record into Emp Dept ID attribute of Emp data source record before saving the Emp data source.</p><p><em>This component can be added <strong>only</strong> to the page.</em></p>                                                   |
| **UIView**                           | <p>Allows the user to render other pages of the application, when loaded.</p><p>You can use it in an abstract page to embed child pages into a parent container.</p><p><em>Requires the <strong>Card Body</strong> or <strong>Col</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| **User Picture**                     | <p>Displays the profile picture of the logged-in user.</p><p><em>Requires the <strong>Card Table</strong> or <strong>Col</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| **Video**                            | <p>Provides a video in the page.</p><p><em>Requires the <strong>Col</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| **Video Recorder**                   | <p>Records a video using the device’s webcam or external webcam.</p><p>You can also use to play the recorded videos.</p><p><em>Requires the <strong>Card Body</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **Vertical Layout Panel**            | <p>Arranges the child components one below the other in a single column.</p><p>Creates a panel that allows you to change the proportion of the height of each section.</p><p><em>The <strong>Vertical Layout Child</strong> component wraps its contents in the provided height.</em></p><p>You can provide height as -1 to let the component take the height of the content or 1 to take 100% height.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **Watch**                            | <p>Specifies an expression to watch the changes.</p><p>When the value of the expression outcome changes, the <em><strong>Trigger On Change</strong></em> component is fired.</p><p><em>This component can be added <strong>only</strong> to the page.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **Wave**                             | <p>Consists of three dots, representing that the data is being loaded.</p><p><em>Requires the <strong>Card Header</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| **Wizard Steps**                     | <p>Displays react components stepwise, such as, data forms, text, or html components etc.</p><p>Generally, used to show progress of a task or process to the user.</p><p><em>Requires the <strong>Col</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **XY Chart**                         | <p>Provides a graphical representation of data, using X-axis and Y-axis.</p><p><em>Requires the <strong>Card Body</strong> parent component.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |


# Understanding the standard properties of components

The properties under the ***Standard*** section are same for all the components added

| **Label**                      | **Description**                                                                                                                                                                                                                       |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Item ID**                    | <p>Unique identification code assigned to each component.</p><p><em>The value is auto-generated and you can edit it, if required. The value cannot be duplicated.</em></p><p>This value is used while referring to any component.</p> |
| **User Display Name**          | <p>Name of the component displayed in the Tree tab.<br>You can assign a user-friendly name for the component for a better understanding.</p><p>The name is not used for component reference.</p>                                      |
| **Comments**                   | Additional remarks about the component can be added here.                                                                                                                                                                             |
| **Visible**                    | <p>Select the checkbox to view the component, irrespective of the screen size.</p><p>You can clear the option to hide the component completely.</p><p><em>By default, it is selected for all the components.</em></p>                 |
| **Hide in Small Screen**       | <p>Select the checkbox to view component in small screen, i.e., when the width of the screen is lesser than 768 pixels.</p><p><em>By default, it is not selected for any added component.</em></p>                                    |
| **Hide in Medium Screen**      | Select the checkbox to view component in medium size screen, i.e., when the width of the screen is >= 768 pixels && <= 992 pixels.                                                                                                    |
| **Hide in Large Screen**       | Select the checkbox to view component in large size screen, i.e., when the width of the screen is >= 992 && < 1200.                                                                                                                   |
| **Hide in Extra Large Screen** | Select the checkbox to view component when the width of the screen is >= 1200.                                                                                                                                                        |
| **Visible Condition**          | <p>Enter the expression defining the condition to hide the component explicitly.</p><p><strong>Example</strong>: #{screen.isLargeUp}</p>                                                                                              |


# Working with data stores

The data from the datasource that is to be displayed on the UI is fetched and manipulated using the data store component.

In the page tree, the data store component is created under the page component. Adding a data store component to a page creates a store instance for the given datasource. You can also create a store instance explicitly for a component, by providing the datasource details at the respective component level.


# Adding a data store to a page

1. Open an existing page and in the menu bar, click ![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M1ZnF9rJPGTPChONAbC%2F-M1ZnveWF10Jya8eJpK3%2FEnable%20Developer%20mode.png?alt=media\&token=585a566e-e0e6-41de-a9c5-dd03d682dae5) . The developer mode is enabled and the **Page Tree** is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M1ZnF9rJPGTPChONAbC%2F-M1Zo4pQ9n9yShF05XTw%2FPage%20in%20preview%20mode.png?alt=media\&token=41a3c3b3-0202-4153-a1dc-8cf50bac1553)

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M1ZnF9rJPGTPChONAbC%2F-M1ZoBDbSMbNsmmfHVb0%2FPage%20in%20Developer%20Mode.png?alt=media\&token=53e4bffe-1042-45f3-9d8a-fff946a0b3c8)

&#x20;2\. Right-click the page name and from the component list, select **Data Store**. The data store component is added to the page.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M1ZnF9rJPGTPChONAbC%2F-M1ZoU0-_vBYo6I_Bgit%2FData%20store%20added.png?alt=media\&token=b001f447-1b3d-42d1-bdf2-8a0a80d2a9c0)


# Defining data store properties

1. To define the data store properties, select the data store component and in the upper panel of the **Page Tree** section, click the **Properties** tab.

   **OR**

   Right-click the data source component and from the list, select **Properties**.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M1ZonydNZNlxS4xnEEu%2F-M1ZqZfMedfUdXUOM0ho%2FProperties.png?alt=media\&token=f2dcfb18-327d-4485-be34-f9d28b80b988)

The **Data Store** properties pane is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M1ZonydNZNlxS4xnEEu%2F-M1ZqnPQRdVAltttFm1R%2FDatasource%20Properties.png?alt=media\&token=ed1f7e72-4148-47ab-b887-71bdd75b791d)

&#x20;2\. Under **DataSource**, enter or select the following details of the datasource from which the data is to be used in the application:

| **Label**                 | **Description**                                                                                                                                                                                                                                                                                    |
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Data Source\*             | The name of the datasource                                                                                                                                                                                                                                                                         |
| Data Source Alias\*       | <p>A unique name as the DataSource Alias which will be used while performing actions on the store</p><p><em>All the datasources defined within the current page or any of the parent abstract pages must have unique alias names.</em></p>                                                         |
| Default Where Clause      | A default static where clause to be used while fetching/manipulating data from the datasource                                                                                                                                                                                                      |
| Max Rows                  | <p>The number of rows to be fetched and displayed at a time<br>The same number of rows will be displayed for every scroll.</p><p><em>This is applicable when the data store is used by the Grid and the Card Table component only. The default value for <strong>Max Rows</strong> is 20.</em></p> |
| Order By Clause           | <p>A default Order By clause to sort the fetched data<br>For example, #firstAttr#, #secondAttr# DESC</p>                                                                                                                                                                                           |
| Auto Query                | Fetches all the records of the data store                                                                                                                                                                                                                                                          |
| Execute Count SQL         | Returns the total number of rows in the data store                                                                                                                                                                                                                                                 |
| Execute Distinct SQL      | Returns the total number of distinct rows in the data store                                                                                                                                                                                                                                        |
| Insert Allowed            | Allows you to insert a new record in the data store                                                                                                                                                                                                                                                |
| Update Allowed            | Allows you to update an existing record in the data store                                                                                                                                                                                                                                          |
| Delete Allowed            | Allows you to delete an existing record in the data store                                                                                                                                                                                                                                          |
| Mask Page on Post         | Freezes the page until all the data changes made from the frontend get saved at the backend                                                                                                                                                                                                        |
| Make New Records Dirty    | <p>Indicates that you have not saved the changes made to the data</p><p><em>The dirty records are highlighted in red.</em></p>                                                                                                                                                                     |
| Cache Results             | <p>Fetches the data from the previously saved searches that are saved in the cache memory</p><p><em>This is applicable only if the <strong>Remote Filter</strong> property of the LOV component is enabled.</em></p>                                                                               |
| Auto Refresh Interval     | Number of seconds after which the data store must be refreshed                                                                                                                                                                                                                                     |
| Server Validate on Create | Performs default operations on the server side when a new record is created                                                                                                                                                                                                                        |

{% hint style="success" %}
*All fields marked \* are mandatory.*
{% endhint %}

&#x20;3\. Under **Standard**, enter the [standard component properties](/creating-pages/working-with-pages/working-data-stores/defining-data-store-properties).

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M1ZonydNZNlxS4xnEEu%2F-M1ZrouGR-8SZGG-a8vQ%2FStandard%20Properties.png?alt=media\&token=31743ed8-f19f-4c15-ace0-d07b4d86b866)

{% hint style="info" %}
**Note**: For some components , you can create a data store instance and define its properties directly from the component properties section.\
For example,

* To create a data store instance for the **Grid** component, under **DataSource,** select **Data Source** and **Data Source Alias.** Fill the rest of the details as required.![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M1ZtfKJZuzqZwhmxvzD%2F-M1ZvuRDk9To1IAfOno3%2FData%20store%20for%20Grid.png?alt=media\&token=06fa5042-83e2-48a8-b285-32f5b1b32355)&#x20;
* To reuse a datasource that was defined on another component of the current page or its parent abstract pages; or use an existing data store component, you must select the **Use Existing Datasource** box in the properties of the respective component and enter its details.
  {% endhint %}


# Defining triggers and actions for a data store

You can define a trigger to initiate an action when an event occurs on the data store.

1. To define a trigger, in the **Page Tree,** right-click the required data

   store and from the list, select the required trigger.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M1ZzLvmGL2416ZaY9Vw%2F-M1ZzXy6TDdJkwH9YUOL%2FTriggers.png?alt=media\&token=2782c5b4-fd84-4b30-8544-c03771bbb866)

The trigger is added for the data store.

2\. To define an action to be invoked for the trigger, right-click the required trigger.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M1ZzLvmGL2416ZaY9Vw%2F-M1ZzcLzeEv5DcEcQzA_%2FActions.png?alt=media\&token=3e90c747-061e-4967-b4cf-b90760ec9569)

The action to be invoked on the trigger is defined.

For example, if for a data store, you select **Trigger After Delete Record** as the trigger and **Confirm Message** as the action, then after every row deletion from the data store, a confirmation message will be displayed.

{% hint style="info" %}
You can define triggers and actions for all the other components in a similar manner.

Refer to the [**Working with page components**](/creating-pages/working-with-pages/working-with-page-components) section.
{% endhint %}


# Working with Patches


# Understanding patches

Patches are used for migrating objects assigned to roles, datasources and pages from one instance to another. The CloudIO patch management process enables you to:

1. download the application roles and component definitions as a patch file from an instance
2. upload the patch file with the details to the new instance
3. identify the changes made by other developers within the system efficiently.&#x20;

{% hint style="info" %}
In order to create and manage role patches, you must be assigned to the **Patch Manager** role. You must contact the administrator to obtain access to the **Patch Manager** role.

Any database related objects/dependencies must be applied separately, CloudIO **Patch Manager** will not include the DB objects metadata.
{% endhint %}

The three types of patches can be created in the CloudIO platform:

1. Role
2. Page
3. Datasource


# Preparing a datasource patch

Datasource level patches are used to migrate a data source from one instance of the CloudIO platform to another.

To prepare a datasource patch,

1. On the upper right corner of the CloudIO homepage, click ![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-mcOhZsp5ySNX8xlW5%2F-M-mqQrhvyhl1QdlDK3f%2FNavigationMenu.png?alt=media\&token=137cfe8b-62de-45ca-a442-bc7ac65f96c3) . The **Navigation** page is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-mcOhZsp5ySNX8xlW5%2F-M-mrQc_PUfoqf3mZiaY%2FNavigation%20page_Datasources.png?alt=media\&token=c86437f0-6b57-46c8-b76d-ad49f02338b5)

&#x20;2\. Under Developer, click **Manage Datasources**. The **Manage Datasources** page is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-mcOhZsp5ySNX8xlW5%2F-M-msJzyoaRpvr4OeyOz%2FManage%20Datasources%20options.png?alt=media\&token=eafc8213-ca2b-490e-a419-01e43bf6ff7f)

&#x20;3\. To download a data source patch, on the required datasource, click![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-mcOhZsp5ySNX8xlW5%2F-M-msfJLBtDCH3jtWxDV%2FDownload%20datasource%20patch.png?alt=media\&token=c79c3253-26cd-4ab5-b5ea-0c20aa465062).A confirmation box is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-mcOhZsp5ySNX8xlW5%2F-M-mtZGpeSdp93ZYOLjo%2FPrepare%20datasource%20patch.png?alt=media\&token=bb0627c8-b7e3-478b-a641-d0fdaaa15036)

&#x20;4\. Click **Yes**.The processing for your patch preparation request will be initialized.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-mw247sZildL09cesx%2F-M-mwL2pfWBZDn5oYLBo%2FDatasource%20patch%20being%20processed.png?alt=media\&token=da12cbd5-65de-40b7-95f9-1a7175aeeb62)

&#x20;5\. Click **Okay**.

The required datasource patch is prepared.

**OR**

To view the details of the patch status, click **Go to patches screen** and click **Download**.

The list of patches that available for downloading is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-n4R1ovKf7uWY7UHut%2F-M-n5h83689T2EqQTwtS%2FPatch%20Uploads_Downloads.png?alt=media\&token=7609296f-184c-47b1-af2c-d959ab4550c7)

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-n4R1ovKf7uWY7UHut%2F-M-n7f9eVRMk99es5Wja%2FDownload.png?alt=media\&token=ff0eed93-72af-4f83-a0a0-71d07dea54f5)


# Preparing a page patch

Page level patches are used to migrate a page from one instance of the CloudIO platform to another. The data sources that are used in the page are also migrated along with the page patch.

To prepare a page patch,

1. On the upper right corner of the CloudIO homepage, click ![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-mcOhZsp5ySNX8xlW5%2F-M-mqQrhvyhl1QdlDK3f%2FNavigationMenu.png?alt=media\&token=137cfe8b-62de-45ca-a442-bc7ac65f96c3) . The **Navigation** page is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-n4R1ovKf7uWY7UHut%2F-M-nP35aZGx6aHoZG-BO%2FNavigation%20page_pages.png?alt=media\&token=96cf250f-3ec0-4c83-9696-b7d0cabf64fd)

&#x20;2\. Under **Developer**, click **Pages.** The **Pages** page with list of available pages is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-n4R1ovKf7uWY7UHut%2F-M-nQ7TuZwiC-CzXqH_A%2FPages.png?alt=media\&token=a4797c52-7b4d-484b-b458-c26061525de4)

&#x20;3\. Click on the page of which a patch is to be prepared. The page details are displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-n4R1ovKf7uWY7UHut%2F-M-nTNEnpXtPa2gXLCsj%2FPage%20details.png?alt=media\&token=4b3288f2-010b-42ad-a9fe-b41f963281f2)

&#x20;4\. In the upper right corner, from the **Actions** list, select **Prepare Patch**.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-n4R1ovKf7uWY7UHut%2F-M-nUmV92Rvk4jItSmGk%2FPrepare%20page%20patch.png?alt=media\&token=4cd63da2-c539-4eaf-98ff-4de37d463e39)

The processing of the page patch preparation will be initialized.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-n4R1ovKf7uWY7UHut%2F-M-nWh-hBDR1dph_noYq%2FPage%20patch%20being%20processed..png?alt=media\&token=d0d6609f-28e6-4881-9377-2a64cf1d4910)

&#x20;5\. Click **OK**.

The required page patch is prepared.

**OR**

To view the details of the patch status, click **Go to patches screen** and click **Download**.

The list of patches that available for downloading is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-n4R1ovKf7uWY7UHut%2F-M-n5h83689T2EqQTwtS%2FPatch%20Uploads_Downloads.png?alt=media\&token=7609296f-184c-47b1-af2c-d959ab4550c7)

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-n4R1ovKf7uWY7UHut%2F-M-n7f9eVRMk99es5Wja%2FDownload.png?alt=media\&token=ff0eed93-72af-4f83-a0a0-71d07dea54f5)


# Preparing a role patch

Role level patches are used to migrate all the pages, data sources and other UI components associated with a role from one instance of the CloudIO platform to another.

{% hint style="info" %}
**Note**: Role migration does not impact underlying db objects.
{% endhint %}

To prepare a role patch,

1. On the upper right corner of the CloudIO homepage, click ![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-mcOhZsp5ySNX8xlW5%2F-M-mqQrhvyhl1QdlDK3f%2FNavigationMenu.png?alt=media\&token=137cfe8b-62de-45ca-a442-bc7ac65f96c3) . The **Navigation** page is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-n4R1ovKf7uWY7UHut%2F-M-nn3fQAk52BGEJLA3m%2FNavigation%20page_Manage%20Roles.png?alt=media\&token=23461f05-23b4-4158-b410-8282afdce35a)

&#x20;2\. Under Administration, click **Manage Roles.** The **Manage Roles** page is displaye&#x64;**.**

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-n4R1ovKf7uWY7UHut%2F-M-nriGyVqWFWzvFq-f4%2FManage%20Roles%20Page.png?alt=media\&token=0468abe5-6922-4fa4-a64d-5d67ce3ce27e)

&#x20;3\. On the required role, click ![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-n4R1ovKf7uWY7UHut%2F-M-nw_oOUqs7qZm9iLXe%2FEdit%20datasources.png?alt=media\&token=50a206a1-690f-4388-afc4-87f4e098155b) .The edit page is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M2Cy0uitGNRp6ACvWFx%2F-M2D-LMBIaiW2Nyk67fv%2FEdit%20roles.png?alt=media\&token=a21b4cb2-f936-4ca2-82a6-08a8a6e046e4)

&#x20;4\. If required, assign one or more of the following components to the role through the respective tabs/sections:

* Datasources
* Java Snippets
* HTML Requests
* HTML Templates
* Workflow Nodes
* Workflow Definitions
* Users&#x20;
* Pages

&#x20;5\. On the upper right corner, from the **Actions** list, select **Prepare Patch**. A confirmation box is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-n4R1ovKf7uWY7UHut%2F-M-oAm8ebcripNz9l5RN%2FPrepare%20Role%20Patch.png?alt=media\&token=c53d6c39-3e9e-443a-b710-6a46b8df32a4)

&#x20;6\. Click **Yes**. The processing for your patch preparation request will be initialized.

&#x20;7\. Click **Okay**. The required role patch is prepared. **OR** To view the details of the patch status, click **Go to patches screen** and click **Download**. The list of patches that available for downloading is displayed.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-n4R1ovKf7uWY7UHut%2F-M-n5h83689T2EqQTwtS%2FPatch%20Uploads_Downloads.png?alt=media\&token=7609296f-184c-47b1-af2c-d959ab4550c7)

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M-n4R1ovKf7uWY7UHut%2F-M-n7f9eVRMk99es5Wja%2FDownload.png?alt=media\&token=ff0eed93-72af-4f83-a0a0-71d07dea54f5)




---

[Next Page](/llms-full.txt/1)

