Lost focus, dynamically re-calculated rules

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
ckirnbauer
Posts: 68
Joined: Wed Oct 04, 2006 2:46 pm

Lost focus, dynamically re-calculated rules

Post by ckirnbauer »

Hello,

when I use dynamically re-calculated rules on forms, I have the problem, that the focus moves to the top of the form and if I have a couple of fields, I have to scroll downwards, everytime a refresh occurs.

Is there the possibility, that AwareIM saves the last focus, so that I am at the correct position even after refreshing?

How can I implement a SQL query: SELECT DISTINCT Name FROM Object, so that only unique Names are displayed?

Kind regards,
Christian
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

Is there the possibility, that AwareIM saves the last focus, so that I am at the correct position even after refreshing?

This is the current limitation and a difficult problem to fix. We hope to fix it soon.

How can I implement a SQL query: SELECT DISTINCT Name FROM Object, so that only unique Names are displayed?

You can use query in SQL form and specify SQL directly - you need to know how objects and attributes map to SQL. You can easily find it out by specifying some query in a standard format and then click on the SQL tab to see how the same query is represented in SQL format. This will give you the idea of the mapping between object/attributes and tables/columns. You can then use these conventions to specify your query with DISTINCT keyword.
Aware IM Support Team
ckirnbauer
Posts: 68
Joined: Wed Oct 04, 2006 2:46 pm

Post by ckirnbauer »

Hello, I tried following DISTINCT SQL statement:

SELECT DISTINCT ContractTemplate.TemplateLanguage FROM TBS_CONTRACTTEMPLATE AS ContractTemplate

Integritiy check threw following error:
Query in attribute ContractLanguage uses business object CONTRACTTEMPLATE which has not been found

Standard query below works:

SELECT ContractTemplate.* FROM TBS_CONTRACTTEMPLATE AS ContractTemplate

Is this a bug?

Kind regards,
Christian
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

Just tried a similar SQL query and there are no integrity errors. You are doing something wrong or the integrity error is about something else and has nothing to do with the query.
Aware IM Support Team
ckirnbauer
Posts: 68
Joined: Wed Oct 04, 2006 2:46 pm

Post by ckirnbauer »

build 925

I didn't mention, that I tried the query in a DROP-DOWN filter query. There a sql distinct statement defintely doesn't work.

I tried the same query as a "normal" query - there I don't get a integrity error. But the result of the query is not correct: If I have the elements


Spanish,
English,
English,
Spanish,
Dutch

in a BO, the query doesn't return

Spanish
English
Dutsch

but following result:

Spanish,
English,
English,
Spanish,
Dutch


and I want to display a dropdown box, that only returns unique language attributes, e.g.
Spanish
English
Dutsch

How do I handle this issue in AwareIM?

Regards
Chr
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

The query does not work because you select all attributes:
SELECT ContractTemplate.*

You need to select a particular attribute:
SELECT ContractTemplate.Language

The above, though, will not work in the current build due to a bug in Aware IM that we are fixing now. The fix will be available later today and will have build 929.

A few more GOTCHAS:
1) In testing mode table name conventions are different, so the query as specified above will only work in a standard (non-testing) mode.
2) When specifying a filter query use the "Existing query" option rather than "Custom query".

So download the latest build later today, select a particular attribute and avoid the GOTCHAS - it will work, we've tested it.
Aware IM Support Team
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

Build 929 with a fix is available on the web site.

It also has a new looking Ordering sample application.
Aware IM Support Team
ckirnbauer
Posts: 68
Joined: Wed Oct 04, 2006 2:46 pm

Post by ckirnbauer »

aware_support wrote:The query does not work because you select all A few more GOTCHAS:
1) In testing mode table name conventions are different, so the query as specified above will only work in a standard (non-testing) mode.
.
So in testing mode, such queries are not possible, because the name conventions are not the same like in production mode. In other words, I can only use such queries without testing in real production mode??? And for testing mode I must use the testing mode conventions?
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

For queries in testing mode add BASTestDomain prefix to the name of the tables, for example BASTestDomainTBS_ContractTemplate. Remove this prefix before putting the application in production.

This is a bit of a pain, but generally it is very rare that you should have queries in SQL format in your application, so there shouldn't be too many to manage.
Aware IM Support Team
ckirnbauer
Posts: 68
Joined: Wed Oct 04, 2006 2:46 pm

Post by ckirnbauer »

I downloaded build 929, entered following SQL query:

SELECT DISTINCT ContractTemplate.TemplateName FROM BASTestDomainTTS_CONTRACTTEMPLATE AS ContractTemplate

At the moment, when I click onto save and furthermore onto 'close' and reopen the query, the sql query is lost, under rule form stands 'FIND ALL ContractTemplate', and under sql form stands 'SELECT ContractTemplate.* FROM TTS_CONTRACTTEMPLATE AS ContractTemplate'

What did I do wrong, why is my special sql query not stored permanently?

Christian
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

As I specified in my previous post use "Existing query" instead of "Custom query".
Aware IM Support Team
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

The focus problem reported in the original e-mail is now fixed in version 2.2
Aware IM Support Team
ckirnbauer
Posts: 68
Joined: Wed Oct 04, 2006 2:46 pm

Post by ckirnbauer »

Hello,

the focus problem is not fixed for 100%.
I have a form, where there are calculated fields and a sum - there the fix works fine.

But one of the last fields in the form is a drop down, that affects a read only field dynamically. And there there is still the focus lost and I have to scroll downwards again.

Could you fix this?

Kind regards
Christian
ckirnbauer
Posts: 68
Joined: Wed Oct 04, 2006 2:46 pm

Post by ckirnbauer »

hello,

just wanted to know if you have taken a look at this problem.

Kind regards
Christian
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

We cannot fix it easily but we'll try. We will post a message when (if) we fix it.
Aware IM Support Team
Post Reply