Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6620 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

i have problems with my database, but i don't know, what is it caused by. i have some fields in my database that are auto enter serial numbers and i have some scripts to change them. i thik they are somewhere wrong. for some time everything was working well, but then it started to do some things and i don't know why. when the ID field have to have for example value 45 it jump to value 3 and because this field have to be unique everything has crashed. do you know about some case, when this can be caused? i use a script step 'set next serial value[]' to increment value in some cases, when i need to make new records automatically without inserting values by user. thanks for ANY help

sju

Posted

It sounds like your scripts may be the problem. If you can post them, or a clone or your file, we might be able to spot something.

Posted

this is a piece of the script i use:

commit records/requests []

set variable [$id_paper; value:paper:id_paper]

if [count(import::id_paper)=0]

go to layout ["paper_import_add"(import)]

new record/request

set next serial value [import::id_import;import::id_import+1]

set field [import::id_paper;$id_paper]

set field [import::date;get(currentdate)]

set field [import::DL_from_day;get(currentdate)]

set field [import::DL_number;0]

set field [import::supplier;"init"]

set field [import::sheets_count;0]

set field [import::ICOD_P;getastext(import::id?paper)&" "&getastext(import::ICO_sup)]

commit records/requests []

go to layout["edit_paper"(paper)]

end if

id fields are serial values, that have to be unique...

other fields are not so much important. i really don't know, what can cause this problem.

sju

Posted

Why do you need to use the Set Next Serial Value[] script step? Just use the Auto-Enter Serail option in the field definition.

This topic is 6620 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.