Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Display field from a recordset if seperate field is not empty

LEGEND ,
May 18, 2006 May 18, 2006
Is there a way to only display a certain field from a recordset if another
seperate field is not empty? Else nothing.

Heres an example:
I have a database from which want to display a clients url's

If they don't have a reciprocal link then without our ok their website link
won't appear - if at a later date they do put a reciprocal link then all
we'd have to do would be to check the reciprocal link box and their weblink
will show.

Hope I'm making sense!
Thanks
Gary


TOPICS
Server side applications
517
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 18, 2006 May 18, 2006
what language are you using?

basically

varRecip = RecordsetCheckbox;
varSite = RecordsetSite

if (varRecip) {
print/echo ("'<a href='" && varSite && "'>" && varCompanyName && "</a>");
}


"woodywyatt" <woodywyatt@fuerteventura.com> wrote in message
news:e4i452$rng$1@forums.macromedia.com...
> Is there a way to only display a certain field from a recordset if another
> seperate field is not empty? Else nothing.
>
> Heres an example:
> I have a database from which want to display a clients url's
>
> If they don't have a reciprocal link then without our ok their website
> link won't appear - if at a later date they do put a reciprocal link then
> all we'd have to do would be to check the reciprocal link box and their
> weblink will show.
>
> Hope I'm making sense!
> Thanks
> Gary
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 18, 2006 May 18, 2006
Hi, thanks for the swift reply
I'm using VBSCRIPT
The code for the weblink is <%=(Recordset1.Fields.Item("webtext").Value)%>
<%=MakeHyperlink((Recordset1.Fields.Item("hyperlink").Value))%>
Where/how do I insert the code you provided?



"crash" <crash@bcdcdigital.com> wrote in message
news:e4i5n9$g7$1@forums.macromedia.com...
> what language are you using?
>
> basically
>
> varRecip = RecordsetCheckbox;
> varSite = RecordsetSite
>
> if (varRecip) {
> print/echo ("'<a href='" && varSite && "'>" && varCompanyName && "</a>");
> }
>
>
> "woodywyatt" <woodywyatt@fuerteventura.com> wrote in message
> news:e4i452$rng$1@forums.macromedia.com...
>> Is there a way to only display a certain field from a recordset if
>> another seperate field is not empty? Else nothing.
>>
>> Heres an example:
>> I have a database from which want to display a clients url's
>>
>> If they don't have a reciprocal link then without our ok their website
>> link won't appear - if at a later date they do put a reciprocal link then
>> all we'd have to do would be to check the reciprocal link box and their
>> weblink will show.
>>
>> Hope I'm making sense!
>> Thanks
>> Gary
>>
>
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 18, 2006 May 18, 2006
quotes might be a pain

i'm rusty in vb, hold on and i'll post when i get back from lunch or a
current ASP guy can post.

If you want to do some research before I get back, look for creating a
function in ASP,defining variables, and perhaps dynamic links. The quotes
is what I remember having the hardest time with in ASP, but I disremember
why.

You can use http://fourguysfromrolla.com as a good ASP site.

I will check back in a bit.

"woodywyatt" <woodywyatt@fuerteventura.com> wrote in message
news:e4i9m9$5rv$1@forums.macromedia.com...
> Hi, thanks for the swift reply
> I'm using VBSCRIPT
> The code for the weblink is <%=(Recordset1.Fields.Item("webtext").Value)%>
> <%=MakeHyperlink((Recordset1.Fields.Item("hyperlink").Value))%>
> Where/how do I insert the code you provided?
>
>
>
> "crash" <crash@bcdcdigital.com> wrote in message
> news:e4i5n9$g7$1@forums.macromedia.com...
>> what language are you using?
>>
>> basically
>>
>> varRecip = RecordsetCheckbox;
>> varSite = RecordsetSite
>>
>> if (varRecip) {
>> print/echo ("'<a href='" && varSite && "'>" && varCompanyName &&
>> "</a>");
>> }
>>
>>
>> "woodywyatt" <woodywyatt@fuerteventura.com> wrote in message
>> news:e4i452$rng$1@forums.macromedia.com...
>>> Is there a way to only display a certain field from a recordset if
>>> another seperate field is not empty? Else nothing.
>>>
>>> Heres an example:
>>> I have a database from which want to display a clients url's
>>>
>>> If they don't have a reciprocal link then without our ok their website
>>> link won't appear - if at a later date they do put a reciprocal link
>>> then all we'd have to do would be to check the reciprocal link box and
>>> their weblink will show.
>>>
>>> Hope I'm making sense!
>>> Thanks
>>> Gary
>>>
>>
>>
>
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 18, 2006 May 18, 2006
Hi, Crash
No joy there I'm afraid, although I did post a message on their forum (btw -
website is http://www.4guysfromrolla.com)
Anyone else have any ideas?
Thanks
Gary

