Jana Posted June 25, 2007 Posted June 25, 2007 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
comment Posted June 25, 2007 Posted June 25, 2007 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().
Jana Posted June 25, 2007 Author Posted June 25, 2007 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.
David Jondreau Posted June 25, 2007 Posted June 25, 2007 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) )
Recommended Posts
This topic is 6421 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now