SuiteScript 2 joins and filters - netsuite

I am working on a suitelet, I have a working version in 1.0 but I need to convert to 2.0 as 1.0 lacks facility. In short, I choose an item, locate assembly items that contain it, I select a checkbox for each assembly I want to modify, I then select an item to replace the original item with. In the 1.0 I had a saved search that joined the item through the "member" sublist, I also pulled in the "line" that it was on. In 2.0 I can't seem to access the joined columns from the search, which I used to filter by the identifier 'memberitem' and pass in the internalid of the item. But for some reason it errors and states that it is "An nlobjSearchFilter contains invalid search criteria: memberitem." This is the column that is available in 1.0 to filter by item. Any help with this is appreciated.

Here is a sample of the 2.0 search. Nothing really changed with the columns and filters, so you should be able to just copy those over to the 2.0 search.
search.create({
type:search.Type.CUSTOMER,
title:'test Search',
id:'customsearch_testsearch',
columns:['internalid','someOtherColumn'],
filters:['parent','anyof',parentID]
});
Here is the URL to the docs (N/search Module). Hope this helps. Not much more I can do without a sample of the existing code.
On a side note, here is the doc that shows what type of search operators can be used with what types of fields: Search Operators. The field memberitem is a select list, so you can only use anyof or noneof with that field.

Related

How to use Power App Search on a LookedUp column in a SharePoint List

I am currently builidng a PowerApp and I am struggeling with a simple search function. I connected the PowerApp to a SharePoint list (see image 1).
The SP-List 'Projekt' consists out ouf:
Columns: Service | Car | Car_ID | Workitem
Type: Text | LookUp | LookUp | LookUp
[SharePoint List][1]
I try to filter the text by using search. As long as I am using search on Service, everything works as expected. But if I use search on one of the other columns, the code returns an error, saying "Wrong Column Type. Expects text type" (Image 2)
Search('Projekt', "Item1", "Workitem")
Error
I assume it is due to the LookUp type, but I am not sure. Has anybody takled this problem and knows a workaround? Very happy for any suggestions
Best Regards
Sorry, but I don't think this is going to work for you unless you change your underlying sharepoint list or use a collection.
The documentation on "Search" in powerapps say that "the column must contain text."
On most power platform applications, if you look into a Sharepoint list's lookup field or choice field, what you're actually looking at is called a "record," which is a single list that contains several items. Powerapps is expecting a string, but you're giving it a "record," so it's throwing an error.
I'd recommend you create a collection, and use that for what you're doing.
Try this:
ClearCollect(NewCollection, ShowColumns('Projekt', "WorkItem"));
Then, you should be able to do things like:
NewCollection.WorkItemColumn1.value ...

Adding a field to a table that is the result of a query to another table

In MS Access 2010, I have two tables - one with Candidates and one with Package Actions. The Actions are associated with the Candidates via the CandidateID field, which is an autonumber in the Candidates table. The Actions table has a date field for each action. I have a field in the Candidates field that I would like to display the action type of the most recent action associated with that particular candidate, but can't seem to figure out how to do it. I've tried implementing a subquery as a default value:
SELECT TOP 1 ActionT.ActionType FROM ActionT WHERE
(((ActionT.CandidateID)=13))
ORDER BY ActionT.DateCompleted DESC;
Obviously, this query on its own only returns the most recent action for candidate 13 but ideally I would like to replace the =13 with =CandidateID but I can't even get the field to populate with the result of the query as is. I've also tried using DLookup but got an error while trying to make that the default value. I've also tried using the button "Modify Lookups", pasting the query and the DLookup directly into the cell, and trying to change the type of the field from "Text" to "Calculated", all to no avail.
Novice MS Access user here, so I appreciate any extra explanations y'all may have.
Thanks In Advance.
EDIT:
Just to be clear, I'm not looking for a query, per se. I want to know how I can make the result of my query above always be the value of a field in the candidate table. (If my code above needs corrections, I'm open to that, but that isn't really my question.)
Example: Candidate A has several actions in theActionTable associated with him. They are ResumeRecieved, ResumeReviewed, and Interviewed. The date associated with Interviewed is the most recent, therefore in the CandidateTable, the status for Candidate A should be "Interviewed." We then decide to extend an offer, so we add an action to the ActionTable "OfferExtended."
The Status field in the CandidateTable for Candidate A should automaticaaly update to read "OfferExtended"
Inside your main SELECT STATEMENT, you need to have a nested SELECT STATEMENT descendingly ordered by DateCompleted to get the most recent DateCompleted for each CondidateId.
Below should do the trick for you:
SELECT con.Id,
con.Name,
(SELECT TOP 1 ActionType FROM ActionT
WHERE CandidateId = con.Id ORDER BY DateCompleted DESC) AS ActionType
FROM Candidates AS con

DbLookup Keywords

is there a list available with the possible keywords for the keyword parameter in the #DbLookup statement?
is there also an explanation available for those keywords?
Thanks
Mario
Look for the help topic for #DbLookup in the Lotus Domino Designer Help database which is part of your Notes client installation (and part of the Domino server installation). The following is taken from that documentation about the Keyword parameter:
Keyword. Optional. Keywords can be concatenated.
[FAILSILENT] returns "" (null string) instead of an error if the key cannot be found.
[PARTIALMATCH] returns a match if the key matches the beginning characters of the column value.
[RETURNDOCUMENTUNIQUEID] returns the UNID of the document instead of a field or column value.
You can also find the documentation online at the Information Center:
http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/topic/com.ibm.designer.domino.main.doc/H_DBLOOKUP_NOTES_DATABASES.html

WSS3 SP2 Search cannot find list item by number column

When I add a new column to a list in WSS3 (SP2, note: not MOSS), the search feature cannot find items by the values in those columns.
What I've done:
Added an issues list (built in)
Added a column called customid of type number to the list
Added a column called customref of type text (single line) to the list
When I add items, the search feature detects them (after indexing is run) by the title, Issue ID (built in), and customref. However, when I search by the customid, it returns no results.
I cannot find any documentation online which indicates that this is a limitation of WSS3.
Does anyone have any idea why this is happening?
Your time is much appreciated
basically you would have to create a managed property to achieve the functionality you are looking for but i'm afraid that you can not achieve in WSS alternatively you can use search server which is also a free you can find more details about search server at following links
http://technet.microsoft.com/en-us/library/dd183108(v=Office.12).aspx
http://technet.microsoft.com/en-us/library/cc297193(v=office.12).aspx

Joining sharepoint 2007 lists in a web view based on a common key field

So - I'm making a data view that is to contain a list. This list has a field that will be used to match up against two other lists. If there is an entry for this value, it should show the value from the other list, otherwise show a link to add a new one.
So, what I need to do is make a data source consisting of the rows from list 1, and fill in the Ticket field with a value from the Tickets table matching the ID value from list 1. The same should be done for the Change Type field.
Can anyone point me in the right direction to accomplish this? I've found a few tutorials, but they seem to be for showing all the data together and not match up on any specific columns for linkage.
Thank you
What you are aiming at is not available in SharePoint out of the box.
There are two approaches you can look at:
Create your own custom lookup field template for single/multiple field
selection with some sort of field
editor. Create your own controls and
program the associated code behind
logic.
Use some existing custom solutions. One such sample is on codeplex:
SharePoint Filtered Lookup Field

Resources