Need some clarification on operator symbol
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2017 08:00 AM
I have 2 sets of statements
if(current.u_rca.nil() && current.u_rca_attached)
{
current.u_rca_attached = 'false' ;
This code is getting executed in a business rule where the condition is if u_rca_feild is nil and u_rca_attached field which is selected (Check box) on the incident form , the u_rca_attached field will also turn to false (uncheck) once we save the record , so my questions are
a) Can we use current.u_rca_attached === "true" in the above line ?
b) If no , why not ? I tried using point a in the code but it did not work.
c) so is === operator means equal to or something else ?
d) does it have a different meaning in client script vs business rule ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2017 08:08 AM
Thats my 2 cents here,
=== matches the type as well as value whereas == just matches the value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2017 08:22 AM
== and === are pretty similar, they are used in condition statement to check if a value is equal to another one
ie:
if (a==b)
= is used to assign a value to a variable
ie:
var a="hello";
cheers