10 Replies Latest reply on May 14, 2016 12:17 PM by smith7180

    Script step to go to a specific portal row


      Hi community,


      I am finally getting my head around scripting, thank to the great community here and a video series I am watching on Lynda.com (http://www.lynda.com/FileMaker-Pro-tutorials/Assigning-script-steps-buttons/161168/172340-4.html


      The one thing that really helped me from that course was when the course author said "try to think of script spots as a recipe" and that they "simply replace step that you would be able to do without a script".


      That might be obvious to many here, but it was quite a revelation to me.


      So, on to my question....


      I have this "add" button to add a Product_Item to the Line_Item_Portal on the same layout.  When I press the button, I want to be taken to the Portal Row who's field "Product_ID" = the variable is have already set "$Product_ID".


      How do I make FMP go to a portal row matching a criterion I set?




      "$Product_ID" = 7


      I don't want FMP to go to row 7 of said portal.  I want FMP to the record in that portal who's field "Product_ID" matches "$Product_ID" (In this case, row 2 - but it might be row 4 next time around, etc)




      Thanks in advance.