Data Driven Values


Author
Message
Ger Cannoll
Ger Cannoll
Advanced StrataFrame User (654 reputation)Advanced StrataFrame User (654 reputation)Advanced StrataFrame User (654 reputation)Advanced StrataFrame User (654 reputation)Advanced StrataFrame User (654 reputation)Advanced StrataFrame User (654 reputation)Advanced StrataFrame User (654 reputation)Advanced StrataFrame User (654 reputation)Advanced StrataFrame User (654 reputation)
Group: StrataFrame Users
Posts: 430, Visits: 507
I want to set up a methodology where some of the data that initially gets into a BO can be taken from a table. The data in each BO could be different for the same APP that is deployed at different sites. Say I have the APP on a site in USA, then the default Currency to get onto the Customer Table for a New Cusotmer would be USD, wheresas if the APP was depolyed in Ireland for instance, the default Currency for the Customer would neeed to be set up as EURO. These are just defaults, but could then be changed before the Form is saved. This gives an idea of  whats required, but these Table driven defaults go right across most Business Objects in the Application, and there will normally be many defaults for each Business Object. This saves the customer lots of time from having to enter defaults, but also allows them the option to change the defaults if they so wish.

Ok, so that's the requirement , and am wondering whats the best way of handling this. My preference would be to have any code in the one place, to allow for deviations from the default (Instead of having something in every BUisness Object, and if theres some change, I may need to search out what needs to be done and go looking at every Buisness Object)

My Data Driven Table would look something like:

Table /BO         Field       Value
Customer                   Currency    USD
Customer                   Area           NY
RATES                        TAX           21


I would want to (just during the Adding of a New record) do a search for the relevant Table, and then populate each field with the data from the table

I would appreciate some guidance on:

1. Will above appoach work, or is there a different/better way of approaching it
2. What event would I call a 'PopulateFieldsFromDataDrivenTableOntoBO from  (Presumably just after 'Adding' a record to the BO)
3. I would like to have just 3 fields as above, but will I run into problems when I try to load a BO that is an Integer field with say data that is a String Field


e.g. Above , my DataDriven table has a value field which is Character and I will want to move say 'NY' into an Area Field (should be ok) but also want to move '21' into an Integer field...how would I handle this, other than setting up a whole pile of different filed type on the datadriven table

I expect  something like this is either already available or has been thought through already and would welcome suggstions before I go down this road myself
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search