Skip to main content
1-Visitor
June 17, 2013
Solved

Fields Created based on Criteria

  • June 17, 2013
  • 2 replies
  • 1551 views

My question to the community, is it possible to have fields be automatically created based upon certain criteria? Right now, in my template I have to create the fields and then determine when they are visible based on a certain criteria. I would rather the field actually be created when the criteria is met instead of having to create a 100 redundant fields. For example, I have Row A with 5 fields once all 5 fields have been filled, Row B is created with the same 5 fields that would need to be filled out before Row C can be generated.

    Best answer by mrump

    Hi Anthony,

    Maybe you should "redesign" your data.

    I understand you have an item type "Template". These Templates can hold a volatile number of other certain data sets you would call "Row a" or "Row B" containing "identical" 5 fields.

    How About this:

    • Create a Type called "MyRow" with 5 fields
    • Create a Relationship field in "template contains", to relate "Template" and "MyRow" items and add it to the Template Item type.
    • Use use some trigger scripts that create and link "MyRow" Items automatically based on the value set in the Template.

    HTH Matthias

    2 replies

    1-Visitor
    June 17, 2013

    Hi Anthony,

    As far as I have seen, Integrity does not have the ability to dynamically create new fields, it can only show or hide existing fields. Creating a new field alters the structure of the backend database, so it would be a performance hit if users were able to create them on the fly.

    You might be able to get similar functionality using triggers, but I would recommend opening a support ticket to get recommendations more tailored to your specific situation.

    Hope that helps,

    Matt

    mrump16-PearlAnswer
    16-Pearl
    June 24, 2013

    Hi Anthony,

    Maybe you should "redesign" your data.

    I understand you have an item type "Template". These Templates can hold a volatile number of other certain data sets you would call "Row a" or "Row B" containing "identical" 5 fields.

    How About this:

    • Create a Type called "MyRow" with 5 fields
    • Create a Relationship field in "template contains", to relate "Template" and "MyRow" items and add it to the Template Item type.
    • Use use some trigger scripts that create and link "MyRow" Items automatically based on the value set in the Template.

    HTH Matthias

    16-Pearl
    June 27, 2013

    This is certainly the approach I would have recommended if this were a support ticket.

    If the process for doing this is unclear, then as Matt suggested, please contact PTC Integrity Support for more information.