December 28, 200718 yr I've got a table called Products and another table called Scans that are related by a field called ScanID. Via the FM PHP API, I'm connecting to a layout in the Scans table. When I use getField('ScanID') that works great because the field actually resides in Scans. However, I also have fields on this layout from the related Products table (ie. Products::ItemNumber) However, when I try that with getField('Products::ItemNumber') I get nothing back. Simply blank values. I'm also not getting any errors back when calling getField() on these fields. Any information on what I'm doing wrong would be greatly appreciated. Thanks!
December 29, 200718 yr An empty portal won't give anything, and if you try to address fields on a different TOG's layout will no ties let you see it. Perspective is obviously the layout and record from where the command is issued, and it picks the first related record only, and if it happens to be empty - shrug! --sd
December 29, 200718 yr Author I'm not dealing with a portal. This is just a field in a layout from a related table. When I work with the XML API myself instead of using the PHP API I can use TableName::FieldName to grab data from the layout without any problems.
January 3, 200818 yr Author Well, like usual, this was a case of me being an idiot. It just so happens that this record I'm working is one of the very few where this value that's coming back blank...actually is blank in FM! When I work with a good complete record (like I should be!) everything works great. Sorry for the bad post.
September 11, 201312 yr Newbies Hi, I am having the same problem for my CNS Audit Table. I have set a field (in the CNS Audit Table) to equal getField ( "DataTable::Field"). No error message results but the field is empty. There is a string value in the field being fetched from. The two tables are related. I can also fetch the data from the same field in another related field. I was wondering why I cannot getField into the CNS Audit Table. Could some please help? Thanks.
Create an account or sign in to comment