Novunex Community

Forum Updating an entity with arrays using the SQL option

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #708
    Dani
    Participant

      Hi,

      I need a little bit more information to be able to answer this question.
      What do you want to do with the array?
      What do you expect the outcome to be?

      Kind Regards

      #709
      Avatar photoMark
      Participant

        Hi Dani,

        an entity can have an attribute that is an array.
        In an Update Activity when I create a SQL query that includes such an attribute I will get the following result:
        Approver = [21,35,43]
        In the Update Activity, I can map the result of the query (value) to the attribute in the entity (key).
        Running this Update Activity creates an error “Foreign key constraint …”.

        Now I can change my query to only have one of the Approvers e.g. Approver = 21
        When I run Update Activity now it adds the approver with Id 21 to the list of existing approvers rather than replacing the current array with the new value.

        What I want to accomplish is to replace the current array with the new list (array) or approvers.

        I hope this helps to better explain the issue.

      Viewing 2 posts - 1 through 2 (of 2 total)
      • You must be logged in to reply to this topic.