1 Reply Latest reply on Dec 13, 2018 8:22 PM by Feasood

    Expression for an Attachment on a Request Offering

    Feasood Rookie

      Hi Everyone,

       

      I have an Extended Task on a Request Offering and have an expression for what shows in the Task Details box.

      So far I have everything looking the way I want but am unable to work out the expression to show text whether an attachment is attached or not.

       

      Basically if there is no attachment attached, I don't want any text to display but if an attachment is attached then for it to show "See Attachment" or something.

       

      So far I have the following:

       

      $("Request Type - " + GetSRPValue(RecId,  "RequestType") + "\r\n" +  (if GetSRPValue(RecId,  "OrgUnit") == "Foodstuffs South Island"  then "Site ID - " + GetSRPValue(RecId,  "SiteID")  else "") +  "\r\n" + "Department - " + GetSRPValue(RecId,  "Department") + "\r\n\r\n" +  "Article Numbers:" + "\r\n" + GetSRPValue(RecId,  "ArticleNumbers") +  "\r\n\r\n" +  (if GetSRPValue(RecId,  "AttachSpreadsheet") == "true"  then "See attachment"  else "") +  "\r\n\r\n" + "Comments:" + "\r\n" + GetSRPValue(RecId,  "Comments"))

       

      The "AttachSpreadsheet" is the name of the field from the RO but using "true" doesn't seem to work.

       

      The result would look similar to this:

       

      Request Type - Add Articles

      Site ID - 1234

      Department - Grocery

       

      Article Numbers:

      1234

      4567

      7891

       

      See Attached Spreadsheet    <-- this would be blank if there was no attachment

       

      Comments:

      Yes please

       

      Hopefully this makes sense and someone can help 

       

      Many thanks

      Mike