cAliasWork-table alias.
AdvPL GuideIndRegua(cAlias,cIndice,cExpress,[xOrdem],[cFor],[cMens],[lExibir])Creates a filtered temporary index in the historical model.
The manual describes alias, index file, expression, optional order, filter, message and display flag. xOrder D indicates descending. This historical contract depends on the RDD and is not permanent SQL index creation. The example only prepares a block for an alias and exclusive test index name. (Sources: refs. 1–1.)
IndRegua(cAlias,cIndice,cExpress,[xOrdem],[cFor],[cMens],[lExibir])cAliasWork-table alias.
cIndiceExclusive test index filename.
cExpressKey expression.
xOrdemD for descending according to the manual.
cForFilter expression.
cMensProgress message.
lExibirControls progress display.
NIL according to the historical manual signature.
#Include "Protheus.ch"
User Function Ed488()
// ED_COD must exist in the prepared work table.
Local bIndex := {|cAlias,cIndex| IndRegua(cAlias,cIndex,"ED_COD",,"!Empty(ED_COD)",,.F.)}
ConOut(ValType(bIndex))
Return NilNo index is created until explicit block invocation. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
© 2026 Usina.BR. All rights reserved. TOTVS, Protheus, Microsiga and their respective logos are trademarks of their owners. AdvPL Guide is independent and uses limited, attributed excerpts justified by educational purposes. See the Terms of Use. Terms of Use
Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.