"crash" <crash@bcdcdigital.com> wrote in message
news:e4ia7o$6k8$1@forums.macromedia.com...
> quotes might be a pain
>
> i'm rusty in vb, hold on and i'll post when i get back from lunch or a
> current ASP guy can post.
>
> If you want to do some research before I get back, look for creating a
> function in ASP,defining variables, and perhaps dynamic links. The quotes
> is what I remember having the hardest time with in ASP, but I disremember
> why.
>
> You can use http://fourguysfromrolla.com as a good ASP site.
>
> I will check back in a bit.
>
> "woodywyatt" <woodywyatt@fuerteventura.com> wrote in message
> news:e4i9m9$5rv$1@forums.macromedia.com...
>> Hi, thanks for the swift reply
>> I'm using VBSCRIPT
>> The code for the weblink is
>> <%=(Recordset1.Fields.Item("webtext").Value)%>
>> <%=MakeHyperlink((Recordset1.Fields.Item("hyperlink").Value))%>
>> Where/how do I insert the code you provided?
>>
>>
>>
>> "crash" <crash@bcdcdigital.com> wrote in message
>> news:e4i5n9$g7$1@forums.macromedia.com...
>>> what language are you using?
>>>
>>> basically
>>>
>>> varRecip = RecordsetCheckbox;
>>> varSite = RecordsetSite
>>>
>>> if (varRecip) {
>>> print/echo ("'<a href='" && varSite && "'>" && varCompanyName &&
>>> "</a>");
>>> }
>>>
>>>
>>> "woodywyatt" <woodywyatt@fuerteventura.com> wrote in message
>>> news:e4i452$rng$1@forums.macromedia.com...
>>>> Is there a way to only display a certain field from a recordset if
>>>> another seperate field is not empty? Else nothing.
>>>>
>>>> Heres an example:
>>>> I have a database from which want to display a clients url's
>>>>
>>>> If they don't have a reciprocal link then without our ok their website
>>>> link won't appear - if at a later date they do put a reciprocal link
>>>> then all we'd have to do would be to check the reciprocal link box and
>>>> their weblink will show.
>>>>
>>>> Hope I'm making sense!
>>>> Thanks
>>>> Gary
>>>>
>>>
>>>
>>
>>
>
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 18, 2006 May 18, 2006
Just use an if to check the value of the field.

<% If YourRecordset.Fields.Item("FieldToCheck").Value = someValue Then %>
<%= YourRecordset.Fields.Item("FieldToDisplay").Value %>
<% End If %>

--
Bryan Ashcraft (remove brain to reply)
Web Application Developer
Wright Medical Technologies, Inc.
=============================
Macromedia Certified Dreamweaver Developer
Adobe Community Expert (DW) :: http://www.adobe.com/communities/experts/


"woodywyatt" <woodywyatt@fuerteventura.com> wrote in message
news:e4i9m9$5rv$1@forums.macromedia.com...
> Hi, thanks for the swift reply
> I'm using VBSCRIPT
> The code for the weblink is <%=(Recordset1.Fields.Item("webtext").Value)%>
> <%=MakeHyperlink((Recordset1.Fields.Item("hyperlink").Value))%>
> Where/how do I insert the code you provided?
>
>
>
> "crash" <crash@bcdcdigital.com> wrote in message
> news:e4i5n9$g7$1@forums.macromedia.com...
>> what language are you using?
>>
>> basically
>>
>> varRecip = RecordsetCheckbox;
>> varSite = RecordsetSite
>>
>> if (varRecip) {
>> print/echo ("'<a href='" && varSite && "'>" && varCompanyName &&
>> "</a>");
>> }
>>
>>
>> "woodywyatt" <woodywyatt@fuerteventura.com> wrote in message
>> news:e4i452$rng$1@forums.macromedia.com...
>>> Is there a way to only display a certain field from a recordset if
>>> another seperate field is not empty? Else nothing.
>>>
>>> Heres an example:
>>> I have a database from which want to display a clients url's
>>>
>>> If they don't have a reciprocal link then without our ok their website
>>> link won't appear - if at a later date they do put a reciprocal link
>>> then all we'd have to do would be to check the reciprocal link box and
>>> their weblink will show.
>>>
>>> Hope I'm making sense!
>>> Thanks
>>> Gary
>>>
>>
>>
>
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 19, 2006 May 19, 2006
Hi Bryan
Tried that, but I don't seem to get the 'Field to display' to actually show
on the page.
See my code below -

<% If Recordset1.Fields.Item("check").Value = yes Then %
<%= Recordset1.Fields.Item("hyperlink").Value %><input name="hiddenField"
type="hidden" value="<%=(Recordset1.Fields.Item("check").Value)%>">
<% End If %>

