Hi everyone, do we have any workaround to check for an Appian record which is null(does not have any key)? One way is check for a!keys and then check if empty, any other way?
So basically we had a use where there are multiple grid but they being sourced from the same record, let's suppose it be a room. So parent interface has parent room record variable and in child interface(contained each grid based on room type) we are sending parent by indexing the types. For deletion case, we are saving "null" in the same variable if it is new and if something already exist in db then update the isActive flag to false. Before saving the parent room record(which has all type of rooms) we were doing a reject to remove all the nulls. This used to work before and the "null" which we saved was still a null but now it is becoming a record type of null. Not sure if Appian fixed something on this behavior from there end or not.
Discussion posts and replies are publicly visible
You can use a!keys() for this...pass the recordype to this function and wrap a!isnullOrEmpty() around to return true or false. A generic rule can be created using these. Note that a!keys will return error with primitive data types like integer text etc, so this rule should have a record type as input always.
Hey Harsha, thanks! I just updated the above description and added details of our use case.
Please let me know if there is anything else which we can do while deletion itself.
What exactly you want to check while deletion?
If you have some column/record field which will always have data in it for new / updated rows then you can use an expression like below to get the parent Room record with all the rows minus the deleted ones. I have used primary key column (answerId) here but if you have new rows then id might be null so use some other field in your record. Give it a try and see if it works