Create a Combo Box with Application/Collection values

Author Message
Topic: Create a Combo Box with Application/Collection values
justexecute's picture
justexecute

How do I get a list of Applications/Collections in a combo box. For example, I am creating audits and would like the user to select the collection from an application, as well as the field within the collection, similar to the way you do lookups. Is it possible to have access?

Thanks,

Charlie

jmckibbin
Lookup combo boxes...

Hi Charlie,

A lookup combo box allows you to display values a field from a single other collection. There isn't a way by lookup to dynamically change the linked collection. Depending on your use case, one thing you can do is have all of your reference data in a single collection in a 'pick list' application with fields identifying where they belong. Then when you create each lookup combo box you can define filters so that only certain values will appear in the drop down. An example of this would be a city/state reference collection where depending on the state you choose only cities for that state will be displayed.

Is there a specific design reason why the selectable options are scattered between different applications and collections?

Jonathan

justexecute
Hi Jonathan, Here is what I

Hi Jonathan,

Here is what I would like to do:

1. I plan to have multiple applications (ar, ap, gl, hr, etc) that a customer can purchase individually or as a set. I also have a Global application that is used by all applications. I did exactly what you said as far as creating a lookup list and that works fine but thought rather than having to maintain my own collection with all applictaion, collection and field names, I could use what you already have in place internally.

Ultimately, Here is what I am trying to accomplish:

1. The customer will have the ability to identify which fields they would like to audit, so I have a Global Application that manages the definition of the customer defined audits, which allows them to say the following:

In the HR Application, on the Employee Collection, I would like to Audit the Employee Job Salary

2. On the Update Action of the Employee Collection, I first retrieve all records that audit any fields on the Employee collection and then can loop through each audited field. (I have this all working now).

The part I am having a problem with is as I loop, how do I get the value of the field I identified:

For example, if I have a copy of the original record ($OrigRec), the updated record ($Input) and the field I want to compare ($AuditField), how do I do the compare if the $AuditField = Job Salary:

if the value of $AuditField($OrigRec) != the value of the $AuditFIeld ($Input)

So, I guess the big question is: If I don't want to hard code the fields I want to audit and can pull the data from a collection, how do I get the value of that field?

Maybe I am making this harder than it needs to be as I am still in the learning mode. Thanks for your help as always,

Charlie

jmckibbin
Alternative idea for auditing fields...

Hi Charlie,

There isn't a way to dynamically select a field to be used in the comparison the way you are describing, typing in the field name and having your condition use that field in the expression.

One thing you can do though is copy a form from your accounts to your 'audit' application and have the user fill out data in the 'audit form'. Since each field in your audit application's tab will match your other application's tab you can just compare all fields but have a condition where if the field in the audit application isn't filled out, aka string-length($Field)=0, the action will just skip over auditing that field. The downside of course is that if you have a large quantity of fields in a form the action could get quite lengthy.

Jonathan

justexecute
That's an idea. Let me think

That's an idea. Let me think about that one. Thanks.