Updating the order of the metadata in the Connect DB?

Hi,

Does anyone know how I can reorder the metadata in the Connect DB? (within Workflow)

So I generated meta file and saved it temporarily, then come back to update the meta file ordering. This is working all good and reflecting in my pdf output but when I retrieve the data in the connect DB using REST api. The order seems unchanged?

Even applying an “Update data records” plugin before calling the REST api has no effect.

Im using this EP

$baseURL.‘/entity/datarecords/values’; to get the record.

Any help is appreciated!
Thank you
E

Hello @edanting,

Can please explain what you mean by this? How are you generating and ordering this meta… metadata? file, for example?

Hi Marten,

Yes, basically when my Datamapper runs I output the metadata out and save the metadata somewhere else for later use. At the same time I also write to a file all records in CSV format to resort the order using our Postal office program for mail.

I later then reload the metadata file and update the values in it. Particularly “SortOrder” field 1-N sequence. Then apply Metadata sorter. This works because the meta file is the one getting reordered.

Then I apply “Update data records” plugin to also apply the updates in Connect DB.

Now what I want to happen is get that same records using REST Api, the records I get using " /entity/datarecords/values" end point has all the updated field values all good. But the ordering are same from initial generation.

I could perhaps just use same metafile I updated. But was wondering I guess if I could return the records using the API with the new order I applied to the meta file.

Perhaps I could do something like this

/entity/datarecords/values?sortByField=SortOrder&by=asc

When calling the EP?

Thank you
Hope that make sense.
cheers

That is unfortunately not possible as these kind of parameters are not available for this REST API call. (See Get Multiple Data Record Values for the parameters available.)