Quantcast
Channel: Martin Dráb's Activities
Viewing all articles
Browse latest Browse all 17532

Filtering Lookup for String x++

$
0
0

I had lookup fields (type:int64, Extended from RefRecId) and I had written lookup filtering code for them but I had to convert them into strings ( I had added relations to make them lookup fields) But since they are "String" instead of "reference group" my code doesn't work. How can I filter them when they are 'string'. Here is my code for filtering for reference groups: 

[FormControlEventHandler(formControlStr(InventSite, InventSite_MyField), FormControlEventType::Lookup)]
    public static void InventSite_MAndEDay_OnLookup(FormControl sender, FormControlEventArgs e)

    {
        SysReferenceTableLookup tableLookup = SysReferenceTableLookup::newParameters(tableNum(ReferenceTables), sender);
        Query query = new Query();
        InventSite inventSite;


        QueryBuildDataSource qbds = query.addDataSource(tableNum(ReferenceTables));

        qbds.addRange(fieldNum(ReferenceTables,ReferenceTablesType )).value(queryValue(ReferenceTablesTypeBaseEnum::MyField));

        tableLookup.addLookupField(fieldNum(ReferenceTables, Name ));
        tableLookup.addLookupField(fieldNum(ReferenceTables, Description ));


        tableLookup.parmQuery(query);
        tableLookup.performFormLookup();

        FormControlCancelableSuperEventArgs ce = e as FormControlCancelableSuperEventArgs;
        ce.CancelSuperCall();
    }

Can you help me with this, please?

Thanks and regards...


Viewing all articles
Browse latest Browse all 17532

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>