Reltio Connect

 View Only
  • 1.  How to Create an Auto Generated ID with Prefix

    Reltio Partner
    Posted 12-23-2022 13:24
    Hi all,

    Is there a way to add a prefix to an auto-generated ID? For example,  <KRM> +6 digit auto-generated ID.

    Thanks,
    Eren


  • 2.  RE: How to Create an Auto Generated ID with Prefix

    Founding Member
    Posted 12-25-2022 08:15
    Hi Eren,
    You can add AutoGenaration pattern like this,
    "autoGenerationPattern": "KRM{value}",

    So it would be something similar to this,

    {
    "label": "ID",
    "name": "ID",
    "description": "Auto generated KRM ID",
    "type": "String",
    "hidden": false,
    "important": false,
    "system": false,
    "searchable": true,
    "autoGenerated": true,
    "generator": "SEQ_GEN_ABCDEDFG_ID",
    "autoGenerationPattern": "KRM{value}",
    "generateIfEmpty": true,
    "generateIfNotEmpty": false,
    "generatedValueUniqueForCrosswalk": true,
    "attributeOrdering": {
    "orderType": "ASC",
    "orderingStrategy": "LUD"
    },
    "uri": "configuration/entityTypes/HCP/attributes/ID",
    "skipInDataAccess": false
    },


  • 3.  RE: How to Create an Auto Generated ID with Prefix

    Posted 14 days ago

    Hello, is there a way to creat zero-padding for the ID?
    I would like my ID to be something like "MDM0001" for the first one, and then increase to MDM0002, 0003, etc. Currently with the solution provided above they start at MDM1, MDM2...
    Thank you. 



    ------------------------------
    Elias Moskona
    WEX
    ------------------------------



  • 4.  RE: How to Create an Auto Generated ID with Prefix

    Reltio Employee
    Posted 13 days ago

    Elias, 

    Try using the property fixedLength while creating the generator. I have created a generator with the following payload 

    [
    {
      "name": "DIP_PROTOTYPE_SAMPLE_GENERATOR_01",
      "type": "SEQUENTIAL",
      "valueType": "DECIMAL",
      "rangeStart": "000000001",
      "step": "1",
      "fixedLength" : 9
    }
    ]


    Now, If I run the Get Next Reserved Value API, I will get the value as 000000001

    This should satisfy your use case. Let me know if you have any follow-up question. 



    ------------------------------
    Diparnab Dey
    Technical Consultant
    Reltio
    Kolkata, West Bengal
    ------------------------------



  • 5.  RE: How to Create an Auto Generated ID with Prefix

    Reltio Partner
    Posted 12-25-2022 15:18
    Perfect! Thank you!