Add sound ID (pk) to CSV - RESOLVED


#1

Hi.

Is it possible to add the primary key (image) to the CSV?

The updates mess up my Fantasy Grounds modules, with this I can fix the id, preventing problems when new updates are released.

image

Thank you.


#2

This is definitely a question for @sonofconan, who will back at the keyboard on Tuesday. In the meantime, have a nice weekend! :slight_smile:


#3

This would also help data integrity when links, names or package names changed.


#4

@brunocalado @macdork this is now done on production :smile:


#5

Thanks for adding this. I’m glad I checked my CSV import functionality before releasing my update earlier today. I had to adjust slightly for the new field :grin:


#6

My only request is next time something like this is added to the CVS … PLEASE add it to the tail end not the front. Putting it on the end allows existing code to continue to function in most cases.


#7

I think the way the did is the best. The ID is always the first.

It’s very easy to fix.


#8

When you change the order of everything, it’s not “best”. Putting it at the end would not have changed the order of all the other values.

Having the id is a good thing, breaking existing code in tools until they are updated isn’t… specially when it wasn’t necessary.


#9

It was necessary.

The id allow an update feature.

If you have a tool built on something you have to keep updated.

Even if brokes my modules I prefer their CSV is done right.

You can easily create a script to change column postion or else.


#10

You must have not understood my post.

I said the unique ID is a good thing.

Adding it to the front of the CSV field list was NOT.

Adding it to the end would have not broken anything.

aValue = split (“ABC”, “123”, “XYZ”)
aValue[1] = ABC
aValue[2] = 123
aValue[3] = XYZ

This is what happened after the change.

aValue = split (“ID”, “ABC”, “123”, “XYZ”)
avalue[1] = ID
aValue[2] = ABC
aValue[3] = 123

When instead this would have been better.

aValue = split ( “ABC”, “123”, “XYZ”,“ID”)
aValue[1] = ABC
aValue[2] = 123
aValue[3] = XYZ

This would not have broken clients and allowed devs to update their tools to take advantage of the new feature.