October 1, 200817 yr Newbies Hi, This is probably very basic, but I can't figure out how to add text (.jpg) to a field in multiple records while retaining the original text in that field. Is there a way to do this? Thanks
October 1, 200817 yr You can use a replace field contents on your found set. Replace Field Contents [ YourField; Case ( not IsEmpty ( YourField ); YourField & "(.jpg)" ) ] I wasnt sure if you wanted the parentheses or not so I left them in.
October 1, 200817 yr You can do this via a Script. Do a Find for the records you wish to change "Found Set" Back up your File, before you try it. Go to Record/Request/Page [First] Loop Set Field [YourField; YourField & ".jpg"] Go to Record/Request/Page [Next, Exit after last] End If End Loop Lee
October 2, 200817 yr That is one method, but what Mr Vodka suggested is using the go to related records script step. This uses the power of FMP and it's relationships. You can isolate the "found set" by the relationship by selecting the option show only related. Once your in that table with the isolated records, you can use the script step called replace field contents instead of looping. He suggests using a case function to ask whether your field has any data, if it doesn't then you don't have the extension ".jpg" added. If it does have data, then the case function takes your field and adds ".jpg" to it. Hope this expands a little more. Mr Vodka, never thought about the case function in your suggestion..thanks for throwing that out there. Mike
Create an account or sign in to comment