Orbeon Regex

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Orbeon Regex

Oscar
All,

I have a field that is being automatically populated that holds the user account. However, the information being sent from the source has the full username in the format: [hidden email] as opposed to just the 1234567. 

Would there be a way to leverage regex against the field to truncate the username to only extract the username and drop the @domain.net?

Regards, 

Oscar

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/9ad03a7a-5359-4735-aeb8-65a3b3ebce8b%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Orbeon Regex

Jarosław Kowalewski
Hi,
maybe will be enough to use XPath function substring-before(' [hidden email]','@')
Nice list of available functions with examples you can find https://www.w3schools.com/xml/xsl_functions.asp

//Jarek
fn:substring-before(string1,string2)Returns the start of string1 before string2 occurs in it

Example: substring-before('12/10','/')
Result: '12'


śr., 29 sty 2020 o 20:12 Oscar <[hidden email]> napisał(a):
All,

I have a field that is being automatically populated that holds the user account. However, the information being sent from the source has the full username in the format: [hidden email] as opposed to just the 1234567. 

Would there be a way to leverage regex against the field to truncate the username to only extract the username and drop the @domain.net?

Regards, 

Oscar

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/9ad03a7a-5359-4735-aeb8-65a3b3ebce8b%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/CAHFpwcVm6yMt1A7q18Og7V5iO8J20X5kvGORf1_cVtyyU5wgpA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Orbeon Regex

Oscar
In reply to this post by Oscar
Thank you. I will give this a try

On Wednesday, January 29, 2020 at 11:12:49 AM UTC-8, Oscar wrote:
All,

I have a field that is being automatically populated that holds the user account. However, the information being sent from the source has the full username in the format: [hidden email] as opposed to just the 1234567. 

Would there be a way to leverage regex against the field to truncate the username to only extract the username and drop the @<a href="http://domain.net" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdomain.net\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH9jEhV9osyLE_1uYlBHlzNk74gdg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdomain.net\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH9jEhV9osyLE_1uYlBHlzNk74gdg&#39;;return true;">domain.net?

Regards, 

Oscar

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/8ad7330e-a92c-4f5d-868a-4658ef393020%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Orbeon Regex

Oscar
Thanks Jerek. This worked. 

I have setup a hidden field to be the landing spot for the data. Then, I have used the function substring-before($control,'@') in the initial value. 

according to the Orbeon documentation, there is no need to prefix these functions. 

Regards, 

Oscar

On Wednesday, January 29, 2020 at 12:09:04 PM UTC-8, Oscar wrote:
Thank you. I will give this a try

On Wednesday, January 29, 2020 at 11:12:49 AM UTC-8, Oscar wrote:
All,

I have a field that is being automatically populated that holds the user account. However, the information being sent from the source has the full username in the format: [hidden email] as opposed to just the 1234567. 

Would there be a way to leverage regex against the field to truncate the username to only extract the username and drop the @<a href="http://domain.net" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdomain.net\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH9jEhV9osyLE_1uYlBHlzNk74gdg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdomain.net\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH9jEhV9osyLE_1uYlBHlzNk74gdg&#39;;return true;">domain.net?

Regards, 

Oscar

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/92851038-f949-4bfb-a1d8-44c9346ab7d7%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Orbeon Regex

Jarosław Kowalewski
Great,
and you don't need to add hidden fields. 
In the initial value combine two functions substring-before(xxf:get-request-header('username'),'@')

//Jarek

śr., 29 sty 2020 o 22:16 Oscar <[hidden email]> napisał(a):
Thanks Jerek. This worked. 

I have setup a hidden field to be the landing spot for the data. Then, I have used the function substring-before($control,'@') in the initial value. 

according to the Orbeon documentation, there is no need to prefix these functions. 

Regards, 

Oscar

On Wednesday, January 29, 2020 at 12:09:04 PM UTC-8, Oscar wrote:
Thank you. I will give this a try

On Wednesday, January 29, 2020 at 11:12:49 AM UTC-8, Oscar wrote:
All,

I have a field that is being automatically populated that holds the user account. However, the information being sent from the source has the full username in the format: [hidden email] as opposed to just the 1234567. 

Would there be a way to leverage regex against the field to truncate the username to only extract the username and drop the @domain.net?

Regards, 

Oscar

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/92851038-f949-4bfb-a1d8-44c9346ab7d7%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/CAHFpwcXgXV2C-EM2HCh2T1JyhLzfoKN43o-9OPK%2Be7JsSvR_sQ%40mail.gmail.com.