Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Liquid template : get lookup value

Posted on by 6,203

Hi All,

I want to get the lookup value from the forloop, 1st condition is working but when i am checking minimum web role there is an error

{% for item in records %}		
			
{% if user.role_Keys contains 'partneradmin' and item.new_minimumwebrole contain 'partner admin'%}// i want to check  minimum web role (lookup field) is equal to 'Partner Admin'
 //logic
{% endif %}
{% endfor %}

any help would be appreciated.

Regards,

Shahbaaz

*This post is locked for comments

  • Suggested answer
    oliver.rodrigues Profile Picture
    oliver.rodrigues 4,052 on at
    RE: Liquid template : get lookup value

    contains instead of contain maybe helps you? also display the value in your form to see what is coming through

  • Verified answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: Liquid template : get lookup value

    Hi Shahbaaz,

    You need to pick name property of your lookup field so try this:

    item.new_minimumwebrole.name contains 'partner admin'

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans