locked
how to merge two fields into one RRS feed

  • Question

  • Hi

    I have a column Days with single line of text and below that Hours again single line of text. How can I merge the both to be in the same row. and not below the other. I dont have InfoPath

    Thanks

    Thursday, March 6, 2014 5:35 AM

Answers

  • As per my understanding, You want to just redesign your list form. You can achieve the same using SPD2010 or you can use jQuery also if you don't have rights for SPD customization.

    Create a custom list form using SharePoint Designer

    SharePoint form: present fields side-by-side

    Best Regards, Jaydeep


    • Marked as answer by Zaaraa Friday, March 7, 2014 10:36 AM
    Thursday, March 6, 2014 9:22 AM
  • I followed Jaydeep using designer. Apart from that I had to add a jquery code as it was not showing it side by side

     $("input[Title='Days']").parent().css('float', 'left');


    • Edited by Zaaraa Friday, March 7, 2014 10:38 AM changes
    • Marked as answer by Zaaraa Friday, March 7, 2014 10:38 AM
    Friday, March 7, 2014 10:37 AM

All replies

  • Hey,

    You can create a calculated column for that.

    Have below links for your reference.

    Calculate data in lists or libraries
    Combine text and numbers from different columns
    Calculated Field Formulas

    Thanks.


    Thursday, March 6, 2014 5:47 AM
  • You can use the"Calculated Column" in SharePoint. Create a calculated column and formula:

    =[Days]&[Hours]

    Refer the complete list of calculated column formulas

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

     

    Thursday, March 6, 2014 6:08 AM
  • Hi

    But calculated column does not appear in the form , I want the user to be able to fill that

    Thursday, March 6, 2014 9:08 AM
  • As per my understanding, You want to just redesign your list form. You can achieve the same using SPD2010 or you can use jQuery also if you don't have rights for SPD customization.

    Create a custom list form using SharePoint Designer

    SharePoint form: present fields side-by-side

    Best Regards, Jaydeep


    • Marked as answer by Zaaraa Friday, March 7, 2014 10:36 AM
    Thursday, March 6, 2014 9:22 AM
  • Hi

    another approach

    create a unique column where the user will fill day and time

    and next, use 2 calculated columns which will split the column's value

    So you don't need InfoPath or Sh Designer


    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

    Thursday, March 6, 2014 9:35 AM
  • Hi

    I want days column and hours column side by side. I dint quite understand the method you have mentioned. Could you please elaborate. Thank you for taking your time out

    Thursday, March 6, 2014 11:52 AM
  • Hi

    i proposed that both columns are only one (COL_DAYSHOURS ) - this way , automatically it will appear in same row

    the user will fill the value, as you propose it, like

    please insert days number and hours, like d,HH

    to be sure that the the user fill the column in that format, you can use little coding with regular expressions, attached to the edit box element

    If you need separate values for days and time, you should create 2 columns , calculated columns

    one for days another for hours, calculated based on the unique column's value ( COL_DAYSHOURS )
    If you need more details i will try to create a real example for you.

    Let me know


    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

    Thursday, March 6, 2014 12:41 PM
  • Hi

    I wanted a jquery way to do, I am not good at coding. So if anybody could tell me how it could be done using jquery it would be helpful

    Thanks

    Thursday, March 6, 2014 12:44 PM
  • Hi

    Thank you for responding , I want it as two separate columns in the same row. It would be really helpful if you could provide me a real example.

    Thanks


    • Edited by Zaaraa Friday, March 7, 2014 5:46 AM modification
    Friday, March 7, 2014 5:45 AM
  • Hi

    If I use calculated column , would it appear in the list form.

    Friday, March 7, 2014 5:46 AM
  • I followed Jaydeep using designer. Apart from that I had to add a jquery code as it was not showing it side by side

     $("input[Title='Days']").parent().css('float', 'left');


    • Edited by Zaaraa Friday, March 7, 2014 10:38 AM changes
    • Marked as answer by Zaaraa Friday, March 7, 2014 10:38 AM
    Friday, March 7, 2014 10:37 AM