Jump to content

Updating Virtual field in HTML BLOCK


Recommended Posts

I posted this in General Questions but I think it is better suited here...

I have a virtual field on a table view detail screen that contains a single value SELECT statement, fetching a street address,  using an emp ID retrieved from a dropdown on the same form.  I use this street address in an HTML Block to retrieve and display a google map with the fetched address.  It all works fine except when the user changes employees on the dropdown and the virtual field updates with the new address, the reference to the virtual field in the HTML BLOCK does not update.  How can I ensure the virtual field reference in the HTML BLOCK updates in real-time?

HTML BLOCK:

NOTE  - [@calcfield1] is a static street address.

<script type="text/javascript">
// Popup window code
function newPopup(url) {
 popupWindow = window.open(
  url,'popUpWindow','height=600,width=900,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes')
}
</script>
<a href="JavaScript:newPopup('http://maps.google.com/maps?saddr={[@calcfield:1]}&daddr={[@cbParamVirtual1]}');">Map Route</a></p><font color=#a52a68>

Thanks for any suggestions

Doug

Link to comment
Share on other sites

12 hours ago, HeyItsDoug said:

and the virtual field updates with the new address, the reference to the virtual field in the HTML BLOCK does not update.

Maybe try adding another Calculated Value to the form. Just make the Calculated Value's value to be equal to the Virtual Parameter's value. And use it in place of the cbParamVirtual1 in your anchor tag.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...