
Posted: 2018-01-30 07:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Why can't I use link statement to query adapter items in setValues processor?
I'm trying to get a specific value Item from the CustomSetValues Data adapter. When I use the normal processor adapter I can use a link statement to query it, like this
var guestInRoom =DataAdapter.ValueItems.FirstOrDefault( x => x.AlternateId == folderRoomHotel.AlternateId + "/GuestInRoom");
But the CustomSetValues adapter won't allow me to, how should I get a specific valueItem from the adapter list other than a foreach loop ?
Authentication Failed.
- Authentication Ticket Mismatched, failed authentication.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Hi James,
Can you give us more details about how it is not letting you? Are you receiving an exception, or is the method simply not available to you?
Regards,
-Jeff

Posted: 2018-01-30 07:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Hi Jeff,
The Methods for the list are not available. So I have no way to query it.
Thanks the quick reply.
James
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Hi James,
Can you share your class with me so that I can take a look? Feel free to send it via email. As far as I can tell, something like the below should work just fine.
Regards,
-Jeff
public class CustomSetValues : MongooseSetValuesProcessor
{
protected override ResultType SetValue(ValueTypeStateless item)
{
var someValueItem = DataAdapter.Values.FirstOrDefault(a => a.AlternateId == "some id")
base.SetValue(item)
}
}

Posted: 2018-01-30 08:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Here's a screen shot of the available methods the query methods are not present. The standard data adapter has options for FirstorDefault etc as your example shows.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Hi James,
I think you may be missing some "Using" statements. Please make sure that:
using System;
using System.Collections.Generic;
using System.Linq;
Are also being referenced in your code.
Regards,
-Jeff

