Forum Discussion
QuickBaseJunkie
Qrew Legend
7 years agoHi Conner,
Have you found a solution? I'm a little confused by what you're trying to accomplish.
It looks like you want to open the same record only on another form in a separate window.
So essentially you'd be editing the same record on two different windows?
Would it be easier to create a section on the form with the info from the second form and show/hide it using a form rule and a checkbox (or button controlling a checkbox)?
The only other option I see is to have two 'versions' of the button. When no ID exists it will display "Save to View Patient History" which saves the record, then once an ID exists the button will display "Show Patient History" and will open the form in another window as intended.
var text SAVE =
"<a class='Vibrant Success' & onclick=\"$('#footerSaveAndKeepWorkingMenuOption').click();\" >Save to View Patient Health History</a>";
var text URL = URLRoot() & "db/" & Dbid() & "?a=dr&dfid=11&rid=" & [Record ID#]&"&ifv=10";
var text OPEN= "<a class='Vibrant Success' & onclick=\"$('#footerSaveAndKeepWorkingMenuOption').click();var a=window.open('"&$URL&"', 'newwindow', 'width=400,height=800');\" >Patient Health History</a>";
If(IsNull([Record ID#]),$SAVE,$OPEN)
-Sharon
Have you found a solution? I'm a little confused by what you're trying to accomplish.
It looks like you want to open the same record only on another form in a separate window.
So essentially you'd be editing the same record on two different windows?
Would it be easier to create a section on the form with the info from the second form and show/hide it using a form rule and a checkbox (or button controlling a checkbox)?
The only other option I see is to have two 'versions' of the button. When no ID exists it will display "Save to View Patient History" which saves the record, then once an ID exists the button will display "Show Patient History" and will open the form in another window as intended.
var text SAVE =
"<a class='Vibrant Success' & onclick=\"$('#footerSaveAndKeepWorkingMenuOption').click();\" >Save to View Patient Health History</a>";
var text URL = URLRoot() & "db/" & Dbid() & "?a=dr&dfid=11&rid=" & [Record ID#]&"&ifv=10";
var text OPEN= "<a class='Vibrant Success' & onclick=\"$('#footerSaveAndKeepWorkingMenuOption').click();var a=window.open('"&$URL&"', 'newwindow', 'width=400,height=800');\" >Patient Health History</a>";
If(IsNull([Record ID#]),$SAVE,$OPEN)
-Sharon