3 Replies Latest reply: Feb 18, 2014 4:21 PM by KellyMayfield RSS

Nutrient Search

9435c65b-c3a1-414c-b799-0fec39718d19 Newbie
Currently Being Moderated

We are on V6.1.0.3.6. Is there a way to search for Nurtient Profile Specs with Nutrient "Trans Fatty Acid" or other Nutrients in the Nutrient Profile/Nutrion Panel Tab?

 

YB

  • 1. Re: Nutrient Search
    KellyMayfield Expert
    Currently Being Moderated

    There is a customization you can make to add new criteria to searches. This would be a customization so when you upgrade these changes will need to be re-applied.
     
    1. Request the file: Config/Core/EQTModelCustomExtensions.xml  from support for your specific release version.  This file is encrypted in your core release.  You will need to make changes to this file and replace the encrypted version.  In this file you can add additional criteria to any search models.
     
    2. Nutrients was actually the original reason for this customization our core search uses this file for the nutrient criteria you see today.

    You'll see in this file all of the existing nutrient criteria

     

    For example, add 2 new TableAliases for each new nutrient

    <ExtendEntityModel extends="Main Nutrient Profile">

     

    <TableAlias tableName="gsmNutrientItem" alias="caloriesPerGram"/>

     

    <TableAlias tableName="comStandardNutrientProperties" alias="caloriesPerGramNutrient"/>

    <TableAlias tableName="gsmNutrientItem" alias="caloriesPerServing"/>

    <TableAlias tableName="comStandardNutrientProperties" alias="caloriesPerServingNutrient"/>

    <TableAlias tableName="gsmNutrientItem" alias="totalTransFattyAcids"/>

    <TableAlias tableName="comStandardNutrientProperties" alias="TransFattyAcidsNutrient"/>


    Then add a new NumericProperty node

    <NumericProperty caption="Trans Fatty Acid" name="TransFattyAcid" forSearching="Yes">

     

    <FieldName>totalTransFattyAcids.PerGramMeasure</FieldName>

     

    <CriterionOperations equals="On" greaterThan="On" lessThan="On"/>

     

    <JoinLinks>
    <Link>specSummary.SpecID = totalTransFattyAcids.fkSpecID</Link>

     

     

    <Link>totalTransFattyAcids.fkNutrient = TransFattyAcidsNutrient.pkid</Link>

    </JoinLinks>

     

    <ConditionalExpressions>
    <Expression>TransFattyAcidsNutrient.GSMID = 'lblTransFattyAcids'</Expression>

     

    </ConditionalExpressions>

    </NumericProperty>

     

    Find the Nutrient GSM ID using a query like this:

    select ml.name, snp.GSMID from comStandardNutrientProperties snp

    inner join comStdNutrientPropertiesML ml on ml.fkStandardNutrientProperties = snp.pkid

    where ml.langid = 0 and ml.name like '%fat%'

     

    Make sure to remove the encrypted config file because it will win over the unencrypted.     In the next major release we hope to make this a true extension so it will be safe when you upgrade. 

     

    Hope this helps,

    Kelly

  • 2. Re: Nutrient Search
    Prashant J Newbie
    Currently Being Moderated

    Kelly.. I am unable to find the files you mentioned in your post in my environment.  Can you please email those files to me?

    I am specifically looking to extend this search model.

     

    SearchableView:Config:ProdikaSettings/EQTConfiguration/SearchableMultiSelectViews,PublishableSpecView

    ModelName=Trade Specification

  • 3. Re: Nutrient Search
    KellyMayfield Expert
    Currently Being Moderated

    You will need to request the unencrypted files from support.   Submit an SR and let them know the PLM4P version you need a copy of and they can send those over.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points