Can i get a zml snippet to show a value that is generated by a function

Can i get a zml snippet to show a value that is generated by a function

Hi All,

Any help would be appreciated, i am trying to show the last record of data on a dashboard page and below is my code used but i don't think it will allow me.

Before you say i know the text value is incorrect, but i was trying different methods.

<%{
last_record = Digester_Data[ID>0] sort by Date_field desc;
a = last_record.Water_Temp;
{%>
<panel>
  <pr height='fill' width='fill'>
<pc width='100%' bgColor='#FFFFFF' padding='20px' hAlign='center' vAlign='middle'>
      <pr height='auto' width='auto'>
        <pc>
          <pr>
            <pc>
              <text value=a size='8' color='#FF4C2F' bold='true' textAlign='center' displayType='actual' decimalSeperator='.' numberScale='none'> </text>
            </pc>
          </pr>
          <pr>
            <pc>
              <text type='Text' value='Current Water Temp' size='3' color='#333333' textAlign='center'> </text>
            </pc>
          </pr>
        </pc>
      </pr>
    </pc>
  </pr>
</panel> 
<%}}%>

    Zoho Pagesense Resources

        Zoho SalesIQ Resources



              Zoho TeamInbox Resources

                Zoho DataPrep Resources


                    Zoho CRM Plus Resources

                      Zoho Books Resources


                        Zoho Subscriptions Resources

                          Zoho Desk Resources

                            Zoho Projects Resources


                              Zoho Sprints Resources


                                Qntrl Resources


                                  Zoho Creator Resources


                                    Zoho WorkDrive Resources




                                        Zoho Campaigns Resources

                                          Zoho CRM Resources

                                                      Design. Discuss. Deliver.

                                                      Create visually engaging stories with Zoho Show.

                                                      Get Started Now