So in a picker in eWam / wynsure the field usually gets passed directly to some sort of OQL statement.
Hence, if I want to search for a field whose value ends in "asdf", I enter "%asdf" into the picker field.
My question is thus: from the picker, is there anyway to specify 'I want all entries that end in "asdf" OR "qwer"'?
If not, I would recommend that this become a feature as it would be very useful to be able to enter all that right in the text field.
There is currently no way to search multiple strings in a single field beyond using wildcards. One can do this easily by creating multiple fields in the picker.
Alternatively one could customize the picker as follows:
use a presearch string (that the user fills out),
parse that string for some element (like a pipe),
Break the string up and put each part in to off screen search variables.
You are still using multiple fields, but the user get's a different experience. Keep in mind the dangers of parsing out the user input, using something like or would work out very badly splitting up words, & could show up in a company name...
Related
I am working on some LotusScript code and came across this syntax to access a text field value: textField(0). I checked this field's properties in the design and it has the type of Text and doesn't allow multiple values. But why do we use the index to access this field value? I need to describe what the code is doing so it makes a difference between "get the value of textField then do something" vs. "get the first element of textField then do something".
The LotusScript expression document.textField is a shorthand form of document.GetItemValue("textField"). As explained in Designer Help, this expression always returns an array of strings for text or text list fields. That's why one has to use document.textField(0), or document.GetItemValue("textField")(0) for that matter, to access the first (and possibly only) element in the returned array.
An important thing to remember is that just because the field properties say that multiple values aren't allowed today, they might have been allowed in the past. Nothing gets "fixed up" in old documents if you change the properties in Domino Designer. Your code always has to consider that possibility.
And for that matter, even when the field properties do say that multiple values aren't allowed, those properties only apply when a user is editing the document using the defined form. An agent or code using any of the Notes APIs can always store multiple values in any text field.
That's why you always access item values through an array. It's not just a matter of "that's how the API works". It's a matter of how the underlying storage works.
And remember: Notes is schemaless. You have to always assume the following:
The item that corresponds to the field might not exist.
The item might be empty even if there's a validation formula that requires it to be filled in.
The item that corresponds to a text field might not actually be a text item.
The item can contain a list even if the multi-values property is not checked.
I am creating a Saved Search for my team where users can filter by different parameters but the most important one is a ‘Keyword’ field where we have multiple text strings separated by commas. Eg: One could be (Horses, Apples, Cows, Carrots, Balloons) and another could be (Apples, Cake, Silver, Horses, Bananas)
I want to be able to use the free text search field to look up all rows where I can find a relevant entry.
Eg. Let’s say I type “Apples” and “Horses”. I want to see all entries where these are found together.
I have tried setting the criteria to “Contains” but can’t seem to use operators in the input field. I have also tried to use expressions but got You cannot use an expression builder criteria filter as an available filter" as an error.
I’m not familiar with NetSuite but willing to learn. I was able to create this in Google Sheets. Since we already store our information on NS already, I want to find a way to do it there. Is there a way to achieve this?
Thank you.
When you create the saved search, you can just specify a default value that will be used in the initial search load (e.g. contains Apples). In the Available Filters tab, select the same filter and check Show in Filter Region.
When users run the saved search, they can change the criteria by typing into the field and pressing Tab after (if you press Enter instead of Tab, the results will be downloaded into a CSV file instead of being displayed in the page). In your example, they should type 'apples%horses' then press Tab.
Additional reference: https://www.sikich.com/insight/using-formula-values-as-available-filters-in-netsuite-saved-searches/
Update:
Use 'has keywords' instead of 'contains' in the filter. When viewing the results, separate keywords with a comma. Example: 'apples, horses'
I want to create a content model containing a list of dates of variable length. The only way I figured out how to do it is to create a new nested content model with one date field, and then include these single date entries as a reference list. The issue with this approach is that the date is not showing as the entry title. Instead, a list of dates is only displayed as a list of blocks all labeled "Untitled", which is very unintuitive, as shown in the following screenshot.
Screenshot of the current status
So the questions are: Is there a good way to display the date as Entry title, or is there another solution to include a list of dates into the content model?
I am investigating the use of UI Extensions to solve this, but maybe there is a simpler build-in solution to the problem, than a custom developed extension.
You can't specify the Entry title from date fields, but rather only from short or long text fields, so a UI extension would be the way to go. Add a short text field called title (and specify that this field represents the entry title) then create a UI extension which will put a string of the selected date from the date field into the title field. Check out https://github.com/contentful/extensions/tree/master/samples/slug for a good starting point.
I found that the usage of the extension library name picker is somehow difficult when it comes to one certain case: I'd like to display people alphabetically by lastname in the selection and need their fullnames in return.
So, for returning the fullnames, the dominoNABNamePicker is the logical choice, and it seems that
<xe:dominoNABNamePicker nameList="peopleByLastName">/xe:dominoNABNamePicker>
does exactly what I need - but the resulting list is sorted by lastname only; inside of a certain lastname "block", people are shown sorted by creation date, oldest entries on top.
The base view used for displaying the entries is the ($VIMPeopleByLastName) view in the names.nsf.
This leads me to my questions:
- can I sort the 'resulting' list somehow additionally by firstname and middleinitial before displaying it to the user, showing the nicely sorted result to select from?
- is there another data provider / parameter set which returns me the fullnames displaying a "Lastname, Firstname" selection of people? (e.g.
dominoViewNamePicker data provider only returns the labelColumn, which is the same shown to select from)
- can I simply add 'ascending order' sort option to the firstname and middleinital columns of the ($VIMPeopleByLastName) view, or will this have any negative effects somewhere else?(I know this will be a pain in future releases, but seems to be the easiest way so far... )
Any further ideas also appreciated...
I making a form which represents project. I'd like to make a field with autocomplete option, for example when I make new project and entering the name of the project lotus will look in existing projects (specified column in view) and suggests name. I need it to prevent creating two projects with same or similar name in user friendly form.
Thank you.
You can do that by adding field with type: Dialog List (with option Allow values not in llist) and as a possible values put
#DbColumn(""; ""; view_name; column_number)
If you want to avoid duplicate names, #dmytro's solution will actually suggest to enter existing names, what may be confusing to users.
What I would do is to lookup similar project names (anyone remembering #Soundex?) and show in computed for display field under the editable field. Only caveat: it will not refresh as user types in, and you need to refresh form to trigger the lookup.
You should also validate your form and do not allow to save it with existing project name (unless it is the same document - compare looked up UNIDS).