WHen your refer to a repeating field with this syntax: TableOccurrenceName::RepeatingFIeldName, you are referring to the data in the first repetition of the repeating field in most cases.
I would recommend that you not use repeating fields for this purpose but to replace them with a related table where each record takes the place of a repetition in the current setup. That not only will eliminate the issues with your IF function, but also makes for a much more flexible data structure.
Thank you Phil, I would relay that to my friend. One more question, I wrote a script for my friend's project which would create a new record but it didn't work properly, the Job ID is incrementing correctly but the field values in the portal won't empty and if I change something it will also appear in the first record that was created. Part of the script is "New Record/Request", is it possible to have those fields in the portal to empty out without afffecting the previous record created so that users can add items in the field again but having a different Job ID?
Go to Layout["LAYOUT NAME"(TABLE NAME)]
Go to Record/ Request/Page [Last]
Set Variable ........................
Set Field [TABLE NAME; Var + 1)
All you need to create a new record is New Record/request in a script or new record from the records menu. Job ID should be an auto-entered serial number so just the act of creating a new record should be all that's need for a new record to receive a new and unique jobID value.
I can't tell from your post what that has to do with a "Portal" as that emplies a relationship to a related table. If a portal displays the wrong data, either your relationship is incorrect, a portal filter is incorrect or a record or record does not have the correct value in a match field.
Thanks Phil, I got it working now. You were right about the use of JobID as being an auto-entered serial number and it was in the relationship of the tables where the problem occured. Again, thank you so much that for more than 2 months I've been using FileMaker I've learned a lot specially here in this forum.