Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EIP - How to display computed columns

Status
Not open for further replies.

pinsard

Programmer
Oct 4, 2010
4
BR
Hi,

I need to display a description for a produtct as soon as the user finishes entering the product reference, in an EIP column.

I use the BRWx::EIPManager.TakeEvent embed point to do my look ups and prime columns like item price etc, but I can't figure out how to update other columns.

In this EIP, the description isn't enabled for editing, as the user needs to inform a product reference, but the description goes on a second line of the list box, so the user can verify what is registered.

Any ideas?

TIA

Gustavo Pinsard - Brasil
 
Okay, I got it.

I wasn't reading the correct data from my look up table. Here's how to do it:

Code:
  IF EVENT() = EVENT:AlertKey OR EVENT() = EVENT:Accepted
    CASE SELF.Column
    OF 3     ! This is the reference column in the listbox
      UPDATE()

      ! This is the look up
      qProdutos.referencia = Queue:Browse:Items.strReferencia
      GET( qProdutos, qProdutos.referencia )
      IF NOT ERRORCODE()
        Queue:Browse:Items.ComIte:produto_id = qProdutos.codigo
        Queue:Browse:Items.ComIte:preco = qProdutos.preco
        Queue:Browse:Items.dTotalItem = Queue:Browse:Items.ComIte:produto_id * Queue:Browse:Items.ComIte:quantidade
        Queue:Browse:Items.strDescricao = qProdutos.descricao
        PUT( Queue:Browse:Items )
      END

    END
  END

Just wanted to share the "solution".

Gustavo
 
Hi Gustavo,

The best place is TakeCompleted(BYTE Force) - before Parent Call. You do not need a PUT(BrowseQueue) also.

Regards
 
Hi Gustavo,

Forgot to say that it is EIPManager.TakeCompleted(BYTE Force) - before Parent Call.

Regards
 
Shankar,

The TakeCompleted method will only fire when the user finishes with the EIP session.

This tip I pulled out from Bruce's Programming in Clarion's ABC, which I earned during one of brazilian's ConDevs.

I managed to mix this with Clarion's "How do I..." tip on "auto complete a field", and now the user is presented with a live update of the look up information as s/he types on.

Great stuff in EIP if you're willing to deal with a lot of embedding. Worh it, though.

Gustavo
 
Hi Gustavo,

If the calculated column is ALSO an EIP column, you need to then use the TakeAccepted or TakeEvent embeds of the EIP Field Class BUT if the calculated column is a NON-EIP column, calculating while editing offers nothing & EIPManager.TakeCompleted is a good embed for that.

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top