Support

Expand all | Collapse all

Export N/A if field is empty

Jump to Best Answer
  • 1.  Export N/A if field is empty

    Posted 03-06-2017 14:41
    Hello, We would like to export N/A if the rational field of a requirement is empty.  Is this possible using the custom word templates?  If not is there a batch type method to add this to all the requirements (e.g. if blank change rational to N/A)? The alternative is a very manual process.  Help!

    Thank you.

    ------------------------------
    Andrew Brown
    Galil Medical
    Arden Hills MN
    ------------------------------


  • 2.  RE: Export N/A if field is empty

    Posted 03-06-2017 16:56

    Hi Andrew,
    Welcome to the community! I hope what you've mentioned about a manual process isn't what I'm about to suggest to you. You can batch update a field in List View. The limitation is that these must be the same item type (but that sounds okay since you specifically mentioned requirements). Once all the items are selected, Actions > Edit will take you through the steps to update the field. 

    One thing you may consider is setting up your rationale field to be a required field and if it's a pick list field, add N/A to the pick list. (But if it is a text box field, it's not possible to set a default value.)



    ------------------------------
    Kristina King
    Jama Software
    ------------------------------



  • 3.  RE: Export N/A if field is empty

    Posted 03-07-2017 07:32
    Hello Kristina,

    Thanks for your response - from the description it doesn't sound manual to update all 200+ requirements with a few mouse clicks.  I followed your suggestion but it doesn't seem to work. The image below shows only one of the requirement fields can be batch updated (Subsystem Requirement Type pick list).  Our rational field is a rich text box and putting N/A in all of them would be great.  Am I missing something?  I would be happy writing an database SQL type command to update as well. Please advise.


    Batch Update

    ------------------------------
    Andrew Brown
    Galil Medical
    Arden Hills MN
    ------------------------------



  • 4.  RE: Export N/A if field is empty
    Best Answer

    Posted 03-07-2017 08:05

    Hi Andrew,

    The problem is you're attempting to use rich text box. Batch update can only be used for pick list and plain text fields (which is why you see only one option).

    If you need to keep this field rich text, I would next recommend using Round-trip to update (although that is more time-consuming, it's much quicker to fill 200 fields in Excel than to manually update them in Jama!).



    ------------------------------
    Kristina King
    Jama Software
    ------------------------------



  • 5.  RE: Export N/A if field is empty

    Posted 03-07-2017 13:15
    The round trip method worked for the rich text field.  Thank you.

    ------------------------------
    Andrew Brown
    Galil Medical
    Arden Hills MN
    ------------------------------



  • 6.  RE: Export N/A if field is empty

    Posted 08-29-2018 11:03
    I know this post is pretty old by now, but I thought it might be worth sharing what worked for me, especially in case anyone else needs to do the same thing.

    I too wanted to export "N/A" or even hide the field if possible, and wasn't willing to take "no" for an answer. The following field logic helped me accomplish what I wanted in a Word Mail Merge export:

    { IF { IF { MERGEFIELD rationale } = "" "" "rationaleNotEmpty" } = "" "" "Rationale:" } { MERGEFIELD rationale \* MERGEFORMAT }

    The second merge field ({ MERGEFIELD rationale \* MERGEFORMAT }) is simply telling Jama to export the rationale. Nothing special here. If the rationale field is blank, the output will be blank.

    The first merge field is for the title, which I want to disappear if the rationale field is blank, and consists of some logic that stretches the capabilities of Word's mail merge.
    • The inner field ({ MERGEFIELD rationale }) pulls the rationale field.
    • The inner IF statement ({ IF { x } = "" "" "rationaleNotEmpty" }) compares "x" against "".
      • If "x" is blank, the conditional returns blank.
      • If "x" is not blank, the conditional returns "rationaleNotEmpty".
    • The outer IF statement simply repeats the logic of the inner IF statement, this time returning "Rationale:" if the conditional is not blank.
      • At first glance, the inner IF statement should do everything necessary to remove the desired title ("Rationale:"). But this falls down in one particular instance: if the rationale contains double quotes. This confuses the conditional and returns the wrong values. Adding a second layer of logic forces the correct logic.


    Some examples of the output this generates:


    If the rationale field is empty:
    1.2.3 Requirement Description (ABC-REQ-456)
    This requirement shall not have a rationale associated with it.

    If the rationale field is empty:
    1.2.4 Requirement Description (ABC-REQ-457)
    This requirement shall have a rationale associated with it.

    Rationale:
    Here is the associated rationale.

    If the rationale field contains double quotes and the merge field logic doesn't handle it well:
    1.2.5 Requirement Description (ABC-REQ-458)
    This requirement rationale shall contain double quotes.

    double
    This rationale contains "double" quotes.


    ------------------------------
    Spencer
    ------------------------------



  • 7.  RE: Export N/A if field is empty

    Posted 08-30-2018 06:53
    Spencer:

    It was completely worth sharing this, thank you for your generosity! I will make sure to bookmark this for any "Best Practices" we would want to highlight in future Community articles. Love the grit involved in your 'wasn't willing to take "no" for an answer' part of your response.

    Best,

    ------------------------------
    Chloe Elliott
    Jama Software
    ------------------------------