SQL Integration – Not clearing mapped field values on Refresh

How Can We Help?

SQL Integration – Not clearing mapped field values on Refresh

< Back

Problem:

There is an issue with SQL Integration Data Binding to Reference Label on refresh.

The issue:

  1. The form has a SQL integration to read data from a database table.
  2. When the form loaded initially on load the above SQL integration is executed and a reference label is mapped to a column from the database table, matching to a specific where condition.
    E.g.
    Table Structure: Emp Id, First Name, Last Name, Department.On Load, an SQL integration has been configured to pass in the Emp Id and to get the Department of the Employee. The fetched Department is mapped to a reference label.
    Let us say, the reference label is mapped to value of  ‘Finance’ Department on Load.
  3. Now the user can select a different Employee on the form.
  4. On Refresh, SQL integration has been configured to pass in the Emp Id of the selected Employee to get the Department of the Employee. The fetched Department is mapped to the same reference label that is mapped in Step 2.

There is a situation wherein there is no record in SQL Table matching the selected Employee. In those cases when the on-refresh logic is executed, ideally it should clear the value of the reference label but in cases where there is no matching record in SQL Table, the previous value of the reference label is not cleared.

Resolution:

To overcome the issue, set the reference label to empty before the on-refresh logic. This will empty the existing value.

Comments are closed.

This is the legacy version of the XMPro Documentation site. For the latest XMPro documentation, please visit documentation.xmpro.com

X