June 25, 200718 yr Hello there, I'm getting the following result: ?,?,Job opened. from the below function: Case (not IsEmpty ( Comments ); GetNthRecord (Comments;3) & "," & GetNthRecord (Comments;2) & "," & GetNthRecord (Comments;1);"1") Since I'm trying to extract text from multiple related records, it is resulting in a ? mark when there is no second or third related record created. Otherwise, I get the notes I'm looking to compile. Any help how to amend the function to make no ? mark appear there is nothing in the related record field? thanks jana
June 25, 200718 yr This is rather confusing, because: 1. You indicate version 7, yet there's no GetNthRecord() function in version 7. 2. You say you are trying to extract text from multiple related records, but Comments does not reference a related record; something like Related::Comments does. In any case, IsEmpty ( Related::Field ) referes to the FIRST related record only. I am guessing you want to check how many related records are there, by using Count() instead. In version 8.5, you could probably use the List() function instead of repeated GetNthRecord().
June 25, 200718 yr Author Sorry yes, I am on 8.0v3 here at work. How is the function laid down Case (not IsEmpty ( Comments ); List (Comments;3) & "," & List (Comments;2) & "," & List (Comments;1);"1") Is that correct right? I'm not seeing that in the functions list.
June 25, 200718 yr In version 8.5, you could probably use the List() function instead of repeated GetNthRecord(). Sorry yes, I am on 8.0v3 here at work. I'm not seeing that in the functions list. I've only given this the eyeball test, but try it out... Let([ comments1 = GetNthRecord(Comments;1); comments2 = GetNthRecord(Comments;2); comments3 = GetNthRecord(Comments;3); ]; Case( not IsEmpty(comments3); comments3 & (Case ( not IsEmpty( comments2) or not IsEmpty( comments1); ", ") ) & Case( not IsEmpty( comments2); comments2 & Case( not IsEmpty( comments1); ", " )) & Case( not IsEmpty( comments1); comments1) )
Create an account or sign in to comment