Adding "-" Between Two Fields - InfoPath Dev
in

InfoPath Dev

Adding "-" Between Two Fields

Last post 06-09-2014 01:44 AM by jun_barbosa. 16 replies.
Page 1 of 2 (17 items) 1 2 Next >
Sort Posts: Previous Next
  • 05-23-2014 10:16 AM

    Adding "-" Between Two Fields

    Hi, I am new here so hope I can get some help . . . . I want to know if it is possible to add a "-" between two fields ? I have multiple drop-downs and a date and time picker. At the end of the form, after selecting items from the drop downs I have a Text Field that is to show a Subject Line of all drop-downs selected But I want to add some characters between few field to show something similar like below: Field1 - Field2 and Field 3 @ "TIME" Also, when I select a date from the date picker, my Text Field shows a different format (Format as: YYYY-MM-DD" I Want to change that and coud not know how again, thanks for the support. M.
  • 05-26-2014 05:40 PM In reply to

    Re: Adding "-" Between Two Fields

    Hi TruFly, 

     

    You can add strings on concat by putting them inside quotes for example concat(field1," - ",field2," and "field3"," @ ",timefield)

    If you want to custom format your date you can try qRules FormatDate command. You can download a trial of qRules here http://www.qdabra.com/en/products/qRules_new.aspx

    Let me know if you encounter any problem while trying out qRules and I'll help you out.

     

     Jun 

     

  • 05-27-2014 07:51 AM In reply to

    Re: Adding "-" Between Two Fields

    Hi Jun, Thank You for contacting me back. Your previous post was so helpful. I figured out how to add strings on concat. I still have an issue which is that I want to add a DateFormat as for example (Wednesday May 3, 2016) but when I make a concat for the date in a TextBox Field, the date will show up as a dfferent format. Is there any help you may suggest, the qRule did not work for me, I don't know what to do next .... Any reply will be kindly appreciated. Thanks
  • 05-27-2014 06:47 PM In reply to

    Re: Adding "-" Between Two Fields

    Hi TruFly,

     

    Unfortunately without using qRules you will need to write code in order to do what you want. Here are a couple of links that can guide you:

    http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx 

    http://msdn.microsoft.com/en-us/library/az4se3k1.aspx

    qRules is still the easiest way or better yet grab the nearest programmer, that always work :)

    Unfortunately you'll have to pay for qRules but if that is not a problem I can show you how to use it 

     

    Jun 

  • 05-27-2014 06:55 PM In reply to

    Re: Adding "-" Between Two Fields

    Hello Jun, If qRules is the easiest way to do so then assist me please and how to use it. Thanks.
  • 05-27-2014 08:26 PM In reply to

    Hi TruFly,

    I have a attached a zip file that contains a document. It has step by step procedure on what you need to do. Should take you less than 5 minutes.

    Cheers! 

     

     

     

     

  • 05-28-2014 09:07 AM In reply to

    Re: Adding "-" Between Two Fields

    As to how a control displays a date value, you should be able to set that formatting in the control's properties as long as the data type is correct.


    Hilary Stoupa

  • 05-28-2014 09:13 AM In reply to

    Re: Adding "-" Between Two Fields

     Hi Hilary,

     

    That is not always the case, In a Text Field, the date will be formatted correctly as you mentioned above, but when you have a TextField that contains others field values including a Date Value, the Date will be formatted in a different way as: YYYY-MM-DD which is completely different then the date I selected at the first place.

    Thanks

    TF 

  • 05-28-2014 09:28 AM In reply to

    Re: Adding "-" Between Two Fields

    Yup - the format option is just for the date.

    Hilary Stoupa

  • 05-28-2014 11:05 AM In reply to

    Re: Adding "-" Between Two Fields

    Hi Jun,

     

    Sorry for bugging you. I tried the steps in the document you sent me. it was so helpful, thank you, but I still do not get any result in my subject line

    The subject like has a formula similar to this: concat(Field1, Field2, Field3, " - ", Field4, Result, " @ ",DropDownTime) 

    "Result" is the one I added from your documentation. Am I doing anything wrong, as the subject will show a Blank/Empty Date/

    Thanks again

     

    TF 

  • 05-28-2014 04:58 PM In reply to

    Re: Adding "-" Between Two Fields

     Hello TruFly,

     To check you can drag the result to the canvas to see if it not blank or if you don't mind you can attach your form here and I can take a look at it.

    cheers! 

     

     


  • 05-28-2014 06:57 PM In reply to

    Re: Adding "-" Between Two Fields

     Hello TruFly,

    I found two problem, one is that there is something wrong with instruction, this was the formula we had concat("FormatDate /.=", ., " /format=D") but it should be changed to concat("FormatDate /date=", ., " /format=D"). Sorry about that.

    Second, the form has custom code in it.  If you do not need this custom code (looking at the form I do not think you do) please go to File, Form Options, Programming and click on Remove Code. 

    After you do those two, re-inject the form with qRules 

    Let me know if it works.  

     

     

     

     

  • 05-29-2014 07:23 AM In reply to

    Re: Adding "-" Between Two Fields

    have you tried to format the date and then assign it to a holding variable, then use that variable in your text box control witht he other fields.

  • 05-29-2014 11:58 AM In reply to

    Re: Adding "-" Between Two Fields

    Hi Jun,

    I got the date figured out, I might need another documentation as it is still some how hard for me to do, my bad, in regards of time, you think there is an easy  way to display the time instead of the drop down menus. check attachment 

     

    TF now

  • 05-30-2014 08:36 PM In reply to

    Re: Adding "-" Between Two Fields

    Hi TruFly,

    Remember the command we used, concat("FormatDate /date=", ., " /format=D")

    The D in the specifies the format. That parameter came from these list of standard and non-standard formats:

    http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx

    http://msdn.microsoft.com/en-us/library/az4se3k1.aspx 

    You can replace the D with anything in that list that works for you. You can even delete the 3 fields you have for time. You can include the time in the date field in any format you want.

    also, here is the link to the qRules command documentation. There should also be a copy in your qRules installation folder.

    http://www.qdabra.com/en/products/docs/qRules.aspx

     

    Let me know if you need more help.

    Cheers! 

    Jun 

     

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