| View previous topic :: View next topic |
| Author |
Message |
RobSharma Novice
Joined: 07 Jan 2009 Posts: 4
|
Posted: Sat Feb 09, 2013 2:30 am Post subject: What does the new LookupAttribute in Datamodel do? |
|
|
| Could you please clarify the purpose and usage of the LookupAttribute on the datamodel definition? I'm not sure if it is a list odf values ? |
|
| Back to top |
|
 |
gavind Veteran
Joined: 23 Jan 2013 Posts: 42
|
Posted: Sat Feb 09, 2013 1:40 pm Post subject: |
|
|
I got nothing on top of my head for this. But should this be included in the guide by any chance? _________________ Be at your best, all the time!  |
|
| Back to top |
|
 |
Admin Site Admin
Joined: 07 Nov 2005 Posts: 264
|
Posted: Wed Feb 20, 2013 12:50 pm Post subject: |
|
|
Imagine the situation when you have a CountryID field in your Customer table and corresponding CountryName in Country table.
You would like to add both these fields into your model, both with "Country" name but:
* the first one will be shown only in QueryPanel control and will allow users to select country from the list of available ones (via SQL List value editor) and
* the second one should be shown only in ColumnsPanel (to go into SELECT clause in result).
So you add both these fields into your model as attributes of the Customer entity and turn off "Use in result" for the first field and "Use in condition" for the second one.
So far so good. But there is one problem: EntitiesPanel control shows both these fields by default. To prevent this behavior you can link these two fields by "Lookup attribute" property. If they are linked - only one item will be shown in EntitiesPanel but it still will work properly when you try to add this "combined" attribute into columns or into conditions.
That is the main purpose of "Lookup attribute" option. |
|
| Back to top |
|
 |
ajo4949 Veteran
Joined: 31 Jan 2013 Posts: 19
|
Posted: Mon Feb 25, 2013 8:28 pm Post subject: |
|
|
Does the JavaScript library support the Lookup Attribute functionality?
I tried setting the value in the model editor.
When I use the "[Add new column]" or "[Add new condition]" links in the Columns and Conditions panels, everything looks fine. But I'm still getting both attributes listed (with the same name) in my Entities panel.
Am I missing a step? Any thoughts? Thanks! |
|
| Back to top |
|
 |
ajo4949 Veteran
Joined: 31 Jan 2013 Posts: 19
|
Posted: Thu Feb 28, 2013 4:09 pm Post subject: |
|
|
Just tried this in 3.2 JavaScript library, still not working for me.
Any info on whether this should be working and I'm missing a step or if it's not supported would be appreciated. |
|
| Back to top |
|
 |
|