Creating new Object
Creating new Object
When you create a new object by default you get the option to 'Create'. If you are using a counter (e.g. call number) it is allocated after creation. This means you can't use the reference as the screen resets to a blank screen. Is it possible to 'Save' the entry so it is still displayed including the newly assigned counter.
-
- Posts: 595
- Joined: Sun Apr 24, 2005 2:22 am
- Contact:
Yes. You can override the default behaviour by configuring a process with 2 rules, for example:
ENTER NEW Customer
VIEW Customer
and use this process (for example, from a menu item) instead of the default Create Object operation. Rather than showing a blank form for creating another instance, the system will re-display the newly created instance showing attribute values assigned during the creation of the instance.
ENTER NEW Customer
VIEW Customer
and use this process (for example, from a menu item) instead of the default Create Object operation. Rather than showing a blank form for creating another instance, the system will re-display the newly created instance showing attribute values assigned during the creation of the instance.
Aware IM Support Team
You can also see your call number on the new blank form if you add the following rule to your object
If YourObject IS NEW AND YourObject.AccessionNo IS UNDEFINED
Then YourObject.AccessionNo=MAX YourObject.AccessionNo+1
If you change this rule to
If YourObject IS NEW AND YourObject.AccessionNo IS UNDEFINED
Then YourObject.AccessionNo=MAX2 (MAX YourObject.AccessionNo+1, 1000)
Then you start numbering your calls from 1001, or you can make it whatever you like. I found this approach useful for generating purchase order numbers when I configured a purchasing system.
If YourObject IS NEW AND YourObject.AccessionNo IS UNDEFINED
Then YourObject.AccessionNo=MAX YourObject.AccessionNo+1
If you change this rule to
If YourObject IS NEW AND YourObject.AccessionNo IS UNDEFINED
Then YourObject.AccessionNo=MAX2 (MAX YourObject.AccessionNo+1, 1000)
Then you start numbering your calls from 1001, or you can make it whatever you like. I found this approach useful for generating purchase order numbers when I configured a purchasing system.
Thanks Support , thanks Greg.
Greg in your example, does this display the next value without using it until the object is fully entered and saved, and if so does it not give rise to the possibility that in the case of User 1 and User 2, if User 1 is still entering data and User 2 creates an instance of the object, User 2 will get the same value ?
(albeit the actual value asigned in each case may correct themselves when data is entered and finalised but then it would change for one of them?)
Greg in your example, does this display the next value without using it until the object is fully entered and saved, and if so does it not give rise to the possibility that in the case of User 1 and User 2, if User 1 is still entering data and User 2 creates an instance of the object, User 2 will get the same value ?
(albeit the actual value asigned in each case may correct themselves when data is entered and finalised but then it would change for one of them?)
-
- Posts: 595
- Joined: Sun Apr 24, 2005 2:22 am
- Contact:
The IS NEW condition is evaluated to TRUE only when the instance is actually created and saved in the database. This safeguards against the scenario when 2 users entering data at the same time would get the same value.
By the same token, when the object form is initialised for creating a new instance, the IS NEW condition is evaluated to FALSE. Therefore, the rule's action will not be executed and no value will be assigned. This means that the user will not see the value until the instance is created.
By the same token, when the object form is initialised for creating a new instance, the IS NEW condition is evaluated to FALSE. Therefore, the rule's action will not be executed and no value will be assigned. This means that the user will not see the value until the instance is created.
Aware IM Support Team