Page 1 of 1
How to pass the value for Hyperlink->HREF field in Field Setup in server event?
Posted: Fri Mar 15, 2024 4:31 pm
by yinsw
I have a field that store full URL in URL-encoded form. For example: https%3A%2F%2Fwww.mysite.com%2FGetReceipt%3Freceiptno%3D0116021K4A000
If I set the field in Hyperlink -> HREF field, the link won't parse properly. It needs to be decoded first by using php urldecode function so it will show as https://www.mysite.com/GetReceipt?receiptno=0116021K4A000
How can I update the value from server event? I can't find the correct property for it.
Re: How to pass the value for Hyperlink->HREF field in Field Setup in server event?
Posted: Fri Mar 15, 2024 4:56 pm
by arbei
You may try to use Row_Rendered server event to URL-decode the field object's HrefValue
property first.
Re: How to pass the value for Hyperlink->HREF field in Field Setup in server event?
Posted: Sun Mar 17, 2024 1:07 pm
by yinsw
Thanks. I did try earlier but I assigned to the wrong field. It's correct now for me. Thanks.
if ($this->RECEIPTURL->CurrentValue<>""){
$this->RECEIPTNO->HrefValue = urldecode($this->RECEIPTURL->CurrentValue);
}