Blackberry AutoCompleteField with first and last name - blackberry

I'm trying to create an autocomplete field in a blackberry app that uses both the first name and the last name of a record to check for prefix matches. My BasicFilteredList is an array of record objects, each having a first name and a last name. I considered adding two instances of the same object array, with mapping String arrays of first and last names like so:
filterList.addDataSet(1, firstNames, recordsArray, "records2", BasicFilteredList.COMPARISON_IGNORE_CASE);
filterList.addDataSet(2, lastNames, recordsArray, "records2", BasicFilteredList.COMPARISON_IGNORE_CASE);
This however retrieves the same object twice. if the person's first and last name begin with the same user-entered prefix in the autocomplete field. In short, I am trying to mimic the existing blackberry contacts autocomplete functionality, but with my own custom records. Any help would be much appreciated. Thank you.

Related

ExtJs6: Ext.ComponentQuery.query('#autogenerated_id') returns an empty array if the component has an itemId

I have some ExtJs component.
I set itemId for it, but id is autogenerated.
Now Ext.getCmp('autogenerated-id') returns my component.
But Ext.ComponentQuery.query('#autogenerated-id') returns an empty array.
But:
Ext.ComponentQuery.query('[id=assets-information-form-1918]') again returns my component. :)
I use ExtJs 6.5.3 classic.
It seems like itemId config property hides autogenerated id from Ext.ComponentQuery, so they become mutually exclusive.
I don't need other means for search or advice to set id for the component, to write letter to Sencha support or to write post on their forum.
I need:
Means to force my Ext.ComponentQuery.query('#autogenerated-id') to
find the Component for which getId() returns 'autogenerated-id'.
If it is not possible by design, I need a link to some documentation
describing this behavior, a link to some bug report, or a filename and line number in ExtJs sources + a little snippet copy/paste from there.
From the documentation
Summary Provides searching of Components within Ext.ComponentManager
(globally) or a specific Ext.container.Container on the document with
a similar syntax to a CSS selector. Returns Array of matching
Components, or empty Array.
Ext.ComonpentQuery.query('#itemId') returns and array. Your cold above is using the auto-generated id of the component. The # indicates to query based on the component itemId and not the component id.
Try
Ext.ComponentQuery.query('assets-information-form-1918');
which will return an array, as noted in the documentation.
Ext.getCmp()
This is shorthand reference to Ext.ComponentManager#get. Looks up an
existing Ext.Component by id
Therefore it returns the component object.
Ext.ComponentQuery.query('#itemId')[0] would return the first object in the array.
Ext.ComponentQuery is the Sencha preferred method because it is more powerful when used as it does return an array so you an also query items by xtype and other attributes.

Archer to Archer Data Feed in RSA Archer

Need to create Archer to Archer Data Feed that should set value of two fields as NULL in a cross referenced application, if the value of a field is Approved in first field. I am not getting how can I send a NULL value to the fields through data feed??
Archer doesn't have "NULL" value, but you still can get it done like this:
Step 1. Calculation. Open your data feed configuration and go to the source definition tab. Add a new field to the end of the list and make it calculated.Add formula to check value of 1st field that present in the data source and if it is equal to "Approved" then return empty string.
Something like this
=IF([field field] = VALUEOF([first field],[Approved]), "","SOMETHING ELSE")
The key here is to have this calculation return an empty string when you need it - "".
I suggest you to test your calculation in the calculated field in the application before you put it in the calculated data source field.
Step 2. Data feed mapping. Now you need to map new calculated field in your data feed to the field you want to remove value from. Go to the mapping tab in your data feed configuration and map the field. Make sure to selection options "Replace value" and "Empty Values" - this way existing value will be replaced even with empty values.
Similar approach works for me in multiple data feeds.
Good luck!
You can use novalue() function in the calculation
I don't believe there is a concept of NULL in Archer. The closest you're probably going to get is blank/empty. To do that, in the Data Map tab of your data feed, click the edit icon under Actions column. Check the box that Empty Values should be populated rather than ignored.
Assumption is that what is in the question is the only task required by the data feed.
Create report with the filter set as First Field = Approved
Fields to display should contain tracking id (tracking ID which is configured to System ID) of the Target app along with the Tracking ID of the Cross-Reference App.
In Source Definition add new source and give it an adequate name as clear or Null if you want
Where it says Raw Data Field in the drop-down, update this to static. Leave the source as not configured or unconfigured.
Map this newsource to the 2 fields that you are trying to clear. In Options set to Replace and uncheck add unknown and set to populate empty values.
Map the Tracking ID of the Target app and map the Tracking ID of the cross-reference.
Set key field definition for both apps to the tracking id
Set data feed to update only. Remove checkmark for create
If your are doing more than just clearing the 2 fields, then
Stan Utevski answer is mostly correct except you must have the field you are evaluating for "Approve" in the fields to display of your report. Otherwise the calculation will not validate.

How to update value in angular ui typeahead directive if no matching option is found

I've an array of objects containing title and salary which is used in typeahead directive.
I display department name and get entire object as value.
If none of the options match, I want user entered string to be converted to object still. Is there any way to update that?
This answer is pretty late, but I would just use ng-blur (to trap the end of the users input) along with a variable bound to typeahead-no-results. Then test if the variable is true in the method bound to ng-blur, and, if so, make an object out of the String supplied by the user and push it to your data source. Simple example found here.

QBFC: How do I query the customners by accountnumber?

Since Intuit has broken the QBFC reference today, I have to ask a question that I could normally look up. (I do not know who to complain to).
I normally query by list_id like so:
ICustomerQuery CustomerQueryRq = requestMsgSet.AppendCustomerQueryRq();
CustomerQueryRq.ORCustomerListQuery.ListIDList.Add(qb_list_id);
Is there a way to query by AccountNumber?
Thanks!
No, QuickBooks does not support querying by the AccountNumber field.
This is old, but maybe worth adding.
Create a temp "cached" object, containing all the properties you want to search for. Them when launching, and whenever customer changes are made, cache a list of custom QBcustomersForSearch objects with only the properties that you would want to use for the search.
class qbCustomerForSearch
property email as string
property accountnumber as string
property whatever as string
property QBListId as string
end class
Cache / create a list of these objects when and as needed, and search your list. Once located in your list, use the listID to identify the QB customer.
Cheers

jquery UI autocomplete - extended data?

I would like to use Jquery's UI autocomplete but with some additional functions: after user selects suggested item, I would also like to display additional data related with that item (for example if database of contacts are being searched, then I'd like to display contact's email, addres...) in some html element.
Is there a way to accomplish this?
Thanks in advance,
Ile
EDIT:
I'd like to provide more detail description of what I actually need:
When user starts searching contacts, as a result from database I would like to return contact's ID and Full Name. After user selects certain contact, then ajax function is called and it retrieves all details from selected contact using it's ID. But I don't know how to do following:
As a result from database return the ID and Full Name of contact as a JSON result (probably I would find the solution to get the right format, but I don't know how it needs to be passed to Autocomplete script)
How to handle the result data so that I display only full name and ID is used only when certain contact is selected, so that I can retrieve full details of certain contact
Have a look at its events: You can add a handler for the select event and display all your informations once it fires.
You can specify extra data in formatMatch function. The parameter must be some delimiter separated string. Later in .result function , which takes 3 arguments [event, data, formatted], you can retrieve it by splitting the formatted by the delimiter use and populate the required values.

Resources