manipulating hiCreateReportField Form

Guest
Hi All,

I have created a Report feiid form and the value of ?choices are as shown below

MainForm->changes->choices->??
(("1" "OSC_ALL" "VTH" "M2" "No" "4247.885" "465.72" "Low" "asad-Aug/28/2012")
("2" "OSC_ALL" "Misc" "M2" "No" "3088.80" "646.63" "Low" "asad-Aug/28/2012")
("3" "OSC__ALL" "V2" "M2" "No" "2198.91" "505.12" "High" "asad-Aug/28/2012"))

I want to pick the coordinated which are 6th & 7th elemets of each list from above & zoom to that location in a current cell view. I want to know how to access the integer of list in the ?choices form; when the user selects any row.

Like if i select the first row in my form it returns in the icfb window like

hiReportSelectItems(MainForm->changes list(0 ) t)

From here I can know the user has selected the first entry(first row) in the form, How can i pass this to a variable so that I can pick the corrdinates from the chosen list and then call a subroutine to zoom to that location.

Anybody experienced with creating & manipulating forms; please help

Thanks in advance
M Dubey
 
On 08/29/12 13:33, mdubey2507@gmail.com wrote:
.... snipped...
Like if i select the first row in my form it returns in the icfb window like

hiReportSelectItems(MainForm->changes list(0 ) t)

From here I can know the user has selected the first entry(first row) in the form,
How can i pass this to a variable so that I can pick the corrdinates
from the chosen
list and then call a subroutine to zoom to that location.

Anybody experienced with creating & manipulating forms; please help

Thanks in advance
M Dubey
selections=hiReportGetSelectedItems(MainForm->changes)
count=0
choiceRows=setof(choice MainForm->changes->choices
when(count++==car(selections)
selections=cdr(selections)
t
)
)

choiceRows will then contain the rows you have selected. Now if you want
to get the coordinates (converted to numbers, presumably):

coords=foreach(mapcar choice choiceRows
list(atof(nth(5 choice)) atof(nth(6 choice)))
)

This will give you a list of coordinates for all the selected rows.

Hope that helps!

Andrew.
 

Welcome to EDABoard.com

Sponsor

Back
Top