Developer forum

Forum » Development » Using the GetNumber() from external scripts

Using the GetNumber() from external scripts


Reply

Hi


 


We often make custom import scripts in classic ASP in order to import data into the eCom. When creating new rows in the product-table, we're grabbing the newest product and adding 1 to it's internal product-id. We have to do it this way, because we're using the classic ASP outside DynamicWeb.


 


Is there any way to use the GetNumber() function on Productgroups and Products outside DynamicWeb's API?


 


Cheers


Bo Dudek


Mediegruppen Reklamebureau


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Bo


 


You cannot do that.


 


But you don't have to use the Numbers from Dynamicweb. Simply create your own number series and take a number from that. Just make sure its not found in product table already.

 
Reply
NP wrote:


Hi Bo




 




You cannot do that.




 




But you don't have to use the Numbers from Dynamicweb. Simply create your own number series and take a number from that. Just make sure its not found in product table already.



You're right, but if I later on try to add a product manually, the number suggested from GetNumber() may accidently collide with one of my import-generated numbers. Well, the simple solution could be to make a number serie like 'IMPORTPROD1', 'IMPORTPROD2' etc. or just simply '1', '2' etc. I guess the DW itself will always use the format 'PRODx', right?


 


Comments on my suggestions?


 


Cheers


Bo Dudek


Mediegruppen Reklamebureau

 
Nicolai Høeg Pedersen
Reply

Your suggestion should work fine...


 


Ever considered .NET?

 
Reply
NP wrote:


Your suggestion should work fine... 




Ever considered .NET?



Yeah, of course. Just - ironically - on very low priority at this very moment.


 


/ Bo Dudek

 

You must be logged in to post in the forum