Alpha Developers Network

Guest


Author Topic: Converting DUMP from dialog to work within grid  (Read 617 times)

0 Members and 1 Guest are viewing this topic.

Den1s

  • Guest
Converting DUMP from dialog to work within grid
« on: December 15, 2011, 02:49:30 AM »
Hi All,

I have a small script I use within a dialog that allows me to make multiple selections from a multiselect checkbox field and the result is placed in a table as seperate records avoiding the comma deliminated entry in one record.

So for example, where I check A, B, C and D. I would normally get a,b,c,d entered within a single record in my table. What I need is the following...

ID------PROJECT_NAME
01------A
02------B
03------C
04------D

...as seperate records in my table.

This code works great within my dialog, but I now need it to work within my grid.


Code:
tbl=table.open("[PathAlias.ADB_path]\tbl_myprojects")
if PROJECTS.dump() <> "" then
list = PROJECTS.dump()
for each foo in list
tbl.enter_begin()
tbl.Project_name = foo.value
tbl.enter_end(.t.)
next
end ifCan someone please tell me how I can convert the above to work within my grid event.

Thanks,

Denis

Steve Wood

  • Administrator
  • Expert
  • *****
  • Posts: 706
  • Karma: +11/-0
    • AlphaToGo
  • Real Name: Steve Wood
Re: Converting DUMP from dialog to work within grid
« Reply #1 on: December 15, 2011, 06:58:59 AM »
see response on the A forum.
---
Steve Wood
www.alphatogo.com