Data Tables Columns Order

Hi Everyone,

In my terraform environment I am creating some tables which will be used by the customer to control the logic of the Flow, the will use Genesys Cloud web interface for that. The problem which I have can be considered aesthetic one but can really make life of the customer a bit more complicate – and it is the columns order. Is there a way to control the column order from the Terraform?

Hi Anton_Karpov

The developer forum is specific to API usage and customizations. The best place for your question, would be Community

Hi Anton

After playing around with the data tables resource, it looks like the order of the properties in the resource persists in the UI. Are you seeing different behaviour?

-Charlie

Thank you Charlie for your reply! I can confirm that I can change the column order in the UI . Probably it was my fault, I have not written that explicitly - what I am looking for is the possiblity to change the column order when I create the table through the Terraform and right now when I do the column are shown in the random order (there is of cause a certain logic behind, but I dont understait). Is it possible to control it somehow on the Data Table resource level? I am going to create through the terafform about 100 of tables, manually change the column order for all of them through the UI, does not look like a proper solution for me :slight_smile:

The order should persist from Terraform to the Genesys Cloud UI. Or are you exporting the one hundred data tables, and the order of the properties is being randomised on export?

The order should persist from Terraform to the Genesys Cloud UI, this is what I am trying to aim :slight_smile:

What version of our Terraform provider are you using? I see some logic in our code that seems to handle ordering. Maybe that isn't included in your version.

At the moment I am using - mypurecloud/genesyscloud v1.33.0

The code I'm talking is in v1.33.0, so the version number probably isn't the issue. Still, no harm in upgrading it to the latest and trying again. I could be missing something.

Would you mind providing an example datatable resource that does not persist its order from TF to UI? If I could recreate the behaviour you're seeing, that would help me a lot. For me, the order persists no problem with basic data tables.

Hi Zino,

CX as Code/Terraform questions are appropriate for the forum. He is referring to one of our Dev Tools the DevTooling owns :slight_smile:

  • John
1 Like

Thanks for the heads up john

Ah, thank you! Actually I have a bit complicated way of creating tables - I have their configuration in the JSON, like that:

    "key": {
      "title": "id",
      "type": "string"
    },
    "prompGreeting": {
      "title": "Prompt Begrüssung",
      "type": "string"
    },
    "promptEmergency": {
      "title": "Prompt Emergency",
      "type": "string"
    },
    "promptKosten": {
      "title": "Prompt Kosten",
      "type": "string"
    },
    "promptServiceClosed": {
      "title": "Prompt Service geschlossen weiterleitung",
      "type": "string"
    },
    "promptServiceOpened": {
      "title": "Prompt Service geöffnet weiterleitung",
      "type": "string"
    },
    "promptCards": {
      "title": "Prompt Service geöffnet weiterleitung",
      "type": "string"
    }
} 

Then terraform loads it using the file and jsondecode functions and when I am creating the table I have to use this dynamic block to add property to data table resource. And it turns out that somewhere between openning JSON file and creating the table a sotring of the JSON files happened. I did not find out where exactly, instead I slightly modified my JSON file:

{
    "1": {
      "id": "key",
      "title": "id",
      "type": "string"
    },
    "2": {
      "id": "promptGreeting",
      "title": "Prompt Begrüssung",
      "type": "string"
    },
    "3": {
      "id": "promptEmergency",
      "title": "Prompt Emergency",
      "type": "string"
    },
    "4": {
      "id": "promptKosten",
      "title": "Prompt Kosten",
      "type": "string"
    },
    "5": {
      "id": "promptServiceClosed",
      "title": "Prompt Service geschlossen weiterleitung",
      "type": "string"
    },
    "6": {
      "id": "promptServiceOpened",
      "title": "Prompt Service geöffnet weiterleitung",
      "type": "string"
    },
    "7": {
      "id": "promptCards",
      "title": "Prompt Cards",
      "type": "string"
    },
    "8": {
      "id": "promptRecording",
      "title": "Prompt Cards",
      "type": "string"
    }
    
}

And Data Table resource object persists the order. Thank you very much for your help!!

1 Like

No problem. Glad to hear it is resolved!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.