Hello Tina,
It is not ideal but this topic provides a solution for that: https://forum.mendix.com/link/questions/93657
Hope it helps!
Hi Tina,
I have been trying this for a very long time on several levels within my application, without any luck. So in my experience its not possible and looking back costed it me way too much time (and money) than I should have spent on it.
ps: So if someone has the answer, we will get notified by this question.
Thanks,
Jan
I’ve not tried this, but I would think one way to do this would be to have a microflow behind a Deeplink that you can call that will show the data you need. You could then use the FormatString widget from the Marketplace to inject a hyperlink into your page HTML with the target set to _blank so when the link is called it opens the deeplink in a new window. For example...
<a href="${LinkVariable}" target="_blank">Link Text</a>
https://docs.mendix.com/appstore/widgets/format-string/
You would need to do this from a template grid or list view.
Let me know how you get on!
Hello,
Thank you all for the support and ideas, it really helped.
For me, it worked in the below steps;
1. I have used a DataGrid which has a button (called View) to view the details.
2. then I created a field that will store the URL (string format) in the database.
2. On click of this button, it calls a microflow which processes to create the URL then commits it, and then shows the popup.
3. This popup has a data view with the same entity I want to view and add widgets
1. URLRedirector widget to open the link
2. MicroflowTimer widget to close the popup automatically in 0 interval
4. The URL is then opened in the new tab, further, I had parameterized the URL hence I had to use Deeplink to view the selected item details.
Hi.
If anybody is searching and stumbles on this question, this is how it works for us (Studio Pro 9.24.31, so still making use of Deeplink):
In our case, a new dossier is opened in a new tab from a button in a DataGrid2 row.
export async function OpenURL_NewTab(url) {
// BEGIN USER CODE
if (!url) {
return Promise.reject(new Error("Input parameter 'Url' is required"));
}
// Native platform
if (navigator && navigator.product === "ReactNative") {
const Linking = require("react-native").Linking;
return Linking.canOpenURL(url).then(supported => {
if (!supported) {
return false;
}
return Linking.openURL(url).then(() => true);
});
}
// Hybrid platform
if (window && window.cordova) {
window.open(url, "_system");
return Promise.resolve(true);
}
// Web platform
if (window) {
window.open(url, '_blank');
return Promise.resolve(true);
}
return Promise.resolve(false);
// END USER CODE
If you can resort to a nanoflow (which can call a microflow for your logic if needed) you can use the OpenURL javascript action from the NanoflowCommons module. Give your detailpage a URL (like described here) Page Properties | Mendix Documentation , retrieve the ID of your object and build the correct URL and pass it to the JS action.