PDA

View Full Version : Deprived of Data Dictionary Simplicities with WebApp



John Hulsman
30-Jan-2006, 01:22 PM
Okay, there has got to be some way of doing this, but I want to make a
<select> group and fill it with <option> tags with the value being the data
value, and the value shown in the dropdown as the validation table value.
For the life of me I can't figure this one out. This is what I want
output...

<select name="sDept">
<option value="A">Differential</option>
<option value="T">Transmission</option>
</select>

// HERE IS THE CONTENT OF THE DD'S VALIDATION TABLE
Object Nascr100_Department_VT is a DescriptionValidationTable
Procedure Fill_List
Forward Send Fill_List
Send Add_Table_Value "A" "Differential"
Send Add_Table_Value "T" "Transmission"
End_Procedure // Fill_List
//DDB-ValidationCustomStart
//DDB-ValidationCustomEnd
End_Object // Nascr100_Department_VT

Here is my code for trying to get out these values. I had begun thinking
that it must be some kind of array or something I have to get the values out
of, so I tried to get the item count... my stop_box returns a 0. I'm
stumped. If somebody could tell me how I need to get the Validation Table
values out of the DD that would be great. My VDF counterparts up in my
department have this beautiful drag and drop simplicity... I'M JEALOUS!!!

procedure jhDepartmentSelList
integer iCnt
string sValue sName
send writehtml '<table><tr><td><b>Department: </b></td><td>'
send writehtml '<select name="sDept">'
get item_count of (Nascr100_Department_VT(nascr100_dd(self))) to iCnt
send stop_box iCnt
// IF I CAN FIGURE OUT HOW TO GET OUT THE VALIDATION TABLE VALUES
// HERE IS WHERE I WOULD CREATE MY LOOP TO GET THEM OUT
send writehtml (('<option value="') + (trim(sValue)) + ('">') +
(trim(sName)) + ('</option>'))
send writehtml '</select>'
send writehtml '</td></tr></table>'
end_procedure

Thanks,
John

Steven Wong
30-Jan-2006, 09:42 PM
Hi John,

Try this.

Steve.

"John Hulsman" <jhulsman@jasperengines.com> wrote in message
news:4SOEzocJGHA.5164@dacmail.dataaccess.com...
> Okay, there has got to be some way of doing this, but I want to make a
> <select> group and fill it with <option> tags with the value being the
> data
> value, and the value shown in the dropdown as the validation table value.
> For the life of me I can't figure this one out. This is what I want
> output...

Ian Telfer
30-Jan-2006, 11:17 PM
John,

You wan tot look at the DDCOMBO help, then go and blow the VDF
counterparts away..

<% MyWebObject.ddValue("Myfile.field", DDCOMBO) %> This will write the
code for you at runtime.

HTH

Ian

John Hulsman wrote:
> Okay, there has got to be some way of doing this, but I want to make a
> <select> group and fill it with <option> tags with the value being the data
> value, and the value shown in the dropdown as the validation table value.
> For the life of me I can't figure this one out. This is what I want
> output...
>
> <select name="sDept">
> <option value="A">Differential</option>
> <option value="T">Transmission</option>
> </select>
>
> // HERE IS THE CONTENT OF THE DD'S VALIDATION TABLE
> Object Nascr100_Department_VT is a DescriptionValidationTable
> Procedure Fill_List
> Forward Send Fill_List
> Send Add_Table_Value "A" "Differential"
> Send Add_Table_Value "T" "Transmission"
> End_Procedure // Fill_List
> //DDB-ValidationCustomStart
> //DDB-ValidationCustomEnd
> End_Object // Nascr100_Department_VT
>
> Here is my code for trying to get out these values. I had begun thinking
> that it must be some kind of array or something I have to get the values out
> of, so I tried to get the item count... my stop_box returns a 0. I'm
> stumped. If somebody could tell me how I need to get the Validation Table
> values out of the DD that would be great. My VDF counterparts up in my
> department have this beautiful drag and drop simplicity... I'M JEALOUS!!!
>
> procedure jhDepartmentSelList
> integer iCnt
> string sValue sName
> send writehtml '<table><tr><td><b>Department: </b></td><td>'
> send writehtml '<select name="sDept">'
> get item_count of (Nascr100_Department_VT(nascr100_dd(self))) to iCnt
> send stop_box iCnt
> // IF I CAN FIGURE OUT HOW TO GET OUT THE VALIDATION TABLE VALUES
> // HERE IS WHERE I WOULD CREATE MY LOOP TO GET THEM OUT
> send writehtml (('<option value="') + (trim(sValue)) + ('">') +
> (trim(sName)) + ('</option>'))
> send writehtml '</select>'
> send writehtml '</td></tr></table>'
> end_procedure
>
> Thanks,
> John
>
>

