Jump to content

Java Script Rule In Update Form


Recommended Posts

In a update form, can i block user update certain field based of other values.

like if there is "Document" and "Documents remarks", where user will upload file in "Document" and will put remarks in "Documents remarks" (Approved/ Rejected/ On Hold).

I want to disable the editing option of "Document" on the basis of"Document remarks" . If "Document remarks" is approved then user cant update the "Document" Filed .In form i already made rules on "Document remarks" on basis of different value. It is not giving access to create a new rule. Is it possible or any way arround?

Link to comment
Share on other sites

Hi @edujobs2k18,

Yes, if you already used a field in a rule, you can no longer use it. What I would suggest it to create a simple JavaScript that will get the value of "Documents Remarks", and if the value is "Approved" then you can disable the "Document" field.

Note: You need to make sure that the "Documents Remarks" field is visible or in that form so we can get the value.

Regards,

@IMDora

Link to comment
Share on other sites

Hi @edujobs2k18,

Are you referring to your script for TimeStamp or the one for the Update Form? If you're referring to the script above, you can implement that by editing your DataPage and follow the steps below:

a. Add a Header and Footer.

b. Go to the Header and disable the HTML editor by going to the Advanced tab and unchecking the box next to "Enable HTML editor".

c. Click the Standard tab.

d. Add the script that you have.

Let me know if you still need help on the Update Form.

Link to comment
Share on other sites

Hi @edujobs2k18,

 

Please know that you may be able to select DocumentRemarks in more than just one rule (given that it is not a Display Only or Hidden element type) (*For complete list of Limitations, see Action Limitations in this documentation).

DocumentRemarks can also be used as a Criteria, even if there is an action that modifies it.

Lastly, you may only use the field Once as an action target.

ForumXX.thumb.png.5634abf37711517d87ea0fb98af34f32.png

 

A possible reason why you can't select DocumentRemarks as a Criteria is that maybe it's set to be a Hidden or Display Only field. If this is the case, let's just make it a regular Text field, then use JavaScript or CSS to hide or disable that field.

 

A possible reason why you can't target the Document in an action is because it has been used in an existing Rule. If that is the case, just find the existing rule, then add a new criteria to satisfy your condition (or revise your criteria set with converse condition statements).

 

Hope this helps

` DN31337

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...