Hi Amanda,
Check
Re: Macro substitution in sql views no longer possible Thread #
975746 Message #
976496>Hello all. I am attempting to design a security system for our software.
>I am using the Mere Mortals framework.
>In my design, the administrative user defines what records the normal users should see.
>
>Using a form, the administrator picks options to filter the record set for each user, and I store part of a WHERE statement built from the chosen options in a table for that user. For instance, if the administrator picks that user Betty should only see records in the city of San Franciso. I store (city.cid = " 13") for user Betty.
>
>When Betty logs in , I want to append that last statement on the end of my view. My views are all in code, so I define a vp_filter. On the search form for the view, I set the custom WHERE string into vp_filter.
>In my view, I build the SQL, Select * from
where ...
>...
>and ?vp_filter.
>
>I am getting a SQL error on this statement. Should this be a macro expansion instead? e.g. &vp_filter?
>
>Sorry for the long post, I hope what I am trying to do makes sense. (Or is even correct!)
>
>TIA
>Amanda
If it's not broken, fix it until it is.
My Blog Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement
Click here to load this message in the networking platform