Trying to split a string with a delimiter using SQL within a workflow - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Trying to split a string with a delimiter using SQL within a workflow

Last post 06-19-2017 07:51 AM by Hilary Stoupa. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 06-15-2017 11:52 AM

    Trying to split a string with a delimiter using SQL within a workflow

    I've got a SP list with a standard "Date and Time Picker" from infopath, resulting in a field which typically will appear as, e.g. "6/15/17 2:25:43 PM". My boss wants to keep this output as-is for our records, but does not want this field in the list view. Instead she wants a field that only shows the date (everything in the string before the first space " "). I am able to retrieve this in a report I've built by using the following SQL code DATEVALUE(LEFT(DateField,FIND(" ",DateField))) But when it comes to creating a workflow to populate a new field with this substring, I am at a loss. I've run several searches and the only SQL options for workflows appear to be the 'Utility Actions' (Extract Substring from End of String, Extract Substring from Index of String, Extract Substring from Start of String, Extract Substring of String from Index with Length) - none of which will allow the same SQL syntax I'm attempting since they only seem to want to accept integers or fields, not functions or even a " ". Is there a way to execute more complex SQL scripts within workflows outside of the Utility Action options OR a way to split a string based on a delimiter/accomplish what my boss is asking for (short of going back to infopath)?
  • 06-15-2017 03:49 PM In reply to

    Re: Trying to split a string with a delimiter using SQL within a workflow

    I'm struggling a bit to understand what you are asking... Do you need to use a workflow for this, or will just a calculated column work? That is - is this new field also in the same library as the promoted data?
    Hilary Stoupa

  • 06-19-2017 07:08 AM In reply to

    Re: Trying to split a string with a delimiter using SQL within a workflow

    thanks for the reply - my assumption is that a workflow is required since the fields will not be populated until the form is opened and the dates are selected by the user. I've not had much luck populating additional fields within the same form in the time between it is opened and submitted, but if that's possible I would be happy to give it a shot.
  • 06-19-2017 07:51 AM In reply to

    Re: Trying to split a string with a delimiter using SQL within a workflow

    I may not be understanding. Is this a SharePoint List form? When you say "list view" do you mean the default view of the list in SharePoint? If so, I'd just add another column, default it to the value of the selected date / time, and format it to show only the date value. Modify the default view to show those columns (formatted as date display) instead of the columns the user fills out in the form (formatted as date / time).
    Hilary Stoupa

Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.