Pages

May 21, 2012

How to make a field required using a conditional expression

This entry is part of the Conditional Expressions HowTo.

In this post I will show how to make the Remarks field required in the Receiving application when returning items. This is just an example and the same configuration can be used to hide or show any field based on a particular condition.
similar post describes how to achieve the same functionality using Data Restrictions.

Define conditional expression

Open Administration - Conditional Expression Manager application. Create the following conditional expression.
  • Condition: MATRETURN
  • Description: Return material
  • Expression: issuetype='RETURN'
  • Always Evaluate: False


Configure RECEIPTS application

Open System Configuration - Platform Configuration - Applications Designer application and edit the RECEIPTS application. Select the Remarks field of the Material Receipts section of Material Receipts tab and open the properties window. Click on Configure Conditional Properties button (on TPAE 7.5 it is in the Advanced tab) and configure it as follows.
  • Signature Option: READ
  • Security Group: EVERYONE
  • Property: inputmode
  • Value: required

Here is how the Conditional Properties properties should look like.


Now open the Receipts application you will see that the remarks field is now required when returning an item.



18 comments:

  1. hi,

    I have made a field mandatory through the application designer.But when when i try to import data from flatfile i'm able to import null value

    Request your support

    ReplyDelete
  2. This is the correct behavior. This article use the TPAE Conditional UI functionality that allows to dynamically change the presentation elements for an application based on a combination of the security groups the user belongs to, and the conditional expression being used.
    You should look at this posts to achieve what you are looking for:
    Set an attribute as required with no default value
    How to make a attribute required using Data Restrictions

    ReplyDelete
  3. I followed the above procedure for Incidents application, yet I can still save the record without populating the field that the condition expression made it a required field.

    ReplyDelete
  4. Hi Bruno and others, How can we set required to a londdescription field (in a separate multilinetextbox, not part of a multiparttextbox) using conditional expression? When you select properties, it says invalid binding opposite Signature Option. I am using Service Request Application with lookup table domain for SR.Description, and based on the selection, more details are required. Thanks.

    ReplyDelete
  5. Is there any way to set value to the field using Conditional Expression UI?

    ReplyDelete
  6. Bi Bruno,

    I hope you are doing well. Can we make objects read only if they are in workflow so that nobody can make any kind of changes in the document.

    Regards,
    Hamid

    ReplyDelete
  7. Hi Bruno,
    How can i use a condition expression to archieve the following statement;- when Any change is made to ticket dates (affected, reported, actual or finish), priority, ownership, or re-classification it should requires a work log entry. Changes to these fields then click on Save should result in a message advising user to enter a work log entry prior to saving the changes.

    ReplyDelete
    Replies
    1. I think you have to go with Java or scripting.
      Otherwise you may try to play with this variable in conditional expression
      :$OLD_[attrname] – The initial value of the attribute

      See this: http://maximodev.blogspot.com/2012/08/variables-dynamic-queries-conditional-expressions.html

      Delete
    2. Hi,
      the same requirement i also trying. But till now not got any proper solution.

      Delete
  8. Hi Bruno, thanks for all the great snippets for Maximo. Just wondered if you know how to make a meter reading a required field on work order tracking....?

    ReplyDelete
  9. Hi Bruno, thanks for all the great snippets for Maximo. Just wondered if you know how to make a meter reading a required field on work order tracking....?

    ReplyDelete
  10. This comment has been removed by the author.

    ReplyDelete
  11. Hi Bruno,
    I have a need to make packing slip a required field for selected rows in the "Select Order Items" dialog, for selected rows. I have set the packing slip field as readonly in this dialog, but it now wants a packing slip number for all rows regardless of if they are checked or not. So I am thinking conditional expression, but I can't find a way to set a condition on the "select row" check box, as it is not a matrectrans attribute. Is there anyway set a condition against that "select row" check box?
    Thanks

    ReplyDelete
  12. Hi,

    I am trying to make the remarks field on the Maximo Receipt screen a required field for Returns, and although I can do this using the conditional expression, this only works if the user opens the drop down to expose the detail of the return line.

    When the user selects the item to return and then hits save without performing any other action, the check is not carried out and the user is able to save without populating the remarks field. Any idea how to solve this?

    ReplyDelete
  13. Hi
    I have implemented a condition to make a field required in moving the status to particular status by means of signature options as provided above.
    It works fine when some changes are done and save button is clicked.

    But when I click on Change Status without making any changes the signature validation is not being applied.

    ReplyDelete
  14. Can conditional expression be used to make e-sig required when changing the status of a record? The condition would be based on a YORN field.

    ReplyDelete

Note: Only a member of this blog may post a comment.