Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

External Entities String Functions and JSONPath Field Mapper

No security coverage Under active development 12 sites

This module extends JSONPath field mapping to allow combining and manipulating string values from multiple fields to create new field values. This is useful for scenarios where you need to generate unique identifiers or references by combining data from different sources.

External Entities String Functions and JSONPath Field Mapper is a field mapper plugin that extends the features of the JSONPath field mapper with current string functions (concatenate, sub-string, replace, etc.).

Features

With the default field mapping plugins, it is not possible to use parts of multiple field values to generate a new one. However, in some cases, it might be convenient to do so. For instance, when using xnttmulti to aggregate multiple sources into one external entity type, it might be convenient to be able to reference other entities according to the initial source of a given instance. Let's say I have an external entity "aggreg" that uses 2 REST service sources (alpha and beta) using xnttmulti: source "alpha" and "beta" provide the same field values but are differentiated by a prefix added to their identifier (using xnttmulti features). Therefore, on alpha and beta REST services, I could find an entity using the id "123" but from Drupal external entity "aggreg", I would have 2 entities, one with the identifier "a123" and another with "b123". So far, so good. But now, if those entities have a reference to an other entity, for instance a "child" entity, it would use the identifier of the source. If alpha "123" entity has a child "456", the corresponding Drupal external entity aggreg "a123" would just have a "456" identifier without prefix. Impossible to tell if it refers to "alpha" or "beta". This plugin can be used to solve that case by using a sub-string of the entity identifier that would extract the "source prefix" (ie. "a" or "b") and prefix it to the child reference field, so we would have "a456" that would refer to the correct source.

Similar projects

External Entities JSONPath field mapper (currently included in External Entities module).

Community Documentation

Not available yet.

Ask your assistant about External Entities String Functions and JSONPath Field Mapper

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
5
Tracked since
Jun 2023
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Release Timeline

Releases

Version Type Core PHP Release date
1.0.0-beta4 Pre-release 9–11 Oct 9, 2024
1.0.0-beta3 Pre-release 8–10 Mar 14, 2024
1.0.0-beta2 Pre-release 8–10 Sep 26, 2023
1.0.0-beta1 Pre-release 8–10 Jun 27, 2023
1.0.x-dev Dev 8–11 Jun 27, 2023