'Null' record value?

'Null' record value?

  
Hello,

I have a screen in my application to which (for various reasons) I have found I need to pass a Record as a screen parameter. I can't pass an identifier since the Record is essentially holding some cached data that has not yet been saved to the database.

My screen preparation then has to take a different path of execution depending on whether this Record is present or not.

I can't find any way to check in my preparation action whether the Record has been passed or not - effectively I can't check whether the Record is null. Have you any suggestions?

Thanks,
Keith.
Hi Keith,

I see two ways of doing what you want:

1. You can compare each record attribute with its default value and determine if the record has been assigned.

2. You can add an extra input parameter (Boolean) to your screen called UseInputRecord and use it to choose your path.

Call me lazy, but I usually take the second approach. The downside is that you have to remember to set the input parameter whenever you need the record to be looked at. (Suggestion: make it mandatory - the validation will prevent you from forgetting to set the input parameter); the upside is that this approach will be cleaner if you add more attributes to that record.