I need a hint. I am playing around with the trial version once again (I seem to get too busy every time I try to start this project) I managed to create a dynamic choice based on a query. What I want to do is auto populate (for lack of a better word) another field based on what I choose from the dynamic choice.
Example:
I have a BO called Class with attributes of Name, Description, Type
I have created a dynamic choice for my appointment BO attribute "subject" which displays a dropdown list of all of the class objects I have created.
What I want to do is auto fill the "description" attribute based on the selection I made from the "subject" attribute.
I have tried with rules but I can't seem to find a rule that fits. I thought about creating a query that displays the description based on the subject attribute then have the result populate the "description" attribute but I can't seem to work it out.
I like to figure things out so I would prefer a hint then I can go back and see where I get but if you must lay it out there for me
Thanks,
Diana
Rule to auto-populate an attribute
Re: Rule to auto-populate an attribute
IF BO.subject = 'XXX" then BO.description = 'YYY'
Create as many of these as you have choices
(of course, you could have 1 rule with a bunch of IF ... THEN ... ELSE IF THEN .... ELSE ..... but, you are a noob. create 3 rules and make your life easy
Make sure you check off use in forms so that it will update on the form as you make changes
Bruce
Create as many of these as you have choices
(of course, you could have 1 rule with a bunch of IF ... THEN ... ELSE IF THEN .... ELSE ..... but, you are a noob. create 3 rules and make your life easy
Make sure you check off use in forms so that it will update on the form as you make changes
Bruce
Re: Rule to auto-populate an attribute
That will work but it is not the most practical of solutions becasue every time I add another class I have to change the rules unless I can add a rule for the rule.BLOMASKY wrote:IF BO.subject = 'XXX" then BO.description = 'YYY'
Create as many of these as you have choices
(of course, you could have 1 rule with a bunch of IF ... THEN ... ELSE IF THEN .... ELSE ..... but, you are a noob. create 3 rules and make your life easy
Make sure you check off use in forms so that it will update on the form as you make changes
Bruce
What I was hoping for is something like this.
Find the record in the BO xxx that contains the class title selected in the BO yyyy then fill in the description with the description contained in that record.
Does that make sense?
Re: Rule to auto-populate an attribute
Diana, I assume you have a relationship between BO and CLASS Object, perhaps as "Peer".
Then in your rule, you can always get Class's Description and assign it to BO.Description.
For example, if you only want this to happen when BO is NEW, you can say,
IF BO IS NEW AND BO.Class IS DEFINED Then BO.Description = Class.Description.
And then for this rule, in advance tab, set the Dynamic rule on to show on the form immediately.
In here, I get a drop down of course templates (like your classes)
Once I select it, then I get the "# of days" (like your Class description) and put it in my main BO.
Then in your rule, you can always get Class's Description and assign it to BO.Description.
For example, if you only want this to happen when BO is NEW, you can say,
IF BO IS NEW AND BO.Class IS DEFINED Then BO.Description = Class.Description.
And then for this rule, in advance tab, set the Dynamic rule on to show on the form immediately.
In here, I get a drop down of course templates (like your classes)
Once I select it, then I get the "# of days" (like your Class description) and put it in my main BO.
Re: Rule to auto-populate an attribute
Ben,BenHayat wrote:Diana, I assume you have a relationship between BO and CLASS Object, perhaps as "Peer".
IF BO IS NEW AND BO.Class IS DEFINED Then BO.Description = Class.Description.
And then for this rule, in advance tab, set the Dynamic rule on to show on the form immediately.
since yours is looking for "NEW", how do you trap for when it is EDITED later?
varmod(x) is true and varcurr(x) <> varprev(x)
jaymer...
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
-
- Posts: 2413
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Re: Rule to auto-populate an attribute
you use WAS CHANGED Jaymer
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Re: Rule to auto-populate an attribute
In a talk with Vlad, he said, w.r.t a list, is that WAS CHANGED refers to the SIZE of the list. If you add or delete a row in the list object, its fine. But if you edit a row, then the SIZE doesn't change and WAS CHANGED == false
Customer.om_Invoices WAS CHANGED is used for ADD/DELETE
ex.
customer BO
invoices BO, with transactions owned multiple by the parent
BruceL says this is the logic for doing this when a value in a list object is changed:
Invoices from Customer.om_Invoices was changed is used for EDITS in a row
Bruce says this is in the manual
Customer.om_Invoices WAS CHANGED is used for ADD/DELETE
ex.
customer BO
invoices BO, with transactions owned multiple by the parent
BruceL says this is the logic for doing this when a value in a list object is changed:
Invoices from Customer.om_Invoices was changed is used for EDITS in a row
Bruce says this is in the manual
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL