Question

How do I use PowerScript to change information in a datawindow?

Asked by: pemurray

Greetings,

I have a text bar in two different datawindows.  The name of the text object is t_title.

I have code to change the name of the text as:

dw_2.object.t_title.text = " Shuttle Schedule for " + sDayname + " " + todaytext
dw_1.object.t_title.text = " Shuttle Schedule for " + sDayname + " " + todaytext

The code for the first line of code referencing dw_2 works fine.  The second line of code referencing dw_1 gives me the following error:

Application Terminated.  Error: Name not found accessing external object property   in function clicked of object cb_3.

I have checked to make sure the name of the items is the same in both datawindows.  This is driving me nuts.

I also have a .bmp file in the detail band of a datawindow that I want to make visible or not depending on the row being clicked.

The following lines of code gets the same error:

dw_2.object.p_1.Visible[clickedrow] = True //make the hand visible
dw_2.Object.p_hand.Visible= True //make the hand visible

I have double checked that it is actually dw_2 and double checked that the reference to the .bmp file is actually 'p_1'.  Still no good.

Can someone PLEASE help me!

Thanks!

Paul





This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2008-12-05 at 12:47:48ID23961640
Tags

PowerBuilder 11.0

Topic

PowerBuilder Programming Language

Participating Experts
1
Points
500
Comments
5

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Datawindow Bands
    Can someone shed some more light on datawindow bands - i.e. header and trailer?
  2. Nested Datawindows
    I have a report with a nested datawindow on it. The main report can be printed using many different parameters, but certain parameters entered only apply to the nested datawindow. How do I modify the SQL of the nested datawindow to retrieve using the specified parameters? ...
  3. datawindow
    what is a external datawindow ?
  4. Datawindow to bitmap
    How can I save the contents of a datawindow to a bitmap file?
  5. Changing Colour of datawindow having nested datawindo…
    I've got a datawindow in PB7, which contains a couple of other datawindows, as reports. I'm trying to change the colour of the "parent" datawindow but it appears that it falls back to the colour of (one or more) of its "children", which all have the same c...
  6. Adding page breaks prorammatically in a datawindow
    Hi! I need to create a datawindow with several pagebreaks. The number of pagebreaks is not known beforehand. I understand that for getting a new page I should have multiple reports in the datawindow with enabled newpage. So, the question is how to add into a static datawind...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: diasroshanPosted on 2008-12-06 at 02:36:45ID: 23111352

Hi,

First point, abt the below line giving u error,
dw_1.object.t_title.text = " Shuttle Schedule for " + sDayname + " " + todaytext

Ok,make sure u have a text object in dw_1 called t_title, check this by going thru the control list. If it exists, then make sure dw_1 isnt on a tab control or tabpage,coz in that case ur script shud look like below,
tab_1.tabpage_1.dw_1.object.t_title.text = " Shuttle Schedule for " + sDayname + " " + todaytext

About point 2,where the below line gives u error,
dw_2.object.p_1.Visible[clickedrow] = True //make the hand visible

Ok,make sure clickedrow is greater than zero,
Long clickedrow
clickedrow = dw_2.GetClickedRow()
If clickedrow < 1 Then Return
dw_2.object.p_1.Visible[clickedrow] = True //make the hand visible

If none of the above hints help, then export both ur DWs and paste them here.

Cheers,
Rosh


 

by: pemurrayPosted on 2008-12-06 at 09:09:22ID: 23112897

Hey Rosh,

Long time no talk.  Thanks for your help.

I am using PB 11.1 and I had two targets (winform and webform).  I deleted the winform target and the problem with the first example went away.

I am doing the checking that you suggest (e.g. if clickedrow > 0 then do this).

In the example above, I fixed what I thought would be an error and am currently trying this (I also changed the name of the picture to p_hand):

dw_2.object.p_hand[clickedrow].Visible = True //make the hand visible

The above did not work.

Also, I put a button in the detailed band.  When you click on it, I want to change the text of the button from 'Select' to '----->'.  The following code does not work:

dw_2.Object.b_select[clickedrow].text = "---->"

If I change the code to:

dw_2.Object.b_select.text = "---->"

it works, but it changes the text in the button in EVERY row.

In an other example, I am trying to change the back color for some fields to make it apparent where to enter data as follows:

cb_6.enabled = false
long paxrows
paxrows = dw_1.retrieve(confirmation_no)
if paxrows > 0 then
      dw_1.show()
      dw_1.object.t_title.text = "Shuttle " + shuttle + " Departing at: " + departure_time
      long newrow1
      newrow1 = dw_1.insertrow(0)
      dw_1.scrolltorow(newrow1)
      dw_1.setitem(newrow1,"confirmation_no",confirmation_no)
      dw_1.setitem(newrow1,"passenger_counter",newrow1)
      dw_1.setfocus( )
//      dw_1.object.fname[newrow1].backcolor = 65280
//      dw_1.object.lname[newrow1].backcolor = 65280
//      dw_1.object.phone[newrow1].backcolor = 65280
else
      messagebox("Error","System State Is Incorrect.  Should not be possible to add passenger using this button when no existing passengers are listed on this shuttle")
end if

THE COMMENTED LINES ABOVE DO NOT WORK.

Thanks for your help!!!

Paul

Here is dw_2:
 
$PBExportHeader$dw_ml_shuttle_master_administrator.srd
release 11;
datawindow(units=0 timer_interval=0 color=1073741824 processing=0 HTMLDW=no print.printername="" print.documentname="" print.orientation = 0 print.margin.left = 110 print.margin.right = 110 print.margin.top = 96 print.margin.bottom = 96 print.paper.source = 0 print.paper.size = 0 print.canusedefaultprinter=yes print.prompt=no print.buttons=no print.preview.buttons=no print.cliptext=no print.overrideprintjob=no print.collate=yes print.preview.outline=yes hidegrayline=no showbackcoloronxp=no )
header(height=216 color="536870912" )
summary(height=0 color="536870912" )
footer(height=0 color="536870912" )
detail(height=100 color="536870912~tif (mod(getrow(),2)=0,RGB(192,192,192),RGB(255,255,255)) 
 
" )
table(column=(type=char(10) updatewhereclause=yes name=operator_confirmation_no dbname="operator.confirmation_no" )
 column=(type=datetime updatewhereclause=yes name=operator_req_date_time dbname="operator.req_date_time" )
 column=(type=char(3) updatewhereclause=yes name=operator_pu_county dbname="operator.pu_county" )
 column=(type=char(40) updatewhereclause=yes name=operator_pu_city dbname="operator.pu_city" )
 column=(type=char(3) updatewhereclause=yes name=operator_dest_county dbname="operator.dest_county" )
 column=(type=char(40) updatewhereclause=yes name=operator_dest_city dbname="operator.dest_city" )
 column=(type=long updatewhereclause=yes name=no_pass dbname="operator.no_pass" )
 column=(type=char(5) updatewhereclause=yes name=compute_dept_time dbname="compute_0008" )
 column=(type=char(1) updatewhereclause=yes name=compute_via2 dbname="operator.compute_via2" )
 column=(type=char(1) updatewhereclause=yes name=compute_alreadybooked dbname="operator.compute_alreadybooked" values="	 /	 " )
 retrieve="PBSELECT( VERSION(400) TABLE(NAME=~"operator~" ) COLUMN(NAME=~"operator.confirmation_no~") COLUMN(NAME=~"operator.req_date_time~") COLUMN(NAME=~"operator.pu_county~") COLUMN(NAME=~"operator.pu_city~") COLUMN(NAME=~"operator.dest_county~") COLUMN(NAME=~"operator.dest_city~") COLUMN(NAME=~"operator.no_pass~") COMPUTE(NAME=~"convert(char(5),req_date_time,114)~") COMPUTE(NAME=~"~~~" ~~~" AS compute_via2~") COMPUTE(NAME=~"~~~" ~~~" AS compute_alreadybooked~")WHERE(    EXP1 =~"operator.req_date_time~"   OP =~">=~"    EXP2 =~":start_date~"    LOGIC =~"and~" ) WHERE(    EXP1 =~"operator.req_date_time~"   OP =~"<=~"    EXP2 =~":end_date~"    LOGIC =~"And~" ) WHERE(    EXP1 =~"operator.account_no~"   OP =~"=~"    EXP2 =~"'NBASHUTTLE'~"    LOGIC =~"and~" ) WHERE(    EXP1 =~"operator.status_flag~"   OP =~"not in~"    EXP2 =~"('S','F','C')~" ) ) ARG(NAME = ~"start_date~" TYPE = datetime)  ARG(NAME = ~"end_date~" TYPE = datetime) " arguments=(("start_date", datetime),("end_date", datetime))  sort="operator_pu_county A operator_pu_city A operator_req_date_time A " )
group(level=1 header.height=80 trailer.height=0 by=("compute_shuttle" ) header.color="536870912" trailer.color="536870912"  sort="operator_pu_city A " )
text(band=header alignment="2" text="Confo" border="0" color="33554432" x="2711" y="8" height="64" width="229" html.valueishtml="0"  name=t_2 visible="1"  font.face="Arial" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="PAX" border="0" color="33554432" x="3131" y="8" height="64" width="229" html.valueishtml="0"  name=t_3 visible="1"  font.face="Arial" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Pickup City" border="0" color="33554432" x="5" y="144" height="64" width="338" html.valueishtml="0"  name=operator_confirmation_no_t visible="1"  font.face="Arial" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="Time" border="0" color="33554432" x="457" y="144" height="64" width="165" html.valueishtml="0"  name=operator_req_date_time_t visible="1"  font.face="Arial" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="Destination" border="0" color="33554432" x="722" y="144" height="64" width="718" html.valueishtml="0"  name=t_1 visible="1"  font.face="Arial" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="~t~" Shuttle Schedule for ~"" border="0" color="16777215" x="0" y="0" height="80" width="2656" html.valueishtml="0"  name=t_title visible="1"  font.face="Arial" font.height="-12" font.weight="700"  font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="8421376" )
text(band=header alignment="0" text="B" border="0" color="33554432" x="347" y="144" height="64" width="59" html.valueishtml="0"  name=t_4 visible="1"  font.face="Arial" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
compute(band=header.1 alignment="0" expression="operator_pu_city + ~", ~" +  operator_pu_county + ~" TO~""border="0" color="33554432" x="18" y="8" height="64" width="850" format="[GENERAL]" html.valueishtml="0"  name=compute_shuttle visible="1"  font.face="Arial" font.height="-12" font.weight="700"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
compute(band=detail alignment="1" expression="time(string(operator_req_date_time))"border="0" color="33554432" x="4430" y="0" height="72" width="329" format="[General]" html.valueishtml="0"  name=compute_dept_time_old visible="1"  font.face="Arial" font.height="-9" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
compute(band=detail alignment="0" expression="udf_is_mlshuttle_trip_via_jersey_city ( operator_pu_city , operator_dest_city , compute_dept_time )"border="0" color="33554432" x="3401" y="8" height="60" width="512" format="[GENERAL]" html.valueishtml="0"  name=compute_via visible="1"  font.face="Arial" font.height="-9" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
compute(band=detail alignment="0" expression="right( operator_confirmation_no , 4)"border="0" color="33554432" x="2734" y="4" height="72" width="201" format="[GENERAL]" html.valueishtml="0"  name=compute_confo visible="1"  font.face="Arial" font.height="-9" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
column(band=detail id=7 alignment="0" tabsequence=32766 border="0" color="33554432" x="3127" y="4" height="72" width="256" format="[general]" html.valueishtml="0"  name=no_pass visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=no  font.face="Arial" font.height="-9" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
compute(band=detail alignment="0" expression=" operator_confirmation_no "border="0" color="33554432" x="5019" y="4" height="72" width="626" format="[GENERAL]" html.valueishtml="0"  name=compute_3 visible="1"  font.face="Arial" font.height="-9" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
compute(band=detail alignment="0" expression="time(mid(string(operator_req_date_time),12,5))"border="0" color="33554432" x="4809" y="8" height="60" width="183" format="[TIME]" html.valueishtml="0"  name=computed_departure_time_as_time visible="1"  font.face="Arial" font.height="-9" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=9 alignment="0" tabsequence=32766 border="0" color="33554432" x="5678" y="12" height="60" width="626" format="[general]" html.valueishtml="0"  name=compute_via2 visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=no  font.face="Arial" font.height="-9" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
column(band=detail id=8 alignment="0" tabsequence=32766 border="0" color="33554432" x="4046" y="12" height="60" width="187" format="[general]" html.valueishtml="0"  name=compute_dept_time visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=no  font.face="Arial" font.height="-9" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=2 alignment="0" tabsequence=32766 border="0" color="33554432" x="416" y="12" height="60" width="274" format="HH:MM AM/PM" html.valueishtml="0"  name=operator_req_date_time visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=no  font.face="Arial" font.height="-9" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=10 alignment="0" tabsequence=32766 border="0" color="33554432" x="2071" y="24" height="48" width="55" format="[general]" html.valueishtml="0"  name=compute_alreadybooked_1 visible="1" checkbox.text="" checkbox.on=" " checkbox.off=" " checkbox.scale=no checkbox.threed=yes  font.face="Tahoma" font.height="-12" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" )
bitmap(band=detail filename="M:\!Dev\NBA-ShuttleTool\checkmark.bmp" x="297" y="12" height="60" width="59" border="0"  name=p_checkmark visible="0" )
bitmap(band=detail filename="M:\!Dev\NBA-ShuttleTool\hand.bmp" x="82" y="12" height="68" width="110" border="0"  name=p_hand visible="0" )
column(band=detail id=6 alignment="0" tabsequence=32766 border="0" color="33554432" x="731" y="12" height="60" width="375" format="[GENERAL]" html.valueishtml="0"  name=operator_dest_city visible="1" edit.limit=40 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Arial" font.height="-9" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
button(band=detail text="Select" enabled=yes action="0" border="0" color="33554432" x="1138" y="8" height="76" width="320" vtextalign="0" htextalign="0"  name=b_select visible="1"  font.face="Arial" font.height="-9" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" )
htmltable(border="1" )
htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" encodeselflinkargs="1" netscapelayers="0" pagingmethod=0 generatedddwframes="1" )
xhtmlgen() cssgen(sessionspecific="0" )
xmlgen(inline="0" )
xsltgen()
jsgen()
export.xml(headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0 )
import.xml()
export.pdf(method=0 distill.custompostscript="0" xslfop.print="0" )
export.xhtml()
 
Here is dw_1:
 
$PBExportHeader$dw_nba_shuttle_pax_list.srd
release 11;
datawindow(units=0 timer_interval=0 color=1073741824 processing=0 HTMLDW=no print.printername="" print.documentname="" print.orientation = 0 print.margin.left = 110 print.margin.right = 110 print.margin.top = 96 print.margin.bottom = 96 print.paper.source = 0 print.paper.size = 0 print.canusedefaultprinter=yes print.prompt=no print.buttons=no print.preview.buttons=no print.cliptext=no print.overrideprintjob=no print.collate=yes print.preview.outline=yes hidegrayline=no showbackcoloronxp=no )
header(height=200 color="536870912" )
summary(height=0 color="536870912" )
footer(height=0 color="536870912" )
detail(height=92 color="536870912" )
table(column=(type=char(20) update=yes updatewhereclause=yes name=fname dbname="operator_passengers.fname" )
 column=(type=char(20) update=yes updatewhereclause=yes name=lname dbname="operator_passengers.lname" )
 column=(type=char(20) update=yes updatewhereclause=yes name=phone dbname="operator_passengers.phone" )
 column=(type=char(10) update=yes updatewhereclause=yes key=yes name=confirmation_no dbname="operator_passengers.confirmation_no" )
 column=(type=long update=yes updatewhereclause=yes key=yes name=passenger_counter dbname="operator_passengers.passenger_counter" )
 retrieve="PBSELECT( VERSION(400) TABLE(NAME=~"operator_passengers~" ) COLUMN(NAME=~"operator_passengers.fname~") COLUMN(NAME=~"operator_passengers.lname~") COLUMN(NAME=~"operator_passengers.phone~") COLUMN(NAME=~"operator_passengers.confirmation_no~") COLUMN(NAME=~"operator_passengers.passenger_counter~")WHERE(    EXP1 =~"operator_passengers.confirmation_no~"   OP =~"=~"    EXP2 =~":confo~" ) ) ARG(NAME = ~"confo~" TYPE = string) " update="operator_passengers" updatewhere=0 updatekeyinplace=no arguments=(("confo", string)) )
text(band=header alignment="0" text="~t~"Shuttle...~"" border="0" color="16777215" x="0" y="0" height="80" width="1248" html.valueishtml="0"  name=t_title  tag="" visible="1"  font.face="Arial" font.height="-12" font.weight="700"  font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="12639424" )
text(band=header alignment="2" text="First Name" border="0" color="33554432" x="14" y="124" height="64" width="434" html.valueishtml="0"  name=fname_t visible="1"  font.face="Tahoma" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Last Name" border="0" color="33554432" x="462" y="124" height="64" width="421" html.valueishtml="0"  name=lname_t visible="1"  font.face="Tahoma" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Extension" border="0" color="33554432" x="896" y="124" height="64" width="279" html.valueishtml="0"  name=phone_t visible="1"  font.face="Tahoma" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=4 alignment="0" tabsequence=32766 border="0" color="33554432" x="1312" y="8" height="64" width="494" format="[general]" html.valueishtml="0"  name=confirmation_no visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=no  font.face="Tahoma" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=5 alignment="0" tabsequence=32766 border="0" color="33554432" x="1861" y="8" height="64" width="2135" format="[general]" html.valueishtml="0"  name=passenger_counter visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=no  font.face="Tahoma" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=3 alignment="0" tabsequence=30 border="2" color="33554432" x="896" y="8" height="76" width="279" format="[general]" html.valueishtml="0"  name=phone visible="1" editmask.mask="#####" editmask.focusrectangle=no  font.face="Tahoma" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="12639424" )
column(band=detail id=2 alignment="0" tabsequence=20 border="2" color="33554432" x="462" y="8" height="76" width="421" format="[general]" html.valueishtml="0"  name=lname visible="1" edit.limit=20 edit.case=upper edit.autoselect=yes edit.autohscroll=yes  font.face="Tahoma" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="12639424" )
column(band=detail id=1 alignment="0" tabsequence=10 border="2" color="33554432" x="14" y="8" height="76" width="434" format="[general]" html.valueishtml="0"  name=fname visible="1" edit.limit=20 edit.case=upper edit.autoselect=yes edit.autohscroll=yes  font.face="Tahoma" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="12639424" )
htmltable(border="1" )
htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" encodeselflinkargs="1" netscapelayers="0" pagingmethod=0 generatedddwframes="1" )
xhtmlgen() cssgen(sessionspecific="0" )
xmlgen(inline="0" )
xsltgen()
jsgen()
export.xml(headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0 )
import.xml()
export.pdf(method=0 distill.custompostscript="0" xslfop.print="0" )
export.xhtml()
 
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:

Select allOpen in new window

 

by: diasroshanPosted on 2008-12-07 at 01:05:07ID: 23115149

Hi,
Instead of ,
dw_2.object.p_hand[clickedrow].Visible = True //make the hand visible

Use the below codes,
dw_2.object.p_hand.Visible="0~tIf(getrow()=currentRow(),1,0)"
OR,
i recommend!!, put this expression in the visible property of ur DW_2 of column p_hand--> If(getrow()=currentRow(),1,0)

Same for,
dw_2.Object.b_select.text = "---->"
i recommend!!, put this expression in the text property of ur DW_2 of button b_select --> If(getrow()=currentRow(),'--->','Select')

and for,
dw_1.object.fname[newrow1].backcolor = 65280
Try the below expression in the background color property of column fname,
if( isRowNew(), 65280, 16777215  ) //New record will have the column with green background color else white

Hope the above helps u,

Cheers,
Rosh

 

by: pemurrayPosted on 2008-12-07 at 08:12:55ID: 23116206

Hi Rosh,

All good stuff.  And actually, I did resort to that yesterday in order to keep my project moving along.  But as I am a bit pigheaded, I need to know if there is something wrong with my code or is what I am attempting to do not possible?

What I attempted to implement using your strategy was the following code for the text property of my button:

If(getrow()=currentRow(),"------>","Select")

as the arrow points to another data window to the right which has the detail rows retrieved by clicking on the first datawindow.

The PROBLEM is that when I retrieved the first datawindow, the first row always showed the button as "------->" even though the user had not clicked on the button and of course the 2nd datawindow had not yet been retrieved.  So then I tried to change the buttons in every row to read "Select" by using:

dw_2.object.b_select.text = "Select"

in the Retrieveend Event (as long as a flag was set to equal "FIRSTTIME".  And that worked fine.  The PROBLEM after that was that the following code did NOT work (or somehow the code to reset back to "Select" in the retrieveend event is still firing even though I am not doing another retrieve):

If(getrow()=currentRow(),"------>","Select")

Maybe the FIRSTTIME flag was not flipping correctly because it is a webform?

What a mess.

Thanks, Rosh!!  Still need help!!

Paul

 

by: diasroshanPosted on 2008-12-09 at 23:02:38ID: 23136818

Hi,

On which event are u changing the flag FIRSTTIME.

Say instance variable
Boolean ib_FIRSTTIME = FALSE

In Retrieveend event change this to, ib_FIRSTTIME = TRUE
In Clicked event of DW_2 change to, ib_FIRSTTIME = FALSE

Now write a function f_get_instance() which will return the value of this instance variable.
RETURN w_ur_window.ib_FIRSTTIME

Remove the code, dw_2.object.b_select.text = "Select"

and change ur DW expression to If(getrow()=currentRow() and  NOT f_get_instance(),"------>","Select")

Cheers,
Rosh

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...