This topic is locked

Read Only Values

2/25/2007 7:20:30 PM
ASPRunnerPro General questions
M
Michael7 author

Hi, I would like to use the values produced from the below dropdown list but to set them as default read only values on both the add & edit page
In ASP Runner 4.1 - I have selected the following settings.
(Store_Phone) Field

Lookup Wizard - Lookup Table
Table = Store_Details

Link Field = Store_Phone_Number

Diplay Field = Store_Phone_Number

Order By =
Dropdown Dependant = Checked
Category Contol = Store

Category Field = Store_Location
I have to do a similar thing on a few different forms

Could you please help with this?

Sergey Kornilov admin 2/26/2007

I would recommend to modify SQL query on SQL query tab in ASPRunnerPro to include values from lookup tables.

In this case you can simply set Edit type of this field to Readonly.

M
Michael7 author 2/26/2007

Hi,
I am still learning SQL and am not that experienced with this type.

Could you please give me an example of how you would integrate this into the SQL and what to put in the default box of the Readonly value.

I have to do this with a few fields, Please assist me with the example below
Field is [Store_Phone] from Repairs
Default Readonly value I would like to use in [Store_Phone] is
[Store_Phone_Number] from _StoreDetails where Store from Repairs = Store_Location from _StoreDetails
how would this be added into the below SQL?
select [ID],

[StoreID],

[Date],

[Employee],

[Supplier],

[Store],

[Store_Phone],

[Customer],

[Mobile_No]

**
From [Repairs]

Where Store = '"&STORE_NAME&"'"
**Read Only Default on Visual Add Page= ???
Thanks

Michael

Sergey Kornilov admin 2/27/2007

Try the following:

select [ID],

[StoreID],

[Date],

[Employee],

[Supplier],

[Store],

[Store_Phone],

[Customer],

[Mobile_No],

B.Store_Phone

From [Repairs] A

inner join [Store_Details] B

where A.Store = B.Store_Location
M
Michael7 author 2/27/2007

Hi Sergey,
Thankyou for your assitance with this. I still had a couple of Errors so I added an a. in front of the Repairs Table Fields and there was a FROM clause Error when i used 'WHERE' so I changed it to 'ON'
SELECT ID,

A.StoreID,

A.Date,

A.Employee,

A.Supplier,

A.Store,

A.Customer,

A.Mobile_No,

B.Store_Phone

FROM Repairs A

INNER JOIN Store_Details B

ON A.Store = B.Store_Location
This worked and extracted the data as I needed it to.

With the change to 'ON' instead of 'WHERE' can you confirm that the above takes no action on the Store_Details table apart from pulling the b.Store_Phone_Number field.

At this stage i am only familiar with single field & single table extraction and do not really understand how the JOINS work.
It's a credit to the simplicity of ASP Runner that I can create these Data Tables.
Thanks again for your help