7 Replies Latest reply on May 3, 2013 9:19 AM by kennethpeace

    Problem with IWP but works in FM

    kennethpeace

      Title

      Problem with IWP but works in FM

      Post

           I created a Subscription table in Subscription.fmp12 file. Then Subscription table has a relationship with Customer table from another file named Customer.fmp12. They are linked by Customer_Email field.

           On the web, the user is presented first in Subscription layout that has a textbox for email and a button to Submit (i simplified a little here for illustration). When user key in his email and click submit, a script runs in the following sequence:

           1. Get the email to $Customer_Email and then Commit the Record.
           2. New Window and go to layout Customer.
           3. View as List, Show All Records, Enter Find Mode, Set Error Capture [on], Perform Find (Customer_Email==$Customer_Email) and Enter Browse Mode.
           4. SetVariable ($FoundCount; Get (FoundCount)]
           5. If $FoundCount = 0, then it means Customer table don't have customer record and proceed to create a new customer record, and continue to another layout and so forth.
           6. If $FoundCount > 0, then it means Customer table already have customer record and proceed to inform user, and continue and so forth.

           Somehow, the above works for FM but not in IWP. Few things i suspect but still can't pinpoint the issue are:

           (i) user security? I created a guestz account for user to easy acces via web browser to Subscription layout. At the back, both FM files were opened using an Admin level account of the same username and password. So i can't figure what could go wrong here.

           (ii) incompatible scripts? At first i suspect Perform Find script as it seemed like non IWP compatible. Sometimes it's grey off and sometimes not.. bit confused on this. But if i don't use Perform Find, i can't figure out what else to use for searching $Customer_Email.

           This is supposed to be an easy requirement... but somehow i'm lost. It works on FM and not IWP... Why? Can someone please help me out? Thanks in advanced!