Appian Community and Appian Academy are being upgraded. From July 24–August 3, the Appian Community will be in read-only mode. During this time, the site will be read-only and user registration will be disabled. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!

The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.

BBO Invoice can only be indexed into using square brackets or the index function

Certified Associate Developer

i'm trying to get the billNo of this invoice object 

 but when i try to retrive it  i get null values if  i use  the index function  if i don't use index function i get an error saying the error that i just wrote in the subject  the only way for me to get this information is just getting all    the values  how could i  get just one value ? bellow i'm gonna let you some examples of  what i see.

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer

    can you share a screenshot / xsd of BBO Invoice CDT?

    Since index didnt work, just to check,

    did you get the right value using square brackets, like ri!cliente["billNo"],

    and whats the output using the property function?

  • Hi there,

    As I see in the screenshot, you have a CDT with scaler and non-scaler fields. This causes problems sometimes.
    Try this. 

    ri!cliente[1].billNo

  • 0
    Certified Associate Developer

    xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:com:appian:types" targetNamespace="urn:com:appian:types">
      <xsd:include schemaLocation="%7Burn%3Acom%3Aappian%3Atypes%7DBBO_PayStamp.xsd" />
      <xsd:include schemaLocation="%7Burn%3Acom%3Aappian%3Atypes%7DBBO_PaymentType.xsd" />
      <xsd:complexType name="BBO_Invoice">
        <xsd:sequence>
          <xsd:element name="id" nillable="true" type="xsd:int">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Id @GeneratedValue</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="solicitedDate" nillable="true" type="xsd:dateTime" />
          <xsd:element name="solicitedBy" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=255)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="emitedDate" nillable="true" type="xsd:dateTime" />
          <xsd:element name="emitedBy" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=255)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="billNo" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=255)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="payStamp" nillable="true" type="tns:BBO_PayStamp">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@OneToOne(cascade=CascadeType.ALL)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="index" nillable="true" type="xsd:int" />
          <xsd:element name="comment" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=255)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="amount" nillable="true" type="xsd:double" />
          <xsd:element name="detail" nillable="true" type="tns:BBO_PaymentType">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@ManyToOne(cascade=CascadeType.REFRESH)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="caseID" nillable="true" type="xsd:int" />
          <xsd:element name="status" nillable="true" type="xsd:int" />
          <xsd:element name="createdDate" nillable="true" type="xsd:dateTime" />
          <xsd:element name="currency" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=255)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="department" nillable="true" type="xsd:int" />
          <xsd:element name="exempt" nillable="true" type="xsd:boolean" />
          <xsd:element name="taxes" nillable="true" type="xsd:double" />
          <xsd:element name="amountPlusTaxes" nillable="true" type="xsd:double" />
          <xsd:element name="clientId" nillable="true" type="xsd:int" />
          <xsd:element name="type" nillable="true" type="xsd:int" />
          <xsd:element name="autoRequesDate" nillable="true" type="xsd:date" />
          <xsd:element name="autoRequest" nillable="true" type="xsd:boolean" />
          <xsd:element name="NCF" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=255)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="QuickinvoiceId" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=255)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="facturaEnviada" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=255)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="DueDate" nillable="true" type="xsd:date" />
        </xsd:sequence>
      </xsd:complexType>
    </xsd:schema>

    this is the xsd of the cdt

    also  i send you the  print screen of the  expression rule that i obtain  the invoice from  these two codes "ri!cliente[1].billNo" , "ri!cliente["billNo"]" dont work either  i don't know what to do

    edit: property()  is getting the same result as index()

  • 0
    Certified Associate Developer
    in reply to Stefan Helzle

    thanks  for your support  that was my problem  i referred to the record type of the  invoice object

  • Oh yeah. I completely missed the space between the rule input type. My bad!!