Brisbane Power Apps and Power Automate User Group

Please login or click SIGN UP FOR FREE to create your PowerPlatformUG account to join this user group.

Help Needed - Portal Liquid code

  • 1.  Help Needed - Portal Liquid code

    Posted Oct 29, 2019 07:39 PM
    Can anyone give me some tips?
     I want to pop a contact form when a user clicks on the full name of a contact in a list that is the contact form for the contact selected.

    What I have so far:
    I've created a fetch Xml Query to get the list of contacts I want (although at this stage I've not included the GUID, nor have I added an anchor tag)
    which displays a list of contacts.
    How do I set the 'fullname' attribute so that when it is clicked it will launch the contact entity form for that contact?

    could I use something like

                 {% assign contactToOpen = <['GUID']> %}
    to assign the the actual contact to a var, I can specify the form I want with

    {% entityform name: 'myContactForm' %}

    but how do I get the form to load populated with the contact?

    Current code
    <div class="container">
    <div class="page-heading">
    {% include 'breadcrumbs' %}
    {% include 'page_header' %}
    {% include 'page_copy' %}
    {% fetchxml my_query %}
    <fetch version="1.0" output-format="xml-platform" mapping="logical">
    <entity name="contact">
    <attribute name="fullname"></attribute>
    <attribute name="telephone1"></attribute>
    <attribute name="contactid" ></attribute>
    <attribute name="mobilephone" ></attribute>
    <attribute name="emailaddress1" ></attribute>
    <attribute name="address1_city" ></attribute>
    <order attribute="fullname" descending="false"></order>
    <link-entity name="qpoc_auth" from="qpoc_clientid" to="contactid" link-type="inner" alias="ag">
    <filter type="and">
    <condition attribute="qpoc_preferredfinancialadviserid" operator="eq" uiname="Tejinder Singh" uitype="contact" value="{CC6948EF-64E6-E911-A812-000D3A794392}" />
    <condition attribute="qpoc_authoritytype" operator="eq" value="976710000" />
    <condition attribute="qpoc_authoritystatus" operator="eq" value="976710000" />
    {% endfetchxml %}
    my size : {{ my_query.results.entities.size }}
    <table class="table">
    <th> Full Name </th>
    <th> Telephone </th>
    <th> Mobile </th>
    <th> Email </th>
    <th> City </th>
    {% for result in my_query.results.entities %}
    <div name="content" style="padding: 15px 30px 0 0; clear: both;">
    <div name="main-content" style="margin-left: 100px; max-width: 1000px;">
    <th> {{ result.fullname | escape }} </th>
    <th>{{ result.telephone1 | escape }} </th>
    <th>{{ result.mobilephone | escape }} </th>
    <th>{{ result.emailaddress1 | escape }}</th>
    <th>{{ result.address1_city | escape }} </th>
      <div class="clear"></div>
    {% endfor %}

    Alan Ball
    D365 Consultant
    The Unfair Advantage