find-replace
The find-replace action enables data manipulation, you programmatically search for and replace string values within your local data tables. This action provides an efficient way to bulk update data across rows and columns without manual intervention.
What is the Find-Replace Action?
The find-replace action enables you to perform string substitutions across your local data tables. When you execute a find-replace operation, the system searches for specific string values and replaces them with new values throughout the selected dataset.
Key Capabilities
Local Data Updates: The action works seamlessly with your local data tables, allowing you to modify content that resides within your Jigx application environment.
Bulk Text Operations: Instead of editing individual records, you can perform sweeping changes across entire datasets. For example, you could replace all instances of "dog-products" with "pet-products" across a products table in a single operation.
Real-time Synchronization: Changes made through the find-replace action are immediately reflected in your local tables and can be synchronized with upstream data sources like REST using execute-entities and functions.
Use Cases
The find-replace action is particularly valuable for:
Data Standardization: Correcting inconsistent naming conventions or formatting across large datasets.
Content Updates: Updating company names, product names, or other information that appears multiple times.
Data Migration: Cleaning and transforming data during system transitions.
Batch Corrections: Fixing systematic errors or typos across multiple records.
Integration with Jigx Ecosystem
This action works as part of Jigx's broader table operations framework, complementing other data manipulation tools and maintaining consistency with your overall data management workflow.
Configuration options
find
The string value to be searched for in the tables.
replace
The string value to replace the found value with in the tables.
tables
The local tables in which the string value is searched for and replaced.
icon
Select an to display when the action is configured as the secondary button or in a header action.
includeCommandQueue
If set to false, the command queue will not be included in the find and replace.
isHidden
true hides the action button, false shows the action button. Default setting is false.
style
isDanger- Styles the action button in red or your brand's designated danger color.isDisabled- Displays the action button as greyed out, preventing the button from being actioned.isPrimary- Styles the action button in blue or your brand's designated primary color.isSecondary- Sets the action as a secondary button, accessible via the ellipsis. Theiconproperty can be used when the action button is displayed as a secondary button.
Considerations
Use with Caution: The find-replace action requires careful consideration before execution. When you perform a find-replace operation, the data is replaced for every instance found throughout the specified tables. This means that all matching values will be modified simultaneously, which could have unintended consequences if not properly planned. Before executing a find-replace operation, it's recommended to:
Carefully review the scope of tables that will be affected
Test the operation on a smaller dataset first if possible
Verify that the replacement value won't create conflicts or inconsistencies elsewhere in your data
Examples and code snippets
In this example the region APAC is replaced with EMEA in the local data table when action button is tapped.

title: Customer per Region
type: jig.list
data: [email protected]
item:
type: component.list-item
options:
title: [email protected]
subtitle: [email protected]
label:
title: [email protected]
color: color3
actions:
- numberOfVisibleActions: 1
children:
- type: action.find-replace
options:
title: Update region
find: "APAC"
replace: "EMEA"
tables:
- customerdatasources:
customer:
type: datasource.sqlite
options:
provider: DATA_PROVIDER_DYNAMIC
entities:
- default/customer
query: SELECT
id,
'$.name',
'$.contact',
'$.email',
'$.phone',
'$.region'
FROM [default/customer]Last updated
Was this helpful?