qRule SetValue command and Hard Returns in MultiLine Text Boxes - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

qRule SetValue command and Hard Returns in MultiLine Text Boxes

Last post 04-16-2015 12:05 PM by GwenW. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-14-2015 12:53 PM

    qRule SetValue command and Hard Returns in MultiLine Text Boxes

    Hi,

    I have a situation where I'm passing data into a temporary table (in InfoPath) in order to do a bulk submit to a SharePoint list. All text fields & boxes discussed below are set up the same (set to multiline, spell checker enabled and a text (string) datatype).

    My problem is that I have a multiline text box on the form. If the user puts in a hard return (like to start a new paragraph, etc), the qRules command will not send the data in the field over to the temp table (it remains completely blank in the temp table). If there is no hard return, the data goes fine.

    In comparison, I have a separate multiline text box that feeds into another field in the temp table simply by it being a default value for the temp table field (not using qRules to push). This field value duplicates to all rows in the temp table, so no need to push with qrules. This works in passing over the hard returns.

    My qRules command is as follows:

    concat("SetValue /xpath=/my:myFields/my:TempHold/my:TempHoldSubmit[last()]/my:tmp_txt_Other /value=", txt_Other[ID2 = tmp_TestID]) where the ID2 is the id of the row on the user input side of the form and temp_Test ID is the hidden table row ID - this allows the data to match into the correct temp table row.

    (the full xpath is: concat("SetValue /xpath=/my:myFields/my:TempHold/my:TempHoldSubmit[last()]/my:tmp_txt_Other /value=", /my:myFields/my:Other/my:txt_Other[/my:myFields/my:sec2_vw2/my:group7/my:Row/my:ID2 = /my:myFields/my:TempHold/my:TempHoldSubmit/my:tmp_TestID])

    I don't think the command is wrong... it works fine. It's just if a hard return is included, this is when it doesn't work. Do you know if hard returns are a limiting factor for SetValue?

    I'm using InfoPath 2010, SharePoint 2010, qRules 6.1

    Thanks! Gwen 

     

  • 04-15-2015 08:17 AM In reply to

    Re: qRule SetValue command and Hard Returns in MultiLine Text Boxes

    Hi - try using CopyRichText instead - I just tested that w/ two multiline text boxes and it seemed to do the job. I'll file a case to look into why SetValue fails in these circumstances - thanks for letting us know!

    Hilary Stoupa

  • 04-16-2015 12:05 PM In reply to

    Re: qRule SetValue command and Hard Returns in MultiLine Text Boxes

    Hilary, thank you so much! Copyrichtext works perfectly :).

    As a side note (something I found that may be of interests to others who find this thread)...

    At least for my situation - one InfoPath form captures the data (multiline text box) and pushes it into a SharePoint list (multiple lines of text data type field). Then a separate "audit type" form displays the data from that list (secondary data source) in another multiline text box.

    If you want the hard returns to show on the second form, just like they were captured originally, then the list field in SharePoint must have the column setting of 'specify the type of text to allow' as plain text. If it's enhanced text, the hard returns won't show in the form text box (even set at multiline).

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