Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

We Value Your Feedback!
Could you please spare a few minutes to share your thoughts on Cloud Connected vs On-Premise Services. Your feedback can help us shape the future of services.
Learn more about the survey or Click here to Launch the survey
Schneider Electric Services Innovation Team!

Find the Last Position of a Character in a string

EcoStruxure Geo SCADA Expert Forum

Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • Remote Operations
  • EcoStruxure Geo SCADA Expert Forum
  • Find the Last Position of a Character in a string
Options
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Experts
User Count
sbeadle
Kirk sbeadle Kirk
309
AndrewScott
Admiral AndrewScott
99
BevanWeiss
Spock BevanWeiss
91
AdamWoodlandToo
Lt. Commander AdamWoodlandToo
38
View All
Related Products
product field
Schneider Electric
EcoStruxure™ Geo SCADA Expert

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Solved Go to Solution
Back to EcoStruxure Geo SCADA Expert Forum
Solved
Tanquen
Lt. Commander Tanquen
Lt. Commander

Posted: ‎2020-10-07 12:10 PM . Last Modified: ‎2023-05-03 12:09 AM

0 Likes
3
2282
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-10-07 12:10 PM . Last Modified: ‎2023-05-03 12:09 AM

Find the Last Position of a Character in a string

Trying to create a text animation expression that will give me all the characters after the last occurrence of a Space or particular character.

 

I've seen examples online that use in string reverse, Find, Trim and other commands that don't seem to be available. I think I've only got InString, Left, Mid, Right, Len etc.

 

I've tried nesting some Mid commands and it works but it's getting ugly fast.

 

MID( MID( MID( ".Name", INSTRING( ".Name", ' ' ),-1 ), INSTRING( MID( ".Name", INSTRING( ".Name", ' ' ),-1 ), ' ' ),-1 ), INSTRING( MID( MID( ".Name", INSTRING( ".Name", ' ' ),-1 ), INSTRING( MID( ".Name", INSTRING( ".Name", ' ' ),-1 ), ' ' ),-1 ), ' ' ),-1 )

 

Using the Right command also works but seems a little fragile. If there was an extra space in the last seven characters and or the end of the string that I want at some point is greater than seven characters it'll stop working.

 

MID( RIGHT( ".Name",7), INSTRING(RIGHT( ".Name",7), ' '), -1 )

Labels
  • Labels:
  • Scripting
  • ViewX
  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA control
  • SCADA data
  • SCADA integration
  • SCADA network
  • SCADA programming
  • SCADA software
  • scada system
  • SCADA tutorial
  • SCADA web application
  • Telemetry and SCADA
Reply
Contact Support

Link copied. Please paste this link to share this article on your social media post.

  • All forum topics
  • Previous Topic
  • Next Topic

Accepted Solutions
AdamWoodland
AdamWoodland Schneider Alumni (Retired)
Schneider Alumni (Retired)

Posted: ‎2020-10-07 02:40 PM

0 Likes
2
2275
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-10-07 02:40 PM

Check out ELEMENT(), specify a space as the splitter, index of 0 (or 1, can't remember which is the first index) and specify in reverse (i.e. last param is 1).

 

See the help for all the options on ELEMENT()

See Answer In Context

  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA control
  • SCADA data
  • SCADA integration
  • SCADA network
  • SCADA programming
  • SCADA software
  • scada system
  • SCADA tutorial
  • SCADA web application
  • Telemetry and SCADA
Reply
Contact Support

Link copied. Please paste this link to share this article on your social media post.

Replies 3
AdamWoodland
AdamWoodland Schneider Alumni (Retired)
Schneider Alumni (Retired)

Posted: ‎2020-10-07 02:40 PM

0 Likes
2
2276
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-10-07 02:40 PM

Check out ELEMENT(), specify a space as the splitter, index of 0 (or 1, can't remember which is the first index) and specify in reverse (i.e. last param is 1).

 

See the help for all the options on ELEMENT()

  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA control
  • SCADA data
  • SCADA integration
  • SCADA network
  • SCADA programming
  • SCADA software
  • scada system
  • SCADA tutorial
  • SCADA web application
  • Telemetry and SCADA
Reply
Contact Support

Link copied. Please paste this link to share this article on your social media post.

Tanquen
Lt. Commander Tanquen
Lt. Commander

Posted: ‎2020-10-07 03:08 PM

In response to AdamWoodland
0 Likes
1
2270
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-10-07 03:08 PM

Thanks!

 

That is much better. Too bad it's not on the same page in the manual as the String Functions. 

 

This works:

ELEMENT(1, ' ', ".Name", 1)

 

I had to search for "Element (" with quotes to find it. 

  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA control
  • SCADA data
  • SCADA integration
  • SCADA network
  • SCADA programming
  • SCADA software
  • scada system
  • SCADA tutorial
  • SCADA web application
  • Telemetry and SCADA
Reply
Contact Support

Link copied. Please paste this link to share this article on your social media post.

Tanquen
Lt. Commander Tanquen
Lt. Commander

Posted: ‎2020-10-22 09:22 AM . Last Modified: ‎2020-10-30 11:00 AM

In response to Tanquen
0 Likes
0
2172
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-10-22 09:22 AM . Last Modified: ‎2020-10-30 11:00 AM

Sort of on the same topic, is there a command that's the opposite of STR? I'm having some issues with parameter values not being processed by the expression in a way I'd expect. I have an object in the template that's looking at a parameter for its visibility and that works but if I take the same parameter and the visibility is a expression flowchart it no longer works unless I say parameter: tag1 =’1’. I can also get around it by saying “parameter: tag1 OR parameter: tag2”. But I can't use a flow chart expression to check if tag one is true and then if tag two is true and so on. I'm thinking it's because when I use the flowchart expression it's seeing the "parameter: tag1" as a string and not a value.

 

*****************

 

Looks like INT works.

INT(INTEGER or REAL)

  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Reply
Contact Support

Link copied. Please paste this link to share this article on your social media post.

Preview Exit Preview

never-displayed

You must be signed in to add attachments

never-displayed

 
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

This is a heading

With achievable small steps, users progress and continually feel satisfaction in task accomplishment.

Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.

of