Esta conversación ha sido bloqueada debido a la inactividad. Cree una nueva publicación.
Nivel 1
Nivel 2
Iniciar sesión en la comunidad
Iniciar sesión para ver todas las insignias
Esta conversación ha sido bloqueada debido a la inactividad. Cree una nueva publicación.
Dear Community's Leaders,
I have created custom schema but auto primary key is not incremented correctly.
schema structure: I have used auto pk true
I tried community suggestion to solve this issue through workflow using SQL code activity, still I am getting error.
SQL:
Can you please help me this.
¡Resuelto! Ir a solución.
Vistas
Respuestas
Total de me gusta
Hello @Sathyam999
You have shared 2 screenshots form 2 different instances.
I assume the one attached in the main thread is from production env. You are using the custom sequence where it should work. Try, removing the Key and deindex attributes. The keys are also indexed and since you are using autopk, you don't have to define the primary key.
Vistas
Respuestas
Total de me gusta
Hi @Sathyam999
As using the SQL script you have already assigned the first key with 0 value, hence while using insert or update activity you are getting this duplicate error. Could you try insert a record manually either by SQL script or Javascript, and then try to insert using the activity.
Regards
Akshay
Vistas
Respuestas
Total de me gusta
Hi @AkshayAnand ,
Thank you for your response,
when I enter the values into the schema through SQL code, data inserted correctly into the data base but primary key is not incremented properly, when I enter data manually in the form.
It is incremented randomly not sequentially like 1,30,60,90..
when I enter the data into the schema, it should be updated 1,2,3 like this, can you please tell if there is any other solution.
I have used autopk="true" in the schema
Regards
Sathyam
Vistas
Respuestas
Total de me gusta
Hi @Sathyam999 ,
The solution for the Incrementing gap for autopk is given in the below thread , where David had explained why there would be a gap of 30 for each Increment. Please refer to the below thread, you can replace the function used to generate the Sequence. Although there can be a risk during the bulk Inserts/Updates if there is an Increment of 1, as all the sequences should be assigned to bulk data at once.
Regards,
Pravallika.
Vistas
Respuestas
Total de me gusta
Hello @Sathyam999
You have shared 2 screenshots form 2 different instances.
I assume the one attached in the main thread is from production env. You are using the custom sequence where it should work. Try, removing the Key and deindex attributes. The keys are also indexed and since you are using autopk, you don't have to define the primary key.
Vistas
Respuestas
Total de me gusta
Vistas
me gusta
Respuestas
Vistas
me gusta
Respuestas