Forum Discussion

JimHarrison's avatar
Qrew Champion
3 years ago

OpenAsPopup use case

Leaving this here for future reference.

Rich Text field with formula URL to display a report as popup (ie as reference data while filling out a form)

URLRoot() & "db/" & Dbid() & "?a=q&qid=82&query={fid.EX." & URLEncode ([Related Record]) & "}" & "&ifv=1";

User clicks button and pop-up window appears.
The only information visible is the records of the report and a search field at the top.

To add a "Close" button next to the search field would be cool.

Full URL code with variables <<notes in double gt,lt symbols>>:

var text btnName = "View Records from the other table Related to this Record";
var text url = URLRoot() & "db/" & Dbid() & "?a=q&qid=82&query={61.EX." & URLEncode ([Related Records]) & "}" & "&ifv=1"; << the qid points to a report on the child table. "&ifv=1" removes all the extra bits in the pop-up>>
var text style = [styleReport]; <<this is a variable at the App Properties level that uses css to style the button>>
var text title = "<<put words here to describe the button to screen readers and mouseover>>";
"<a class='OpenAsPopup' data-height=600 data-width=600 title=\"" & $title & "\"style =\"" & $style & "\"href=" & $url & ">" & $btnName & "</a>"

Jim Harrison
transparency = knowledge + understanding : The Scrum Dudes
No RepliesBe the first to reply