cancel
Showing results for 
Search instead for 
Did you mean: 

Form no. increment problem.

Former Member
0 Kudos

Hello,

I have created a form like Sales Order where on the Right Top Corner of the form there is a field of No. that is the primary key of the table @OOBR as Document.

I want to show the DocEntry value each time across which the data is given,

and the showing value must be incremented after each data insertion.

Rgds

Subrata

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

While loading your form you Query the database for Maximum Number of that field and increment it by 1(if it is alphanumeric then split that and get the numeric part of the field and then increment that by 1 then concatenate that with your prefix and then assign that value to field) and assign that value to field.While adding the data also insert present record with existing number in field.and then use the same logic that you do in form load.

Hope this helps

Regards

Vishnu

Former Member
0 Kudos

Hi

I did that also before ur mail.

But the problem is----

If I open a form in ADD mode , it is showing the incremented value.

But, after one insertion, if I want to add again, the value is not incremented.

Former Member
0 Kudos

Hi,

you add the same logic what you using under Item_pressed Event of your Buttton in beforeaction=false.

Former Member
0 Kudos

Hi

How will I use Item_pressed Event of my Buttton in beforeaction=false. ?

Because I used UDO. So, I can't use any action under the ADD button.

It's not giving me any chance to write code for the button.

In my form I added the following code during form creation

I got value from db and incremented then stored into query_result_from_db

oEdittext.value= query_result_from_db

Former Member
0 Kudos

Hi

i am sorry i don't know that your using UDO. i am not sure about UDO's

If you can catch Form_Activate Event You can add your logic under Form_Activate(to stop executing this code each and every time form activates use boolean variable).

Former Member
0 Kudos

hi vanu?

could u expain me clearly with this code,,,,,,????

Answers (1)

Answers (1)

alex_ucerogarcia
Explorer
0 Kudos

Hi,

Is it a UDO FORM? It's UDO Document?

Former Member
0 Kudos

Hello,

I created a UDO.

Then, I've created a form by coding and used the UDO name in the form.If it means it's a UDO form. Then it is.

Tables are created as Document & Document rows from Tools-> User Defined Field-> User Table

And I've binded the edittext box that will show the autoincremented DocEntry

with the database DocEntry Field.

Rgds

Subrata