Any ideas what I'm doing wrong?
Many thanks
Gary


"Bryan Ashcraft" <bashcraft@wmtBRAIN.com> wrote in message
news:e4iq6n$qo5$1@forums.macromedia.com...
> Just use an if to check the value of the field.
>
> <% If YourRecordset.Fields.Item("FieldToCheck").Value = someValue Then %>
> <%= YourRecordset.Fields.Item("FieldToDisplay").Value %>
> <% End If %>
>
> --
> Bryan Ashcraft (remove brain to reply)
> Web Application Developer
> Wright Medical Technologies, Inc.
> =============================
> Macromedia Certified Dreamweaver Developer
> Adobe Community Expert (DW) :: http://www.adobe.com/communities/experts/
>
>
> "woodywyatt" <woodywyatt@fuerteventura.com> wrote in message
> news:e4i9m9$5rv$1@forums.macromedia.com...
>> Hi, thanks for the swift reply
>> I'm using VBSCRIPT
>> The code for the weblink is
>> <%=(Recordset1.Fields.Item("webtext").Value)%>
>> <%=MakeHyperlink((Recordset1.Fields.Item("hyperlink").Value))%>
>> Where/how do I insert the code you provided?
>>
>>
>>
>> "crash" <crash@bcdcdigital.com> wrote in message
>> news:e4i5n9$g7$1@forums.macromedia.com...
>>> what language are you using?
>>>
>>> basically
>>>
>>> varRecip = RecordsetCheckbox;
>>> varSite = RecordsetSite
>>>
>>> if (varRecip) {
>>> print/echo ("'<a href='" && varSite && "'>" && varCompanyName &&
>>> "</a>");
>>> }
>>>
>>>
>>> "woodywyatt" <woodywyatt@fuerteventura.com> wrote in message
>>> news:e4i452$rng$1@forums.macromedia.com...
>>>> Is there a way to only display a certain field from a recordset if
>>>> another seperate field is not empty? Else nothing.
>>>>
>>>> Heres an example:
>>>> I have a database from which want to display a clients url's
>>>>
>>>> If they don't have a reciprocal link then without our ok their website
>>>> link won't appear - if at a later date they do put a reciprocal link
>>>> then all we'd have to do would be to check the reciprocal link box and
>>>> their weblink will show.
>>>>
>>>> Hope I'm making sense!
>>>> Thanks
>>>> Gary
>>>>
>>>
>>>
>>
>>
>
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 19, 2006 May 19, 2006
Does your database hold "yes" as a checkmark?

I would try true/false or 0/1.

Jon

"woodywyatt" <woodywyatt@fuerteventura.com> wrote in message
news:e4k7ev$kf0$1@forums.macromedia.com...
> Hi Bryan
> Tried that, but I don't seem to get the 'Field to display' to actually
> show on the page.
> See my code below -
>
> <% If Recordset1.Fields.Item("check").Value = yes Then %
> <%= Recordset1.Fields.Item("hyperlink").Value %><input name="hiddenField"
> type="hidden" value="<%=(Recordset1.Fields.Item("check").Value)%>">
> <% End If %>
>
> Any ideas what I'm doing wrong?
> Many thanks
> Gary
>
>
> "Bryan Ashcraft" <bashcraft@wmtBRAIN.com> wrote in message
> news:e4iq6n$qo5$1@forums.macromedia.com...
>> Just use an if to check the value of the field.
>>
>> <% If YourRecordset.Fields.Item("FieldToCheck").Value = someValue Then %>
>> <%= YourRecordset.Fields.Item("FieldToDisplay").Value %>
>> <% End If %>
>>
>> --
>> Bryan Ashcraft (remove brain to reply)
>> Web Application Developer
>> Wright Medical Technologies, Inc.
>> =============================
>> Macromedia Certified Dreamweaver Developer
>> Adobe Community Expert (DW) :: http://www.adobe.com/communities/experts/
>>
>>
>> "woodywyatt" <woodywyatt@fuerteventura.com> wrote in message
>> news:e4i9m9$5rv$1@forums.macromedia.com...
>>> Hi, thanks for the swift reply
>>> I'm using VBSCRIPT
>>> The code for the weblink is
>>> <%=(Recordset1.Fields.Item("webtext").Value)%>
>>> <%=MakeHyperlink((Recordset1.Fields.Item("hyperlink").Value))%>
>>> Where/how do I insert the code you provided?
>>>
>>>
>>>
>>> "crash" <crash@bcdcdigital.com> wrote in message
>>> news:e4i5n9$g7$1@forums.macromedia.com...
>>>> what language are you using?
>>>>
>>>> basically
>>>>
>>>> varRecip = RecordsetCheckbox;
>>>> varSite = RecordsetSite
>>>>
>>>> if (varRecip) {
>>>> print/echo ("'<a href='" && varSite && "'>" && varCompanyName &&
>>>> "</a>");
>>>> }
>>>>
>>>>
>>>> "woodywyatt" <woodywyatt@fuerteventura.com> wrote in message
>>>> news:e4i452$rng$1@forums.macromedia.com...
>>>>> Is there a way to only display a certain field from a recordset if
>>>>> another seperate field is not empty? Else nothing.
>>>>>
>>>>> Heres an example:
>>>>> I have a database from which want to display a clients url's
>>>>>
>>>>> If they don't have a reciprocal link then without our ok their website
>>>>> link won't appear - if at a later date they do put a reciprocal link
>>>>> then all we'd have to do would be to check the reciprocal link box and
>>>>> their weblink will show.
>>>>>
>>>>> Hope I'm making sense!
>>>>> Thanks
>>>>> Gary
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 19, 2006 May 19, 2006
LATEST
Brilliant!
Thanks to both Bryan Ashcraft & Crash, sorted now.
Gary

