Index() or dot notation?

Certified Lead Developer

Hi All,

I just wanted to know what's Appian best practices when it comes to retrieving data from a data subset. Should I index into the data subset or use dot notation? I noticed that when I use index() it doesn't throw an error for a null result set but does throws an error if I use dot notation. I know dot notation would cause a pink screen error on the tempo interface but debugging this would be quite simple since we know exactly where the error is coming from. For index(), this wont throw an error on tempo but will be harder to debug and would be a silent fail if a user doesn't raise the issue that that data is coming null when it shouldn't. 

  Discussion posts and replies are publicly visible

Parents
  • I agree that most of the time we want to use index to avoid any user-facing errors. However, in process models sometimes there could be benefits to using the dot notation. Let's say we have a data point that is required (100% of the time) in a non-time critical application and if for some reason it is null, we want it to throw an alert so that we would alerted and investigate the details further why this value is null. One could say you would still prefer to use index, but you would need to build in exception handling (& sending an e-mail?) into the process as well.
Reply
  • I agree that most of the time we want to use index to avoid any user-facing errors. However, in process models sometimes there could be benefits to using the dot notation. Let's say we have a data point that is required (100% of the time) in a non-time critical application and if for some reason it is null, we want it to throw an alert so that we would alerted and investigate the details further why this value is null. One could say you would still prefer to use index, but you would need to build in exception handling (& sending an e-mail?) into the process as well.
Children
No Data