In previous topics we saw that it is possible to use the dm_rc.rc_LookUpSearchFilter function to do searches with filters and other information.


Let's now add a clause, dynamically, so that a given lookup can only be used if other information has been filled in.


As an example we will use the "edLkpCIDADES" present in "frmCadCLIENTES".





The above attributes are effectively the same parameters as the dm_rc.rc_LookUpSearchFilter function.


Let's understand:


lkpfilter:quoted(uf=edLkpUFS<text>)


Apply a filter to list cities in the lookup search by filtering by state( "uf" ) selected in "edLkpUFS".


The "uf" information will be captured by the "<text>" property of the "edLkpUFS" field

Note: Depending on your search, you could use "<id>" to capture the primary key of "edLkpUFS".


The reserved word "quoted" applied to the sentence indicates that this content should be compared with quotation marks.

Eg: uf = "CE"



lkpfilter-empty:Select a UF<translate>


If the content of "edLkpUFS" is empty, the message "Select a UF" must be displayed, forcing the user to select a "uf".

The reserved word "<translate>" applied to the sentence indicates that this content can be used by "rc_Translate" to do the translation at runtime.


lkpfilter-order:


Apply a specific order to the list that will be displayed


lkpfilter-searchfields:codiibge


Add the dynamic search of cities, the field "codiibge".


lkpfilter-gridattr:


Add dynamic attributes to the lookup search grid.





Created with the Personal Edition of HelpNDoc: Easily create Help documents