Javascript code is required for the below tasks

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
ramanjjilunaidu
Posts: 22
Joined: Tue Sep 05, 2017

06 Sep 2017

Hi Team,
It would be great help if anyone of you helped me on this task.

1. FIELD is not equal to "event complated", disable this field
2. if "field" == "one time" then set "runrate months" ="1".
3. "CURRENCY" is not blank, do these actions, i have taken screenshot of infopath formulas , please refer.
Thank you in advance.
Attachments
Infopath rule.PNG
Infopath rule.PNG (12.43 KiB) Viewed 1500 times

ramanjjilunaidu
Posts: 22
Joined: Tue Sep 05, 2017

06 Sep 2017

If i am not wrong for the first two points. i am writing it here please rectify if i am wrong.
1. fd.field("fieldname").value()!="event completed"; semicolon should be there and also "if" should be added or not.
2. fd.field.("fieldname").value()=="onetime"
"secondfieldname"==""1;

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

07 Sep 2017

Read this article on conditional hiding, disabling and setting fields, it provides examples of code similar to functionality that you need.

Additionally, you can refer to our JavaScript documentation for specific types of fields where you want to get or set the field value.
Cheers

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 8 guests