normalize-space does not seem to work, and how to remove capitals - InfoPath Dev
in

InfoPath Dev

normalize-space does not seem to work, and how to remove capitals

Last post 06-05-2013 11:49 PM by TwanVeugelers. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 06-05-2013 04:46 AM

    normalize-space does not seem to work, and how to remove capitals

    Hi. I have a field, 'lastname', with an action to set a fields value: emailaggregator = normalize-space(.) So I would expect that the 'emailaggregator' field would display 'van der Velden' as 'vanderVelden'. But it doesn't it keeps displaying as 'van der Velden'. Am I now misinterpreting the function of 'normalize-space'? Also I need to remove any and all capitals used in the 'lastname' field. So if 'lastname' is filled with 'van der Velden', I want 'emailaggregator' to be filled with 'vandervelden' Now, how do I accomplish this?
  • 06-05-2013 05:22 AM In reply to

    Re: normalize-space does not seem to work, and how to remove capitals

    I would suggest trying out the translate function. For example, for the first requirement, you could do this:

    translate(field1, " ", "")

    where spaces are "translated" into nothing. (removed)

    You could use another translate function to translate all uppercase letters into lowercase, to end up with something like:

    translate(translate(field1, " ", ""),"ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz")

    I'm attaching a quick sample. Hope this helps.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 06-05-2013 05:36 AM In reply to

    Re: normalize-space does not seem to work, and how to remove capitals

    that works like a charm. thank you. would: translate(translate(translate(field1, " ", ""),"-", ""),"ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz") also work and remove - ?
  • 06-05-2013 11:46 AM In reply to

    Re: normalize-space does not seem to work, and how to remove capitals

    It should. Try it out and let us know what you find.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 06-05-2013 11:49 PM In reply to

    Re: normalize-space does not seem to work, and how to remove capitals

    That also works like a charm.... Great work. Thanx
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.