Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Requery parameterized view
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00599263
Message ID:
00599281
Views:
15
Hi Sally.

aViewParameters(1,2) should hold the name of a variable to store in the view parameter such as "This.vp_TaxEntryId" since the STORE use macro substitution (&lutemp). You would create a property on the bizobj (vp_TaxEntryID) and set it to 0. The code in the postinithook for the first view parameter should look something like this -
This.addviewparameter("vp_TaxEntryId", "This.vp_TaxEntryId", "v_TaxLines")
HTH

Dan

>When I requery a view (v_taxlines) that has 2 parameters that are set up in my bizobj's aviewparameters array like:
>
>aViewParameters(1,1) = "vp_TaxEntryId"
>aViewParameters(1,2) = 0
>aViewParameters(1,3) = "v_TaxLines"
>aViewParameters(1,4) = .f.
>aViewParameters(1,5) = .f.
>aViewParameters(1,6) = .f.
>aViewParameters(2,1) = "vp_ClientId"
>aViewParameters(2,2) = ""
>aViewParameters(2,3) = "v_TaxLines"
>aViewParameters(2,4) = .f.
>aViewParameters(2,5) = .f.
>aViewParameters(2,6) = .f.
>
>I get an error in the requery code coming from kbizobj on the Store line in:
>
>IF TYPE(This.aViewParameters[lnCount,1]) == "U"
> STORE &luTemp TO (This.aViewParameters[lnCount,1])
>ENDIF
>
>Problem is that the query returned no records so the IF statement is true because vp_TaxEntryId is undefined. The code then tries to store "&0" (luTemp is set to aViewParameters(1,2) earlier in the code) to (vp_TaxEntryId) and produces an error.
>
>Does anyone know what I'm doing wrong?
>
>Thanks again for help!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform