If you have questions or if you want to share your opinion about Aware IM post your message on this forum
#52166 by sabbirehal
Tue Nov 26, 2019 3:38 am
Hi Group,
Please ignore my ignorance as I am new to aware IM. I wanted to record auto increment line number number in the PO Detail BO and wanted to know the best way of doing it in Aware IM. Please see attached picture for more detail .

Thanks
Sabbi
Attachments
PO Detail Lines.jpg
PO Detail Lines.jpg (34.42 KiB) Viewed 3068 times
#52167 by Jaymer
Tue Nov 26, 2019 3:54 am
sorry sabbi
what you wrote doesn't make any sense.
i think you need to delete you question and re-type it.
#52168 by sabbirehal
Tue Nov 26, 2019 4:38 am
Sorry Jaymer but I have basically two BO's PO Header and PO Detail in One to many relationship.
The PO Header will have PO Number as Unique and PO Detail will be PO Number and Line Number as unique. I know awareim can manage one to many relationship automatically but don't know how it will store the Line Number in sequential order of its creation?

Thanks
#52170 by idpSteve
Tue Nov 26, 2019 5:28 am
You can add a number attribute to your object, and in the attribute properties menu under the 'Number-specific' options there is 'Auto-increment'.

I think this might work for your purpose?
#52171 by eagles9999
Tue Nov 26, 2019 6:29 am
In the BO Rules for PODetail

PODetail IS NEW
PODetail.LineNumber = COUNT PODetail WHERE PODetail IN POHeader.om_PODetail + 1
#52172 by idpSteve
Tue Nov 26, 2019 10:27 am
Hi Mark.

Would that not have a bigger overhead than just using the built in increment function?

EDIT:

This would also cause an issue if a record is deleted, you might end up with duplicate line numbers in that case as the COUNT wouldn't return the number of the last record. You could also do this with a counter in system settings or something, BUT, why not just use the built in function?
#52173 by Jaymer
Tue Nov 26, 2019 1:26 pm
eagles9999 wrote:In the BO Rules for PODetail

PODetail IS NEW
PODetail.LineNumber = COUNT PODetail WHERE PODetail IN POHeader.om_PODetail + 1


No count, use max PODetail.LineNumber + 1
#52174 by sabbirehal
Tue Nov 26, 2019 3:35 pm
The auto increment is simple but I think max PODetail.LineNumber + 1 what I need as I want to keep the number increment within single PO Number.

Thanks to all for your input.

Regards,
Sabbi
#52175 by Jaymer
Tue Nov 26, 2019 4:19 pm
sabbirehal wrote:as I want to keep the number increment within single PO Number


The auto inc facility HAS A WAY to do numbering within groups, like you desire. I’ve never used it. Performance-wise, I’m not sure which method is better.
#52204 by sabbirehal
Sat Nov 30, 2019 10:08 pm
Jaymer,

Ok, please see the attached picture of the actual BO lines. I need the LineNumber increment within the ob_Employee_RID. When I try to add the auto increment property, it does not show this field ob_Employee_RID. How can I use the Max LineNumber+1 Rules for every record within ob_Employee_RID?

Thanks
Sabbi
Attachments
Line Number Increment.jpg
Line Number Increment.jpg (135.69 KiB) Viewed 2931 times

Who is online

Users browsing this forum: Google [Bot] and 23 guests