Hi all,
Have managed to get by without using arrays so far but now I have found a need. I have created a list populated from a set as follows
I would the like to create an array for line + column entry of the list and then format to look like the following
{data=00000001} 00000001 |00000616 |DC-1090-340-CW |17 |9002380
I tried to use the .initialize() and .inialize_properties() to create the array but to no avail. I'm not sure if they are the wrong functions to use or I'm not using them correctly.
or
Looking at the help the .initialize_properties should be the right function to use but I think it is the delimiter + that is wrong but I'm not sure what I need to use.
The problem is that the array being created isn't creating an entry (element) for each of the field(column) entries but instead putting the whole line as one element.
You can view the array using the following
and then using the following to format
to view
You end up with {data=00000001 00000001 00000616 DC-1090-340-CW 17 9002380} | for each column entry.
Not sure how well I have explained this but would appreciate some help in getting this to work and understanding where I have gone wrong.
Geoff
Have managed to get by without using arrays so far but now I have found a need. I have created a list populated from a set as follows
Code:
dim arr[0] as c dim dislist as c dislist=set.external_record_content_get("wop_print.set","alltrim(rel_son_id) +' '+ alltrim(s_order->myob_son) +' '+ alltrim(s_items->item_no) +' '+ s_release->rel_qty +' '+ alltrim(s_release->release_no)","rel_son_id","",1) It generates a list as follows. ? dislist = 00000001 00000616 DC-1090-340-CW 17 9002380 00000002 00000616 DC-1090-340-CW 28 580913 00000003 00000616 DC-1090-340-CW 32 580913 00000004 00000616 DC-1090-340-CW 4 582022 00000005 00000616 DC-1090-340-CW 13 583119 00000006 00000843 DI-948-001 25 LPO4444 00000007 00000844 DI-868-138 10 LPO4824
{data=00000001} 00000001 |00000616 |DC-1090-340-CW |17 |9002380
I tried to use the .initialize() and .inialize_properties() to create the array but to no avail. I'm not sure if they are the wrong functions to use or I'm not using them correctly.
Code:
arr.initialize(dislist)
Code:
arr.initialize_properties("rel_son_id + myob_son + item_no + rel_qty + release_no", dislist)
The problem is that the array being created isn't creating an entry (element) for each of the field(column) entries but instead putting the whole line as one element.
You can view the array using the following
Code:
? ui_get_list_array("arr contents", 1, "arr")
Code:
format_list = *for_each(x,"{Data=" + x.rel_son_id + "}" + x.rel_son_id + "|" + x.myob_son + "|"+ x.item_no + "|" + x.rel_qty + "|" + x.release_no, dislist)
Code:
ui_msg_box("",format_list)
Not sure how well I have explained this but would appreciate some help in getting this to work and understanding where I have gone wrong.
Geoff
Comment