This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Jun 18, 2014, 2:22 PM
10 Posts

Cannot work --> Field exists in Form --> cannot be deleted

  • Category: Application Development
  • Platform: All Platforms
  • Release: 9.0
  • Role: Developer
  • Tags: @Formula
  • Replies: 7
You have a 'real' computed field: This means everytime you refresh the form the field will reappear. Also an empty Readersfield might be dangerous Instead of
        @If(WFSStatus != "Draft";@Return(@SetField(@ThisName;@DeleteField));"");
use
        @If(WFSStatus="Draft";@Username;"*");
Additionally it makes no sense to have an empty readers field --> if draft, then only this user can see it otherwhise everybody (=*). I would strongly recommend to make the field multivalue and add a role like Admin or ReadAll. This would be the right formula:
        @If(WFSStatus="Draft" ; "[Admin]":@Username ; "*");
Jun 19, 2014, 7:04 AM
10 Posts
computed field should be enough
a computed multivalue authors field with a formula like that should do it:
@If(WFSStatus="Draft" ; "[Admin]":@Username ; "*");
Jun 20, 2014, 3:50 PM
107 Posts
Partially disagree
If the Value formula of a computed field returns @Unavailable (or @DeleteField, for that matter), then the corresponding item will in fact not  be present on the on-disk document after you save the document. The same is true after running ComputeWithForm against the document -- as described in the OP's use case. So, a Readers field formula that returns @Unavailable will not leave the document unreadable.

Apart from that I totally agree with you that it is good practice to always have Readers fields contain at least a role that is reserved for admins (plus optionally one reserved for servers).

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal