Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Can i loop through XML data only display a specific attribute with another matching attribute?

Avatar

Avatar
Level 1
tarap80529187
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
tarap80529187
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile
tarap80529187
Level 1

11-07-2019

Hi,  i have run into this weird issue i am trying to solve.  I have a form that is an invoice that after it displaying the items displays the Net Total, Freight, Sate tax and Total. In the XML all four are set as <PriceComponent> but each with if own set of info. the form currently loops through and the displays the data for each but if the one object is set to 0.00 in our system it doesn't get include into the xml. so it doesn't display at all.

however we want it to show.  if there a way in LIveCycle to still loop through all the  set the freightPrice field  if its the <PriceComponent>with the Description ="Freight", if there is no Description ="Frieght" then set to 0.00. here is a snipet of the xml sectio.

    <PriceAndTax>

      <PriceComponent>

        <Description languageCode="EN">Total Item Net Value</Description>

        <MajorLevelOrdinalNumberValue>50</MajorLevelOrdinalNumberValue>

        <MinorLevelOrdinalNumberValue>2</MinorLevelOrdinalNumberValue>

        <TypeName languageCode="EN"> </TypeName>

        <CategoryName languageCode="EN"> </CategoryName>

        <PurposeName languageCode="EN"> </PurposeName>

        <Rate>

          <DecimalValue>0.0</DecimalValue>

        </Rate>

        <RateBaseQuantityTypeName languageCode="EN"> </RateBaseQuantityTypeName>

        <RateBaseMeasureUnitName languageCode="EN"> </RateBaseMeasureUnitName>

        <CalculationBasis>

          <BaseCode>3</BaseCode>

          <Amount currencyCode="USD">0.00</Amount>

        </CalculationBasis>

        <CalculationBasisBaseName languageCode="EN">Quantity</CalculationBasisBaseName>

        <CalculationBasisQuantityMeasureUnitName languageCode="EN"> </CalculationBasisQuantityMeasureUnitName>

        <CalculationBasisQuantityTypeName languageCode="EN"> </CalculationBasisQuantityTypeName>

        <CalculatedAmount currencyCode="USD">2735.00</CalculatedAmount>

      </PriceComponent>

      <PriceComponent>

        <Description languageCode="EN">Freight</Description>

        <MajorLevelOrdinalNumberValue>60</MajorLevelOrdinalNumberValue>

        <MinorLevelOrdinalNumberValue>3</MinorLevelOrdinalNumberValue>

        <TypeCode listID="2">7PR8</TypeCode>

        <TypeName languageCode="EN">Freight</TypeName>

        <CategoryCode>3</CategoryCode>

        <CategoryName languageCode="EN">Surcharge</CategoryName>

        <PurposeCode>4220</PurposeCode>

        <PurposeName languageCode="EN">Freight</PurposeName>

        <Rate>

          <DecimalValue>0.0</DecimalValue>

          <CurrencyCode>USD</CurrencyCode>

        </Rate>

        <RateBaseQuantityTypeName languageCode="EN"> </RateBaseQuantityTypeName>

        <RateBaseMeasureUnitName languageCode="EN"> </RateBaseMeasureUnitName>

        <CalculationBasis>

          <BaseCode>2</BaseCode>

          <Amount currencyCode="USD">2735.00</Amount>

        </CalculationBasis>

        <CalculationBasisBaseName languageCode="EN">Fixed Amount</CalculationBasisBaseName>

        <CalculationBasisQuantityMeasureUnitName languageCode="EN"> </CalculationBasisQuantityMeasureUnitName>

        <CalculationBasisQuantityTypeName languageCode="EN"> </CalculationBasisQuantityTypeName>

        <CalculatedAmount currencyCode="USD">126.00</CalculatedAmount>

      </PriceComponent>

      <PriceComponent>

        <Description languageCode="EN">State (%)</Description>

        <MajorLevelOrdinalNumberValue>90</MajorLevelOrdinalNumberValue>

        <MinorLevelOrdinalNumberValue>10</MinorLevelOrdinalNumberValue>

        <TypeCode listID="2">US1C</TypeCode>

        <TypeName languageCode="EN"> </TypeName>

        <CategoryCode>4</CategoryCode>

        <CategoryName languageCode="EN">Tax</CategoryName>

        <PurposeCode>5100</PurposeCode>

        <PurposeName languageCode="EN">Tax</PurposeName>

        <Rate>

          <DecimalValue>6.25</DecimalValue>

          <MeasureUnitCode>P1</MeasureUnitCode>

        </Rate>

        <RateBaseQuantityTypeName languageCode="EN"> </RateBaseQuantityTypeName>

        <RateBaseMeasureUnitName languageCode="EN"> </RateBaseMeasureUnitName>

        <CalculationBasis>

          <BaseCode>1</BaseCode>

          <Amount currencyCode="USD">2735.00</Amount>

        </CalculationBasis>

        <CalculationBasisBaseName languageCode="EN">Percentage (of one hundred)</CalculationBasisBaseName>

        <CalculationBasisQuantityMeasureUnitName languageCode="EN"> </CalculationBasisQuantityMeasureUnitName>

        <CalculationBasisQuantityTypeName languageCode="EN"> </CalculationBasisQuantityTypeName>

        <CalculatedAmount currencyCode="USD">170.94</CalculatedAmount>

      </PriceComponent>

    </PriceAndTax>

Accepted Solutions (0)

Answers (0)