Hi, I would like the visibility of a data entry field in the item details tab to be conditional on the value of another field (such as a checkbox). I see conditional validations that are dependent on another field, but would like to be able to completely hide a field unless a condition is met. This would help make the data entry requirements clearer to the user during item creation/editing, rather than getting an error message after clicking "save". Is this functionality currently available? If not, I can submit to IdeaStation. Thanks!
Solved! Go to Solution.
Solved by bastien.mazeran. Go to Solution.
Hi,
This feature you are looking for is currently not available. Please submit this feature request to the PLM 360 Idea Station.
What you can however do at this time is to return some feedback to user when checkbox is selected. The field that depends on the checkbox field could become a computed field that checks whether checkbox is selected or not and displays some text accordingly.
The computed field syntax would be similar to this provided the checkbox item is called CHECKBOX.
Hi Ty,
Yes. You can leverage HTML <span></span> element in your computed field to change the text color, font style and weight.
Please refer to this URL for further details:
Regards,
Thanks, that is good stuff. I was able to make red, bold, italic text using the following:
'<span style="color:red; text-transform:uppercase;font-style:italic;font-weight:bold;">MUST MAKE CATEGORY SELECTION</span>'
However, I'm trying to do a mashup of HTML with a CASE structure and not having any luck.
Here is my "code".
The "CATEGORY" field is a pick list. The intent is for the computed field text to be green if a selection has been made in the CATEGORY field. If a CATEGORY has not been selected, then the red warning text should appear.
With the above code, my text is simply returning the default, currently set to "test". Any suggestions on the code, or am I bumping up against a code limitation?
Ty,
Could you please try with this WHEN statement?
WHEN (CAST(CATEGORY as Float) = -999)
My testing indicates that when nothing is selected in the picklist, the category float value is equal to -999.
I was able to get the HTML work (without the CASE structure), but only during cloning. I don't want the computed filed to be visible when viewing items, so I have the field visibility set for "edit" only. However, it does not show during creation, only editing or cloning an existing record. Shouldn't this also work during creation?
Hi Ty,
Maybe the null selection in your picklist does not return -999 in your case. To determine the value here is what I used in my computed field:
CASE
WHEN (CAST(CATEGORY as Float) > 0)
THEN CATEGORY
ELSE
CATEGORY
END
This returns the float value associated with the selection you made in your picklist.
I suspect that the computed field does not compute until the item is created, therefore I cannot get the behavior I want (HTML) during Item creation. Is that correct?
Hi Ty,
Computed fields are only "computed" when you save the item.
Hello,
I am trying to use computed fields to display a message to the end user, when a particular field is blank after save.
I am trying below code:
CASE
WHEN APPROVER IS null THEN 'tEST'
ELSE 'TEST 2 '
END
but i can't get the message to display on save, and didn't get any error.
Thanks!
Hello Harish,
This is working fine for me. I could edit / save and see the value in the computed field or simply refresh the page. Have you checked if you have scripts that write to the computed field by mistake? I would also ask that you double check the field ID value of the approver field.
Thank you,