Skip to Main Content
AVEVA Product Feedback


Status No status
Created by Gael
Created on Aug 20, 2022

Replace function to be added in AF analysis

It would be interesting to add the Replace function (like the one in StringBuilder) directly in AF Analysis
  • Attach files
  • Kelsey Bobeck
    Reply
    |
    Mar 27, 2023

    I'm shocked this doesn't exist already, frankly. I started typing out "Replace" in AF thinking it did. It's absence is going to add to the steps and complexity of what I was trying to achieve, which was returning values from a String Array attribute of 50 alarm tags, reusable across all my sites/assets. What I was imagining:

    tagArr: [[code]WALM[asset]_AlmStActSt0,[code]WALM[asset]_AlmStActSt1,...[code]WALM[asset]_AlmStActSt49]

    subArr: Replace(Replace(tagArr, "[asset]", 'Asset Code'), "[code]", 'Site Code'))

    • result: [ABC1WALM001_AlmStActSt0, ABC1WALM001_AlmStActSt1,...ABC1WALM001_AlmStActSt49]

    resultArr: MapData(subArr, TagVal(TagNum(Concat("\\SERVER\",$val))))

    • result: [60, 1950,..., 0]

  • Guest
    Reply
    |
    Aug 20, 2022
    I agree, this would be a great function to add in and reduce complexity in the attributes.