Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  1. Fotoware Alto
    • 11.15 Monte Zucchero
    • Terminology
    • Solutions
    • User Guide - Deutsch
    • User Guide - English
    • API Changelog
  2. Fotoware Veloz
    • Managing users and groups
    • Configuring archives
    • Configuring workflows
    • Configuring site behavior
    • Navigating and searching to find your assets
    • Working with your assets
    • Editing asset metadata
    • Uploading files
    • Version Control in Fotoware
    • Albums - Creating and sharing collections
    • Placing assets in a CMS
    • Working with the Fotoware Pro interface
    • Using the Fotoware plugins
    • Consent management
    • User guide to FotoWeb for iPad (Legacy)
    • Picture conferencing with FotoWeb Screens (Legacy)
    • What's what in Fotoware
    • GDPR
    • Fotoware Veloz releases
    • Activity Exports
    • Fotoware Example Workflows
    • Fotoware Key Account Home
  3. Fotostation
    • Getting started with Fotostation
    • Viewing, selecting and sorting files
    • Managing your assets with archives
    • Adding metadata to assets
    • Searching for assets
    • Working with your assets
    • Version Control in Fotostation
    • Automating tasks with Actions
    • Configuring metadata fields and editors
    • Configuring Fotostation
    • Configuring Fotostation for multi-user environments
    • Troubleshooting Fotostation
  4. Fotoware Flow
    • What is Flow?
    • Getting started
    • Flow dictionary
  5. Fotoware On-Premises
    • Getting started
    • Index Manager
    • FotoWeb
    • Color Factory
    • Connect
    • Operations Center Guide
  6. Integrations and APIs (Fotoware Veloz & On-Premises)
    • The Fotoware API
    • Creating integrations using embeddable widgets
    • Authorizing applications using OAuth
    • Auto-tagging
    • FotoWeb Drag and Drop export
    • Integration using webhooks
    • Optimizely and Episerver plugin documentation
    • User Interface Integrations
  7. Fotoware Mobile
    • User guide for Fotoware Mobile for iPhone and Android
    • User guide to FotoWeb for iPad (Legacy)
    • User guide to FotoWeb for iPhone and Android (Legacy)

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

Support

Table of Contents

Analysis Prerequisites Cache Regular Expression Business Rule Setup Trigger Condition Transformations Action
  • Home
  • Fotoware Alto
  • Solutions

Business Rule: Filename Parser

11. March 2025

Elaine Foley

Table of Contents

Analysis Prerequisites Cache Regular Expression Business Rule Setup Trigger Condition Transformations Action

Goal: parse the filename of items on upload and tag the Content Items in Picturepark with the product tag

Analysis

  • a layer which can be assigned to the content (“Product information” layer)
  • list of products and their code (“Products” list)
  • “rule” to split the filename into product code and “other”

Prerequisites

Cache

Create a cache for Products. This cache will be used for looking up the correct tag to assign. 

  1. Switch to Cache
  2. Create List Item Named Cache
    1. Schema ID: Products
    2. Key fields: Code (the one we will match with the filename information)
    3. Name: ProductListCache

VIDEO: How To Switch To Caches

Regular Expression

Regular expression to split the file name into product code and other values.

  • Regex: (?<productCode>^[0-9]{2} [0-9]{3} [^-]*)-(?<filename>.*)
    • Input: 01 747 7715 7754-Set_HighRes_4035.jpg
    • Output:
      • productCode: 01 747 7715 7754
      • filename: Set_HighRes_4035.jpg

Online tool to test & validate regular expressions: www.regexr.com

  • Make sure PCRE is selected in the top right corner
  • Switch between Details and Explain tab

Business Rule Setup

Trigger

The trigger point (check Triggers in Business Rule Settings):

  • Should trigger on content upload -> Action Create
  • We want to modify the Content Item document -> Execution scope Main doc

Condition

Goal: Rule should execute for images only and only if the filename matches our regex

  • Two conditions -> start with an AND condition
  • AND
    • Content schema condition -> Image (only do this for images)
    • Match Regex condition
      • Field path: imageMetadata.fileName
      • Regex: (?<productCode>^[0-9]{2} [0-9]{3} [^-]*)-(?<filename>.*)
      • Store in: parsedFilename

You can find additional information on the fieldpath and the trigger field specialties in the explanation of fields in Picturepark. 

Transformations

  • Perform lookup of the first part of filename against Products list
  • Create a new transformation group
    • Inputs: $parsedFilename$
    • Store In: product
    • Transformations
      • Take Dictionary Value (key: productCode)
      • Lookup Cache

Action

Goal: Assign Product information layer with required field Product

  • Assign Layer Action
    • LayerId: Product information
    • Default values:
{
    "product": {
    "_refId": "$product$"
    }
}

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Business Rule: Setup Auto-Tagging
  • Business Rule: File Name Parsing to Fieldsets
  • Business Rule: Assign Number Sequence with Format on Creation of Content Item
eco-lighthouse-miljøfyrtårn

Company

  • About us
  • Resellers
  • Careers
  • Contact us

Help & support

  • Support center
  • Consultancy
  • Tech partners
  • Fotostation
  • System status

Trust Center

  • Legal
  • Security
  • Sustainability & ESG

Locations

Fotoware AS (HQ)
Tollbugata 35
0157 OSLO
Norway
FotoWare Switzerland AG
Industriestrasse 25
5033 Buchs (AG)
Switzerland

Copyright 2025 Fotoware All rights reserved.

  • Terms of service
  • Privacy policy
  • Cookie policy

Knowledge Base Software powered by Helpjuice

Expand