web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Liquid single item wit...
Power Pages
Answered

Liquid single item with variable to pass

(0) ShareShare
ReportReport
Posted on by 2,595 Super User 2026 Season 1

Hello everyone,

 

I want to know if it is possible to include one liquid variable into another liquid variable.

I came across that idea to find a faster solution passing the {{ user.id }} to retrieve the full contact information from the contact entity.

 

The code I tried to use:

 

{%assign exampleUserId = xyz-123-xyz-123 %}
{% assign textsingle = entities.contact[' + exampleUserId + '] %}

 

 

 The way "+ exampleUserId +" is not working.

In the end I would like to have a working solution for that line:

 

 

{% assign textsingle = entities.contact[' {{ user.id }} '] %}

 

I could not find anything to pass a liquid variable into another one. Anybody knows how that can work?

Categories:
I have the same question (0)
  • Saud Ali Profile Picture
    812 Super User 2024 Season 1 on at

    Hi @Lucas001 ,

     

    Assuming that, you want to assign one variable to other. You can pass a liquid variable into another one using the "assign" tag. 

     

    Let's say you have two variables, "userId" and "variable2", and you want to pass the value of "userId" into "variable2". Here's how you can do it:

     

    {% assign userId = 'Hello' %}
    {% assign variable2 = userId %}

     

    Let me know if you're looking for something else.

     

    Thanks,

    Saud

     

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Verified answer
    Fubar Profile Picture
    17 Super User 2026 Season 1 on at

    Couple of things:

    • in the inner of the {% tag you do not use {{ you just use the the variable name
    • generally you would not include the the ' as your object is already outputting a string

     

    {% assign textsingle = entities.contact[user.id] %}

     

     

     Also the user object is already the contact object, so getting contact from user is pointless. The following is a quote from the doco

     

    user: Refers to the current portal user, allowing access to all attributes of the underlying Dataverse contact record. If no user is signed in, this variable will be null. More information: user

     

    https://learn.microsoft.com/en-us/power-pages/configure/liquid/liquid-objects

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 33 Super User 2026 Season 1

#2
sannavajjala87 Profile Picture

sannavajjala87 32 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 27

Last 30 days Overall leaderboard