1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to get value of a data source field in SmartViewer

Discussion in 'Development' started by lukas88, Apr 11, 2012.

  1. lukas88

    lukas88 New Member

    When I populate my SmartViewer using a SmartDataObject the fields in the SmartViewer are "data source fields" instead of "FILL-INS".
    Can anyone help me figure out how to reference these fields. If they were "FILL-INS" then I could just refer to them by their variable name.

    e.g. MESSAGE "The value of the field is: " + FILL-IN-1.

    How should the above line work when we are dealing with data source fields.

    Thanks.
     
  2.  
  3. RealHeavyDude

    RealHeavyDude Well-Known Member

    You don't tell anything about the Progress/OpenEdge version you are using. As you mention SmartDataViewer I guess you are talking about the ADM2 or Dynamics - but which one?

    Heavy Regards, RealHeavyDude.
     
  4. lukas88

    lukas88 New Member

    Hi, it's ADM2.
     
  5. RealHeavyDude

    RealHeavyDude Well-Known Member

    Actually they are FILL-INs. It's just that they are tied to a Temp-Table field. In the internal procedure displayFields of the class super procedure src/adm2/viewer.p you will see more details on how they are populated.

    It depends on what you want to display: The SCREEN-VALUE of the widget (which is a FILL-IN or a procedure - in case it is a SmartDataField) or the value in the data source which would be in almost all cases the SmartDataObject.

    Case 1 - retrieve the value from the widget:
    You can use the internalWidgetHandle API in src/adm2/viewer.p class super procedure of the SDV to retrieve the widgets handle and depending whether it's type is widget or procedure you either access the SCREEN-VALUE attribute directly or invoke the getValue function when it is a procedure.

    Case 2 - retrieve the value from the SDO:
    You can use the columnValue API in src/adm2/dataextcols.p class super procedure of the SDO to retrieve the value.

    Heavy Regards, RealHeavyDude.
     
  6. lukas88

    lukas88 New Member

    Thanks for that. I will investigate.
     

Share This Page