Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ListBox using RowSourcetype 6 and one of the fields is n
Message
From
18/09/1997 05:37:49
 
 
To
17/09/1997 18:31:24
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00050024
Message ID:
00050520
Views:
22
Hi Jim!

I donnot know, if anybody use it, too, but I figure it out myself. The suggestion came to me, that in FoxDos2.6 I used different aliases with popup list, but I found, that the first alias in field row is the main alias. So, when the first "column" wasnot in the parent table, I had to use
DEFINE POPUP ...
FIELD iif(parentalias.anyfield,"","")+... (I donnot remember where it came from, but I guess I figure it out myself, because at that time I had not internet.)

So, when I switched to VFP, I tested this "feature" first. The developers guide suggested it, too, because it said, that if RowSourceType is Alias, you can use for RowSource Alias.field1, field2, .... OK, I thought to myself, how to use functions here? The only main difference to FoxDos, that you cannot use aliases directly for second and other fields. Because functions is permitted instead of field names (it was my second test), then I tried to use alias.field type parameters for functions. I tested it, and after some try-error period, I concluded what I wrote to you.

P.S.: I forget to write, that whit this method, you can use object.property type variables!


>Bela,
>
>This is a VERY *interesting* """feature"""!
>
>Did you read this in the docs, or did you 'just happen to come across it"?
>
>I would really like to know the source, and I offer my congrats if you stumbled on it yourself and figured out the "rules".
>
>Cheers,
>Jim N
>
>>Hi Frank!
>>
>>I read your threads with Barbara and Jim.
>>
>>So, your rowsource is something like this: alias.field1, field2, fieldn
>>And you want change the format of fields without SQL. I met this problem, too. I use the following solution:
>>RowSource: MirrorFunc(myalias.field1), anyfunc(AnyRelatedTable.AnyField), ...
>>
>>function MirrorFunc
>>lparameter data
>>return data
>>
>>It is important, that without Mirrorfunc, you cannot use functions, in RowSource. (More precisely, if first field is not in function, any other cannot be, also.) But with it, you can use any function, and additionally, the rest fields can come from other tables! But without functions, It is impossible. (As I know.) The first named table is the main parent table! In this example, the MyAlias table.
>>
>>
>>BB
>>
>>P.S.: I used VFP 5.0
>>
>>
>>
>>>>>Listbox using rowsourcetype of 6 and one of the fields is not charactor but is numeric unstead
>>>>>
>>>>>I have created a listbox with a rowsourcetype of 6 which is field and one of the fields in the
>>>>>listbox is numeric. The column will not show up that is numeric in the listbox the other columns will show up.
>>>>>
>>>>>What do I have to do I can not change the field type in the table.
>>>>
>>>>Frank I tried this on both VFP3 and VFP5 and had no problems. In both cases I set the numeric field to the bound field and then changed the bound field to one of the character fields with no problem.
>>>>
>>>
>>>>Please write again with as much information as you can:
>>>>
>>>>1. How many columns in your listbox?
>>>>2. Which column is bound?
>>>>3. What data is in each column (numeric or character)
>>>>4. VFP3 or 5? And which version (5.0 or 5.0a, 3.0 or 3.0b)
>>>>
>>>>Add anything else you can think of.
>>>>
>>>>Barbara
>>>
>>>
>>>*****************************
>>>
>>>I Found out that It is visual problem and the value does display if numeric but I want to modify the value by change the value by to change the value by ltrim() the contents.
>>>
>>>Frank
>>>
>>>****************************
Previous
Reply
Map
View

Click here to load this message in the networking platform