Evertjan Dondergoor
31-Jan-2006, 04:18 AM
And you can use the same function in the wo:

Get ddValue 'Customer.Status' DDCOMBO To sCombo

Evertjan



"Ian Telfer" <ian@cdrsystems.com.au> wrote in message news:bm%232%230hJGHA.3096@dacmail.dataaccess.com.. .
> John,
>
> You wan tot look at the DDCOMBO help, then go and blow the VDF counterparts away..
>
> <% MyWebObject.ddValue("Myfile.field", DDCOMBO) %> This will write the code for you at runtime.
>
> HTH
>
> Ian
>
> John Hulsman wrote:
>> Okay, there has got to be some way of doing this, but I want to make a <select> group and fill it with <option> tags with the
>> value being the data value, and the value shown in the dropdown as the validation table value. For the life of me I can't figure
>> this one out. This is what I want output...
>>
>> <select name="sDept">
>> <option value="A">Differential</option>
>> <option value="T">Transmission</option>
>> </select>
>>
>> // HERE IS THE CONTENT OF THE DD'S VALIDATION TABLE
>> Object Nascr100_Department_VT is a DescriptionValidationTable
>> Procedure Fill_List
>> Forward Send Fill_List
>> Send Add_Table_Value "A" "Differential"
>> Send Add_Table_Value "T" "Transmission"
>> End_Procedure // Fill_List
>> //DDB-ValidationCustomStart
>> //DDB-ValidationCustomEnd
>> End_Object // Nascr100_Department_VT
>>
>> Here is my code for trying to get out these values. I had begun thinking that it must be some kind of array or something I have
>> to get the values out of, so I tried to get the item count... my stop_box returns a 0. I'm stumped. If somebody could tell me
>> how I need to get the Validation Table values out of the DD that would be great. My VDF counterparts up in my department have
>> this beautiful drag and drop simplicity... I'M JEALOUS!!!
>>
>> procedure jhDepartmentSelList
>> integer iCnt
>> string sValue sName
>> send writehtml '<table><tr><td><b>Department: </b></td><td>'
>> send writehtml '<select name="sDept">'
>> get item_count of (Nascr100_Department_VT(nascr100_dd(self))) to iCnt
>> send stop_box iCnt
>> // IF I CAN FIGURE OUT HOW TO GET OUT THE VALIDATION TABLE VALUES
>> // HERE IS WHERE I WOULD CREATE MY LOOP TO GET THEM OUT
>> send writehtml (('<option value="') + (trim(sValue)) + ('">') + (trim(sName)) + ('</option>'))
>> send writehtml '</select>'
>> send writehtml '</td></tr></table>'
>> end_procedure
>>
>> Thanks,
>> John

Ian Telfer
31-Jan-2006, 05:52 AM
Cool, I didn't realise that!

