1
0
-1

We're looking for the Reference Data Component that is mentioned in this article from August 2017 but it is not available in Maestro 17.10.3?

Accessing Reference Data in a form

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi Lin,

      Commencing with the 17.10 release, reference data can be stored in Transact Manager and accessed by Maestro forms calling the referenceData function in the Transact namespace. Transact.referenceData()


      Kind regards,

      Julio.


      1. Lin VanOevelen

        So we just use a datafield? There is no component?

      2. Matthew White

        The article says "Drop a Reference Data component" from Maestro. Typing "reference" into the component filter does not show any components.

      3. Julio Berrueco

        Yes. Now you can pull the data from TM, and manipulate and add it in any field you need.

        You can find Transact API documentation at Maestro API reference, it's accessible from, for instance, a text field by clicking API methods from the editor.

        Please, see the attachment:.

      4. Sindy Tang

        hi,

        Can't seem to find transact name space in the dropdown.

        Sindy

      5. Julio Berrueco

        Hi, that's odd.

        Should be after Scroll... but I see that doc is TM5.1 (/Maestro-51/) which is not including Transact feature yet.

        The use is like this:

        Now I have a doubt, is it an error on the link or are you in TM5?

        If you try to call Transact.referenceData method from any rule, what kind of error can you see?

        I believe it's pre-released in earlier version of TM

        Kind regards,

        Julio.

      6. Sindy Tang

        Hi Julio,

        I can now see transact namespace in the dropdown and you're right my test project was in maestro 5.1 before.

        However, in the documentation of transact namespace, can you provide a link to TM reference data documentation as I am confused about the parameters in the method and how to reference them when calling the function.

        Thanks

        Sindy


         

      7. Julio Berrueco

        Hi Sindy,

        Sorry for the delay. You are right, I've been looking for that piece of information in our public docs and couldn't find it.

        I raised a petition to include it.

        So far I can give you some steps you can follow to try this feature.

        1) Do you have access to TM? On TM, organization level, you will find a tab called Reference Data.

        You can create there your data source, Json format, csv...

        2) (Optional) Queries can be tested also there when you use a csv file as a data source, otherwise, query will be null. The query should be written in Json format with 4 objects: {"Select":["fields","from","your","csv"], "Filter":["Field";"fieldName","operation":"logicOperator","value":""], "order":["Field":"fieldName","sortasc":"boolean"],"Fetchlimit":"number"}

        Then that query can be use from your call to Transact.referenceData(), but it's only for csv files.

        3) Use Transact.referenceData() to retrieve your data from TM, parameter name is the same name you gave to the Reference Data source created on step1.


        I'll let you know as soon as the proper doc is ready.


        Kind regards,

        Julio.


      8. Lin VanOevelen

        Hi Julio,

        We're trying this method now, but we have a few concerns about it:

        1. It being on an organisation level means that it could be easily missed when we use it for something like a country dropdown. We happen to have lots of organisations in TM as we deal with a large variety of clients and use organisations to organise their submission data access.
        2. The Organisation data reference creates a form property. The property does not automatically update when the organisation property is updated. It requires a manual sync. This is also not ideal if you potentially have dozens of forms using the data reference.

        Cheers,

        Lin

      9. Matthew White

        Hi Julio,

        I've published a 17.10.6 maestro form to TM 5.1.10 and when i call Transact.referenceData('mydata')

        I get a 400 bad request, unknown operation referenceData.

        This also appears to be blocking the ui thread by doing a synchronous request.

        Matt

      10. Glenn Crook

        Transact Functions are only available on Transact Manager 17.10 and later. The API documentation for this function does not mention it but other functions with this namespace do, we will update this documentation to reflect this. Sorry for the confusion.

        I was unable to find any other reference to the Reference Data component but the auto complete widget does handle data within the form that is read from a data source in the data model and requires no external calls.

      11. Matthew White

        Hi Glenn,

        The solution we are looking for is a way of injecting data that changes occasionally into any form so that it can be used as dropdown values. It needs to work for all forms across all spaces and organisations and also work in receipts so the dropdown gets a proper value when a receipt is rendered. The kind of data we are thinking about is suburbs and countries.

        At present we use prefill mapping but that injects the data into the xml so our xml's are filled with country and suburb lists.

        Could you suggest a solution that works on TM 5.1.10 and clarify whether reference data would fulfill this requirement on 17.10?

        Matt


      12. Glenn Crook

        Hi Matt,

        I can understand what you are trying to do and the fact that Dynamic Data calls are disabled in receipts which means that you either need to embed the whole data structure or store the results from the value you have picked, eg for a country field if the data value is a country code, you also have store the display value in the XML and have a separate field to show the display value on receipts and hide the original field but you will need to look at the impact of such behaviours on your form.

      CommentAdd your comment...