on 06-08-2016 11:21 AM
Hi Friends,
I am using MDO Insert and Select Query in web page to display tree structure. I am having an ID column in the insert Query and I want to auto increment the ID column value on insertion of records in other correponding columns.
I am having 3 columns ID, NDE and PNDE in the MDO Object and the table looks something like below:
ID NDE PNDE
1 Root ------
2 Energy Root
3 Electrical Energy
4 Fuel Energy
5 LPG Fuel
6 FO Fuel
7 HSD Fuel
Tree Structure:
Energy
Electrical
Fuel
LPG
FO
HSD
I want that when a new record in NDE and PNDE columns are inserted then the corresponding ID value also must get auto incremented dynamically.
Can anyone help me on this?
Regards,
Shitikantha Nanda
Hi Nanda,
I am not sure whether MDO auto increment functionality available or not.
But a work around would be creating a MDO query with Select Mode.
First, ensure that Row Count property in General tab is limited to 1.
select query should be:
and the result would be:
I suggest that you create a transaction. In one leg, you can have the select MDO query where it will fetch the maximum ID value and assign it to a local variable.
Increment the local variable with +1 and then insert it to new record.
Regards,
Sai Vellanki.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Friends,
Any resolution to the above mentioned issue?
Kindly revert back ASAP.
Thanks in advance.
Regards,
Shitikantha Nanda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
6 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.