Field Service

Get Involved. Join the Conversation.

Topic

    Noorshabah Ramjanee
    How to use the Property formatting feature to create a...
    Topic posted July 25, 2018 by Noorshabah RamjaneeBronze Medal: 1,250+ Points 
    106 Views, 7 Comments
    Title:
    How to use the Property formatting feature to create a table?
    Content:

    Hello,

    I have a requirement where I have to create a custom table of the following format:

    Labour ID

    Labour Grade

    No of Hours Worked

    Comments

    1

     

     

     

    2

     

     

     

    3

     

     

     

     I have created the above column names as properties. However, I want to be able to add several values for the same property which are then displayed in a table.

    Can this be done in OFSC?

    Thanks.

    Version:
    Oracle Field Service Cloud 18B

    Comment

     

    • Zsolt Tolgyesi

      Hi Noorshabah,

      Just with creating duplicated fields (for example LG1 & NOHW1 & C1, LG2 & NOHW2 & C2 and so on) and one field can store only one value. After that you can play with the visibilities to show only the first line, then if it's filled in by the technician then the second and so on, or show the full table immediately. Labour ID is just a text after and not a counter.

      Regards,
      Zsolt

    • Noorshabah Ramjanee

      Hello Zsolt,

      Should I use regular expression to display the fields in a tabular format or is there any simpler way to do so?

    • Zsolt Tolgyesi

      For Mobility, the simplest way is to put the required fields with that shape into a new Section, but maybe the look will not be perfect.

      Section
      LG1              NOHW1               C1
      LG2              NOHW2               C2

      You can make header and line numbers from text items, but unfortunately it will not really looks like a real table.
      I'm really interested if someone know (show us) a better way to make a real table. Maybe with Plugins?
      Zsolt

    • Shankar Narayanan

      I second Zsolt. I have done something similar in my implementations using Angular & Plugin API. 

    • Martin Plante

      You should try to use xsl transformation in the property. 

      1. Create a text property..
      2. Check the Formatting box
      3. Add to this property an xsl transformation format with tags that will differ from the ones used by OFSC (i.e. add zzz in them)
      4. Then via api Map in this property the table data in an xml format that tags correspond to your xsl transformation format defined earlier.

      This will be good for any read-only table format display.

      You can add color or any other html formating.  Check the documentation on the web (XSLT Introduction - W3Schools) and in the OFSC documentation admin guide for more details.

      This will allow you to have in only one field property a table of 1 to n rows.

      Hope this helps.

      Martin

      • Anil Kumar

        Hi Martin,

        I have a requirement to insert number of records in a single custom property. I did the configuration as per your suggestion. Could you please provide me a sample API, to insert values in the property. This will be helpful.

        Thanks,

        Anil
         

    • Dima Buldakov

      There are many ways how to display a table in OFSC. 

      Simplest, as for me, way would be to use middleware to generate required HTML table code, save this HTML code in a property and set up property formatting with empty regular expression and simple "copy everything" xslt.

      Please pay attentions that tables are usually provide very bad user experience on the devices with small screens.