"crash" <crash@bcdcdigital.com> wrote in message
news:e4km4g$9rp$1@forums.macromedia.com...
> Does your database hold "yes" as a checkmark?
>
> I would try true/false or 0/1.
>
> Jon
>
> "woodywyatt" <woodywyatt@fuerteventura.com> wrote in message
> news:e4k7ev$kf0$1@forums.macromedia.com...
>> Hi Bryan
>> Tried that, but I don't seem to get the 'Field to display' to actually
>> show on the page.
>> See my code below -
>>
>> <% If Recordset1.Fields.Item("check").Value = yes Then %
>> <%= Recordset1.Fields.Item("hyperlink").Value %><input name="hiddenField"
>> type="hidden" value="<%=(Recordset1.Fields.Item("check").Value)%>">
>> <% End If %>
>>
>> Any ideas what I'm doing wrong?
>> Many thanks
>> Gary
>>
>>
>> "Bryan Ashcraft" <bashcraft@wmtBRAIN.com> wrote in message
>> news:e4iq6n$qo5$1@forums.macromedia.com...
>>> Just use an if to check the value of the field.
>>>
>>> <% If YourRecordset.Fields.Item("FieldToCheck").Value = someValue Then
>>> %>
>>> <%= YourRecordset.Fields.Item("FieldToDisplay").Value %>
>>> <% End If %>
>>>
>>> --
>>> Bryan Ashcraft (remove brain to reply)
>>> Web Application Developer
>>> Wright Medical Technologies, Inc.
>>> =============================
>>> Macromedia Certified Dreamweaver Developer
>>> Adobe Community Expert (DW) :: http://www.adobe.com/communities/experts/
>>>
>>>
>>> "woodywyatt" <woodywyatt@fuerteventura.com> wrote in message
>>> news:e4i9m9$5rv$1@forums.macromedia.com...
>>>> Hi, thanks for the swift reply
>>>> I'm using VBSCRIPT
>>>> The code for the weblink is
>>>> <%=(Recordset1.Fields.Item("webtext").Value)%>
>>>> <%=MakeHyperlink((Recordset1.Fields.Item("hyperlink").Value))%>
>>>> Where/how do I insert the code you provided?
>>>>
>>>>
>>>>
>>>> "crash" <crash@bcdcdigital.com> wrote in message
>>>> news:e4i5n9$g7$1@forums.macromedia.com...
>>>>> what language are you using?
>>>>>
>>>>> basically
>>>>>
>>>>> varRecip = RecordsetCheckbox;
>>>>> varSite = RecordsetSite
>>>>>
>>>>> if (varRecip) {
>>>>> print/echo ("'<a href='" && varSite && "'>" && varCompanyName &&
>>>>> "</a>");
>>>>> }
>>>>>
>>>>>
>>>>> "woodywyatt" <woodywyatt@fuerteventura.com> wrote in message
>>>>> news:e4i452$rng$1@forums.macromedia.com...
>>>>>> Is there a way to only display a certain field from a recordset if
>>>>>> another seperate field is not empty? Else nothing.
>>>>>>
>>>>>> Heres an example:
>>>>>> I have a database from which want to display a clients url's
>>>>>>
>>>>>> If they don't have a reciprocal link then without our ok their
>>>>>> website link won't appear - if at a later date they do put a
>>>>>> reciprocal link then all we'd have to do would be to check the
>>>>>> reciprocal link box and their weblink will show.
>>>>>>
>>>>>> Hope I'm making sense!
>>>>>> Thanks
>>>>>> Gary
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines