Formula Help

Posted by Rollbase User on 29-Mar-2012 09:40

I would like help/advice on how best to accomplish the following in Rollbase. I have a field called {Type} that I need to populate based on multiple fields. If( {Field A} > 0 and {Field B} ="ABC123" and {Record Date } is on or after {Start Date} and the {Record Date } is on or before {end date} and {Field C} is not null/blank and {Field D} is null/blank) Return/insert "BCD" (any text) in the {Type} field Thank you

All Replies

Posted by Admin on 29-Mar-2012 13:32

Martin,



Are you available offline via email?



thanks

Posted by Admin on 29-Mar-2012 19:19

Hi,



For this:

If( {Field A} > 0 and {Field B} ="ABC123" and {Record Date } is on or after {Start Date} and the {Record Date } is on or before {end date} and {Field C} is not null/blank and {Field D} is null/blank)



If your using a formula, check it's return type if it's a string return, if your opting to use a trigger to populate a field after create/update, you might want to use an update field value trigger type (trigger types can be found in the documentation).



To properly translate the code block to a JavaScript statement you'll probably use something like:



For the strings (first if statement) note the use of .length method, this may vary from one developer to an

Posted by Admin on 29-Mar-2012 19:23

It would be best to discuss here since your questions will benefit the other readers =)

Posted by Admin on 30-Mar-2012 11:12

Martin, thanks again....for your help. Have a great weekend.

This thread is closed