Evertjan Dondergoor wrote:
> And you can use the same function in the wo:
>
> Get ddValue 'Customer.Status' DDCOMBO To sCombo
>
> Evertjan
>
>
>
> "Ian Telfer" <ian@cdrsystems.com.au> wrote in message news:bm%232%230hJGHA.3096@dacmail.dataaccess.com.. .
>
>>John,
>>
>>You wan tot look at the DDCOMBO help, then go and blow the VDF counterparts away..
>>
>><% MyWebObject.ddValue("Myfile.field", DDCOMBO) %> This will write the code for you at runtime.
>>
>>HTH
>>
>>Ian
>>
>>John Hulsman wrote:
>>
>>>Okay, there has got to be some way of doing this, but I want to make a <select> group and fill it with <option> tags with the
>>>value being the data value, and the value shown in the dropdown as the validation table value. For the life of me I can't figure
>>>this one out. This is what I want output...
>>>
>>><select name="sDept">
>>><option value="A">Differential</option>
>>><option value="T">Transmission</option>
>>></select>
>>>
>>>// HERE IS THE CONTENT OF THE DD'S VALIDATION TABLE
>>>Object Nascr100_Department_VT is a DescriptionValidationTable
>>> Procedure Fill_List
>>> Forward Send Fill_List
>>> Send Add_Table_Value "A" "Differential"
>>> Send Add_Table_Value "T" "Transmission"
>>> End_Procedure // Fill_List
>>> //DDB-ValidationCustomStart
>>> //DDB-ValidationCustomEnd
>>>End_Object // Nascr100_Department_VT
>>>
>>>Here is my code for trying to get out these values. I had begun thinking that it must be some kind of array or something I have
>>>to get the values out of, so I tried to get the item count... my stop_box returns a 0. I'm stumped. If somebody could tell me
>>>how I need to get the Validation Table values out of the DD that would be great. My VDF counterparts up in my department have
>>>this beautiful drag and drop simplicity... I'M JEALOUS!!!
>>>
>>>procedure jhDepartmentSelList
>>> integer iCnt
>>> string sValue sName
>>> send writehtml '<table><tr><td><b>Department: </b></td><td>'
>>> send writehtml '<select name="sDept">'
>>> get item_count of (Nascr100_Department_VT(nascr100_dd(self))) to iCnt
>>> send stop_box iCnt
>>> // IF I CAN FIGURE OUT HOW TO GET OUT THE VALIDATION TABLE VALUES
>>> // HERE IS WHERE I WOULD CREATE MY LOOP TO GET THEM OUT
>>> send writehtml (('<option value="') + (trim(sValue)) + ('">') + (trim(sName)) + ('</option>'))
>>> send writehtml '</select>'
>>> send writehtml '</td></tr></table>'
>>>end_procedure
>>>
>>>Thanks,
>>>John
>
>
>

John Hulsman
7-Feb-2006, 03:49 PM
Evertjan

Thanks for the reply. This worked very good for me. I had tried Ian's
suggestion first, however for some reason it did not work for me (the help
even hints at doing things this way). I'm just going to move on.

John

"Evertjan Dondergoor" <evertjan.dondergoor@dataaccess.nl> wrote in message
news:x550RdkJGHA.3096@dacmail.dataaccess.com...
> And you can use the same function in the wo:
>
> Get ddValue 'Customer.Status' DDCOMBO To sCombo
>
> Evertjan
>
>
>
> "Ian Telfer" <ian@cdrsystems.com.au> wrote in message
> news:bm%232%230hJGHA.3096@dacmail.dataaccess.com.. .
>> John,
>>
>> You wan tot look at the DDCOMBO help, then go and blow the VDF
>> counterparts away..
>>
>> <% MyWebObject.ddValue("Myfile.field", DDCOMBO) %> This will write the
>> code for you at runtime.
>>
>> HTH
>>
>> Ian
>>
>> John Hulsman wrote:
>>> Okay, there has got to be some way of doing this, but I want to make a
>>> <select> group and fill it with <option> tags with the value being the
>>> data value, and the value shown in the dropdown as the validation table
>>> value. For the life of me I can't figure this one out. This is what I
>>> want output...
>>>
>>> <select name="sDept">
>>> <option value="A">Differential</option>
>>> <option value="T">Transmission</option>
>>> </select>
>>>
>>> // HERE IS THE CONTENT OF THE DD'S VALIDATION TABLE
>>> Object Nascr100_Department_VT is a DescriptionValidationTable
>>> Procedure Fill_List
>>> Forward Send Fill_List
>>> Send Add_Table_Value "A" "Differential"
>>> Send Add_Table_Value "T" "Transmission"
>>> End_Procedure // Fill_List
>>> //DDB-ValidationCustomStart
>>> //DDB-ValidationCustomEnd
>>> End_Object // Nascr100_Department_VT
>>>
>>> Here is my code for trying to get out these values. I had begun
>>> thinking that it must be some kind of array or something I have to get
>>> the values out of, so I tried to get the item count... my stop_box
>>> returns a 0. I'm stumped. If somebody could tell me how I need to get
>>> the Validation Table values out of the DD that would be great. My VDF
>>> counterparts up in my department have this beautiful drag and drop
>>> simplicity... I'M JEALOUS!!!
>>>
>>> procedure jhDepartmentSelList
>>> integer iCnt
>>> string sValue sName
>>> send writehtml '<table><tr><td><b>Department: </b></td><td>'
>>> send writehtml '<select name="sDept">'
>>> get item_count of (Nascr100_Department_VT(nascr100_dd(self))) to
>>> iCnt
>>> send stop_box iCnt
>>> // IF I CAN FIGURE OUT HOW TO GET OUT THE VALIDATION TABLE VALUES
>>> // HERE IS WHERE I WOULD CREATE MY LOOP TO GET THEM OUT
>>> send writehtml (('<option value="') + (trim(sValue)) + ('">') +
>>> (trim(sName)) + ('</option>'))
>>> send writehtml '</select>'
>>> send writehtml '</td></tr></table>'
>>> end_procedure
>>>
>>> Thanks,
>>> John
>
>

