Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Lookup value type #30

Open
p333ter opened this issue Jan 22, 2020 · 1 comment
Open

Missing Lookup value type #30

p333ter opened this issue Jan 22, 2020 · 1 comment

Comments

@p333ter
Copy link

p333ter commented Jan 22, 2020

Hi there,
your library is awesome. But could you pls add ILookupFieldExpression as type Lookup? :)

@andrei-markeev
Copy link
Owner

andrei-markeev commented Nov 9, 2021

Hi, thanks, appreciate your feedback!

However, I am a bit confused of what you're trying to achieve, could you provide more details please? Example query that doesn't work or smth like this?

Lookup field points to a field in another list, and usually that field is of type Text/Boolean/Number/etc., that is why CamlJs has ValueAsText(), ValueAsBoolean(), ValueAsNumber(), etc. for Lookup fields. I think it should cover all scenarios already.

And if you need the ID of the Lookup field, it is exposed through Id() and is generating type "Number", which is the most correct way to handle it.

You can find all kinds of incorrect queries in internet of course, and SharePoint handles those gracefully most of the time, but it's better to use correct queries because incorrect ones behave quirky sometimes, returning incorrect results in some cases. The only actual use case I know of where you really need Type="Lookup" is when doing list joins, but CamlJs handles that correctly, you can find an example in the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants