2014년 12월 8일 월요일

Accessing Tables




Apparently I have no idea how to access the fields in the structure above or maybe I have just enough of an idea that I end up fouling everything up, anyway I have struggled with this long enough on my own I need help.  I have the following error message:  Bad arguments to select list item  The operation select list item cannot accept the arguments *empty-string* 1
1 was the amount I was trying to add to the last field in this table IE spec_Sale_AmtLabel9    

--

The operation select list item cannot accept the arguments *empty-string* 1
you get this error, if you select the first item of a list, which is not a list, but an empty text, which means, you have to initialize lists using the create empty list block instead of an empty text block
your screenshots do not help to find the issue, when exactly do you get that error?

--
That's kind of hard to explain.  In screen1 is where I create the above structure then in screen2 I want to make updates to that structure so I load the list from screen1 in the initialize block of screen2 but I don't want the user to have access to the whole list from the listpicker btn in screen2 so I am trying to only load Locations that make gifts to there employees to that listpicker. "special Sales" 

There was a cross over problem when I first started to try and record these special sales in their own list on screen2 they were showing up in the screen1 list so I decided to use the same list and add the 10th field to the structure IE spec_Sale_AmtLabel9.  and just update the list from screen1 directly but now I get that error so I think I am just accessing the sturcture incorrectly. 

So I have a btn for special sales on screen2 first I enter the name of the location in the Special Location txtbx then the tax rate in the tax rate txtbx the the amt of the special sale in the amt of purcahse text box the click the special sales btn and that is when I get The operation select list item cannot accept the arguments *empty-string* 1

--
then click the special sales btn
which means, you should take a look at that button click event...

--


--
how does the resetSpecialLocations procedure look like?

--



now I am getting Bad arguments to select list item    
The operation select list item cannot accept the arguments: 0 10

--
the SpecialSalesBtn.Click event looks fine
does the listpicker List_SpecialLocations open with some values?
also the resetSpecialLocations procedure looks fine

--
I have made some changes and I think i was composing a reply while you were already replying

--
me (D Douglas Cox change







now I am getting Bad arguments to select list item    
The operation select list item cannot accept the arguments: 0 10

--
Select list item:  List index too large

Select list item: Attempt to get item 10 of a list of length 2: (Fox Courion)

--
I think all my problems are coming from not really knowing how to access item number 10 (IE Spec_Sale_AmtLabel9) of this structure.  How would I store or update, write over - the value Spec_Sale_AmtLabel9

Select list item:  List index too large


Select list item: Attempt to get item 10 of a list of length 2: (Fox Courion)




--
you have 2 possibilities
1. to make sure, that the list always has 10 items, or
2. if you want to select an item, first to check the length of the list

--
The Fox item has 10 fields and the Courion item has ten fields so my real question is how do I access field number 10 of item 2

--
first select the correct item of the mainlist, which is item 2 for Courion
then select item 10 of the sublist
see also a more complex example for list of lists here An example of a List of Lists

--


댓글 없음:

댓글 쓰기