cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

How to delet part of text field?

Jump to solution

Hello,

 

I'm using Nintex 2013. What I need to do - save part of text field.

I'm getting log file from other system as text field in SharePoint 2013 list. Log has 6 rows and I need to save only first 5 rows.

Example of Log field:

Start time: 18:16:17 PM

End time: 19:14:24 PM

Overall files to transfer: 114

Successfully transfered: 110

Failed to transfer: 4

Link to log file: \\%mydomain%\MediaTransfer\Logs\%datetime%.txt

 

I'm trying to replace value of Log Filed using Regular Expression Workflow in Nintex:

fn-Remove({WorkflowVariable:Log}, Link, 100)

 

But it doesn't work, I'm getting same result with 6 rows.

 

It's looks easy, but I failed to find the right answer.

 

Thank in advance,

Regards,

Oleg

Labels: (1)
0 Kudos
Reply
7 Replies
christopheraucq
Nintex Newbie

Re: How to delet part of text field?

Jump to solution

Hi Oleg,

Did you try to keep the left of Link to log file?

Regards,

Christophe

0 Kudos
Reply
Not applicable

Re: How to delet part of text field?

Jump to solution

using a regular expression.  If "Link to Log File" is always in the text then you can use a regex to replace Link to log file* with nothing, which will remove it and everything after it.

0 Kudos
Reply
Not applicable

Re: How to delet part of text field?

Jump to solution

Hi Martin,
Thank for your advice, can you please check my formula, because it still doesn't work.

fn-Replace ({WorkflowVariable:Log},"Link to log file*",)

Thank in advance,

Oleg

0 Kudos
Reply
oliverschneider
Nintex Newbie

Re: How to delet part of text field?

Jump to solution

Hi Oleg,

 

this is easy - you have only a Little mistake in your Syntax:

Configure the RE like this:

 

Pattern: Link.*

(the hint is the Point between "link" and CORRECT_ANSWERS get_ent.sh one_id teswt_out ;-)

 

leave the fielt "replacement text" empty.

 

This is my result after running the workflow:

 

Start time: 18:16:17 PM

End time: 19:14:24 PM

Overall files to transfer: 114

Successfully transfered: 110

Failed to transfer: 4

Reply
Not applicable

Re: How to delet part of text field?

Jump to solution

HI, Oleg Dobrykin​! Let us know if this solution worked for you by clicking "correct answer." It helps others in the community seeking correct answers to similar problems. If not, your feedback is always welcome. Thanks!

0 Kudos
Reply
Not applicable

Re: How to delet part of text field?

Jump to solution

Yes sorry, I didn't give you exact syntax.

Great tool for regular expression testing online is www.regexr.com.  There are others as well.

I use regex quite a bit in my workflows.

0 Kudos
Reply
Not applicable

Re: How to delet part of text field?

Jump to solution

Hi Oliver,

Thanks a lot for your help, this is 100% correct solution!

Regards,
Oleg

Reply