Immediate Validation Issue

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

tarlachmoorhouse
Ebase User
Posts: 3
Joined: Fri Aug 22, 2008 10:38 am

Immediate Validation Issue

#1

Postby tarlachmoorhouse » Tue Sep 02, 2008 7:49 am

I'm using an external table to generate Dynamic Lists that need to be multi-Lingual, (I am aware I can provide this functionality via the multilingual functionality in Ebase but for external reasons I don't want to go down that route) the data comes from a table with columns for:-

Reference - the item displayed to the user
Return_value - the code to store in the database
lang - Language code for the entry
Type - The dynamic list they are on
Active - Are they active records

So I could have
Fields: REFERENCE/RETURN_VALUE/LANG/TYPE/ACTIVE
Record 1: Ois/Yes/CY/LIST1/Y
Record 2: Yes/Yes/EN/LIST1/Y
Record 3: Oui/Yes/FR/LIST1/Y
Record 4: Nac Ois/No/CY/LIST1/Y
Record 5: No/No/EN/LIST1/Y
Record 6: Non/No/FR/LIST1/Y
etc

The SQL for the dynamic list is

Select
REFERENCE,
RETURN_VALUE
From
EBASE_REF
Where
TYPE = 'Religion' And
LANG = &&LANG And
ACTIVE = 'Y' And
REFERENCE <> ''
Order By
REFERENCE

I have then attached the list to a field 'Office' and then map the field like this

Display:- Reference -> Office
Mandatory:- Lang -> Language ('Language' is set to contain the value $language (EN/CY/FR)
Optional:- Return_value -> Office

By doing this then the system acts as I want, so that only the entries from the table with the correct language field matching the $language value are selected by the the query, the user is presented with the values from 'reference' to choose from in their own language but the field contains the value from 'return_value' which is language independent.

This works fine until I switch on 'immediate validation' for the field, as when I do this and run the app, as soon as I change the drop down list from 'Please Select' to one of the entries in the list, the immediate validation runs and unless the value in 'return_value' is the same as the value in 'reference', the field goes back to 'Please Select'.

I want the immediate validation event to fire as I want to hide other fields / buttons until a value has been selected in the field 'Office'

Any thoughts appreciated
0 x

Who is online

Users browsing this forum: No registered users and 112 guests