Evertjan Dondergoor
8-Feb-2006, 04:22 AM
John,

Ian's solution should work though, although he did forget the = sign.
so not
<% MyWebObject.ddValue("Myfile.field", DDCOMBO) %>
but
<% =MyWebObject.ddValue("Myfile.field", DDCOMBO) %>

Evertjan

"John Hulsman" <jhulsman@jasperengines.com> wrote in message news:2rW7GgCLGHA.1280@dacmail.dataaccess.com...
> Evertjan
>
> Thanks for the reply. This worked very good for me. I had tried Ian's suggestion first, however for some reason it did not work
> for me (the help even hints at doing things this way). I'm just going to move on.
>
> John
>
> "Evertjan Dondergoor" <evertjan.dondergoor@dataaccess.nl> wrote in message news:x550RdkJGHA.3096@dacmail.dataaccess.com...
>> And you can use the same function in the wo:
>>
>> Get ddValue 'Customer.Status' DDCOMBO To sCombo
>>
>> Evertjan
>>
>>
>>
>> "Ian Telfer" <ian@cdrsystems.com.au> wrote in message news:bm%232%230hJGHA.3096@dacmail.dataaccess.com.. .
>>> John,
>>>
>>> You wan tot look at the DDCOMBO help, then go and blow the VDF counterparts away..
>>>
>>> <% MyWebObject.ddValue("Myfile.field", DDCOMBO) %> This will write the code for you at runtime.
>>>
>>> HTH
>>>
>>> Ian
>>>
>>> John Hulsman wrote:
>>>> Okay, there has got to be some way of doing this, but I want to make a <select> group and fill it with <option> tags with the
>>>> value being the data value, and the value shown in the dropdown as the validation table value. For the life of me I can't
>>>> figure this one out. This is what I want output...
>>>>
>>>> <select name="sDept">
>>>> <option value="A">Differential</option>
>>>> <option value="T">Transmission</option>
>>>> </select>
>>>>
>>>> // HERE IS THE CONTENT OF THE DD'S VALIDATION TABLE
>>>> Object Nascr100_Department_VT is a DescriptionValidationTable
>>>> Procedure Fill_List
>>>> Forward Send Fill_List
>>>> Send Add_Table_Value "A" "Differential"
>>>> Send Add_Table_Value "T" "Transmission"
>>>> End_Procedure // Fill_List
>>>> //DDB-ValidationCustomStart
>>>> //DDB-ValidationCustomEnd
>>>> End_Object // Nascr100_Department_VT
>>>>
>>>> Here is my code for trying to get out these values. I had begun thinking that it must be some kind of array or something I
>>>> have to get the values out of, so I tried to get the item count... my stop_box returns a 0. I'm stumped. If somebody could
>>>> tell me how I need to get the Validation Table values out of the DD that would be great. My VDF counterparts up in my
>>>> department have this beautiful drag and drop simplicity... I'M JEALOUS!!!
>>>>
>>>> procedure jhDepartmentSelList
>>>> integer iCnt
>>>> string sValue sName
>>>> send writehtml '<table><tr><td><b>Department: </b></td><td>'
>>>> send writehtml '<select name="sDept">'
>>>> get item_count of (Nascr100_Department_VT(nascr100_dd(self))) to iCnt
>>>> send stop_box iCnt
>>>> // IF I CAN FIGURE OUT HOW TO GET OUT THE VALIDATION TABLE VALUES
>>>> // HERE IS WHERE I WOULD CREATE MY LOOP TO GET THEM OUT
>>>> send writehtml (('<option value="') + (trim(sValue)) + ('">') + (trim(sName)) + ('</option>'))
>>>> send writehtml '</select>'
>>>> send writehtml '</td></tr></table>'
>>>> end_procedure
>>>>
>>>> Thanks,
>>>> John
>>
>>
>
>

Ian Telfer
8-Feb-2006, 04:56 AM
Woops, sorry about the misleading code...