Quantcast
Channel: Mendix Forum Questions
Viewing all 83469 articles
Browse latest View live

Mendix Desktop Modeler stuck on "Downloading App"

$
0
0
I am running the Mendix Desktop Modeler 7.22.2 on Windows 10. When I try to download an app it hangs on the “Downloading App” window. However, everything works fine if I create an app using the desktop modeler and then commit it to Team Server. The issue is only when downloading an app that already exists in Team Server. Please see this screenshot https://ibb.co/HD80MkF      

Building deployment package stalls

$
0
0
Just this morning building a free app stalls in the build, more people have this?  

OQL Query based on created by

$
0
0
Hello, I am trying to write a OQL query based on the created by. But in the boject attribute i can see only change date not change or created by. how can i achieve it?  

Problem during deployment: Are SQL Errors the cause of this?

$
0
0
Hi everybody, I copied an project to a new one, works fine when I run it locally. When I deploy it to the free mendix cloud, I'm not able to deploy the application. Errors occur during deployment. Viewing the log I can see the following errors (besides the error that the database should be updated. “ERROR: duplicate key value violates unique constraint "administration$account_pkey" “ Occurs multiple times.  I also see some data  during deployment so could it be that the tables aren't empty during deployment? I've no clue how to tackle an error like this. Funny thing is that this application is a copy of one that IS deployed on a cloud environment and is able to receive updates, so I'm clueless :-) Hope you can help! Cheers and all the best! Laurens

Mendix DatePicker not working properly on Resolution - 1600x900 & 1366x768 with 100% browser size

$
0
0
HI Team, Actually I’m facing one issue with mendix date picker, It’s not working properly on responsive pages

Schedule event is not running

$
0
0
Hello, I have setup a schedule event but this is not running how can i check that event ran or not?

Is there a way to add ".active" to a button it if is links to the page we are currently on?

$
0
0
Hi g'uys,   most of you are familier with the Menu that has active states, Tabs that have active states. Is it possible to create a custom menu that has active state. (no tabs due to performance)  is there a way to use buttons but give the button an active state? Based on  page name? or last clicked? Having the menu in a single snippet is also a scalability requirement (atm this has been solved by having 7 snippets, but if naming changes, having to change 7 snippets isnt the best solution) Becuase the button open a new page, The best solution that I can quickly think of is "if button links to the current page we are on give it class "active". is this possible? Maybe with microflow?  

Driving an Enumeration List from a seperate Database Table

$
0
0
I am trying to drive the content of an Enumeration List from a seperate database table.  Cant see a way of doing this in the Web Modeler. Can this be done in the Desktop modeler or by any other means? also is it possible to have a Multiselect Enumeration feature? Thoughts welcome. Daryl

Tooltip for a radio button

$
0
0
Hello, i want to show a tooltip if you hover over a radio button. I installed the widget “bootstrap tooltip” and it worked for textboxes. But if i want one for my radio buttons it doesnt seem to work anymore. I typed the right target element  classname and tryed almost every option.   Does anybody have experience with getting a tooltip for a radio button?   thanks

Drop down menu not closing

$
0
0
I am using a custom Drop down widget (dropdownDivConverter).  I set the standard option '’Menu self close = Yes" The standard option for closing the Drop Down menu is not working if there is a visibility condition set based on attributes value. Whenever I set the visibility of the drop down values on 'Always’, then does the Close Menu work properly. I mean the Drop Down menu closes after click on any of the drop down options. Doen anybody know how can I solve the problem. I want to let the DropDown menu close by itself after click on any of the DropDown options.

CSS Tip: Adding prefixes to CSS depending on browsers which would you like to support

$
0
0
Hi  When working on a client application, we often have requirements that the application should support the latest browsers or IE10 for example. I would like to share a solution that can be helpful for some of you (I assume that some of you know this solution). It's a plugin called Autoprefixer that we can add to Gulp. This plugin adds prefixes to the CSS properties depending on the given configuration. In short, tell the Autorefixer which browsers you want to support and it adds only relevant prefixes to the stylesheet. It's easy and I don’t have to remember it when developing. To add Autoprefixer in our Gulp workflow, we only need to pipe it after SASS has done its thing. Then Autoprefixer updates the stylesheets to add prefixes.   1. Install Autoprefixer (in main project directory) npm install --save-dev gulp-autoprefixer   2. Then we can add it to our task We need to load our plugin in Gulp.js file  (last line) var gulp = require ('gulp'), sass = require ('gulp-sass'), browserSync = require ('browser-sync'). create (), path = require ('path'), sourcemaps = require ('gulp-sourcemaps'), autoprefixer = require ('gulp-autoprefixer');   Next add a new pipe to gulp task (example, please provide your configuration): gulp.task('build-sass', function () { return gulp.src(sourceSassFolder + '**/*.scss') .pipe(sass({ outputStyle: 'expanded' }).on('error', sass.logError)) .pipe(autoprefixer({ browsers: ['last 2 versions, IE 10'], cascade: false })) .pipe(gulp.dest(sourceCssFolder)) .pipe(gulp.dest(deploymentCssFolder)); });   I haved added code to the following tasks: build-sass build browsersync-sass   3. Save and run the task! I hope that someone will help.   Documentation: I based on Gulp for Mendix theming https://github.com/mendix/ux-theming Link to Auotprefixer https://www.npmjs.com/package/gulp-autoprefixer

How to pass string / number parameter with Deeplink/Universal link to Microflow

$
0
0
Hi, I am following https://forum.mendixcloud.com/link/questions/91914 to implement the functionality to open the hybrid app. My Requirement: Suppose i have an app with many products and each product has a productID. My deep link url is like <*/link/product?productID=12345asd> and my deeplink Microflow is like MyModule.MyProductMF i have used universal link(https://github.com/sudhansurana/cordova-universal-links-plugin) forked from https://github.com/flipflopapp/cordova-universal-links-plugin with minor fixes. my entry code looks like  var MxApp = require("@mendix/mendix-hybrid-app-base"); MxApp.onConfigReady(function(config) { // Perform any custom operations on the dojoConfig object here // Perform any custom operations on the dojoConfig object here config.afterNavigationFn = function() { console.info("Running Eric's custom afterNavigation function"); //add a listener now for deep links //any time they come in now, we'll be ready to handle them universalLinks.subscribe(null, function(eventData) { // do some work console.log('Did launch application from the link: ' + eventData.url); var oReq = new XMLHttpRequest(); /* use a PUT to get responses from DL without redirects * 200 means it's ready * 401 means you're not logged in * 404 means not found */ oReq.open("put", eventData.url, true); console.log(mx.ui.getContentForm()); console.log(mx); debugger; //detect if iOS for handle deeplink if (device.platform === 'iOS' || device.platform === 'Android') { var pid = mx.ui.showProgress("Loading link..."); oReq.onreadystatechange = function () { if(oReq.readyState === 4) { if(oReq.status === 200) { mx.data.action({ params: { actionname: "MyModule.MyProductMF" }, origin: mx.ui.getContentForm(), callback: function() { mx.ui.hideProgress(pid); }, error: function(error) { mx.ui.hideProgress(pid); mx.ui.error("Unable to load link. Please try again."); } }); } else if (oReq.status === 401) { //we weren't redirected (got a 200) and instead were sent to a login page. Show an error mx.ui.hideProgress(pid); mx.ui.error("Sorry, you need to be logged in to view this link. Please log in and try again"); } else { //something else went wrong mx.ui.hideProgress(pid); mx.ui.error("Sorry, something went wrong with the link."); } } }; } oReq.send(); }); //these lines are from the original afterNavigationFn, which we're overriding /* * If defined, this function is invoked in onNavigation method, * called as the last action during the startup. Lines below handle * removal of the loading nodes. */ var removeSelf = function() { var appNode = document.getElementById("mx-app"); if (appNode) appNode.style.display = "none"; }; removeSelf(); } }); It is failing and showing the productID as null in microflow log sample log 6:50:28 PMAPPERRORClient: Error 6:50:28 PMAPPINFOat https://*.mxapps.io/mxclientsystem/mxui/mxui.js?636839359876716420:31:34254 6:50:28 PMAPPINFOat https://*.mxapps.io/mxclientsystem/mxui/mxui.js?636839359876716420:20:2053 6:50:28 PMAPPINFOat Object.next (https://*.mxapps.io/mxclientsystem/mxui/mxui.js?636839359876716420:20:2158) 6:50:28 PMAPPINFOat a (https://*.mxapps.io/mxclientsystem/mxui/mxui.js?636839359876716420:20:929) 6:51:09 PMAPPINFOClient: Running Eric's custom afterNavigation function 6:58:17 PMAPPERRORClient: No permission to read or write entity *.DeepLinkParam, check security! 6:58:17 PMAPPERRORClient: Could not commit object: 6:58:17 PMAPPINFOCannot read property 'needsReachableState' of undefined TypeError: Cannot read property 'needsReachableState' of undefined 6:58:17 PMAPPINFOat t.<anonymous> (https://*.mxapps.io/mxclientsystem/mxui/mxui.js?636839359876716420:67:112857) 6:58:17 PMAPPINFOat i (file:///android_asset/www/js/bundle.js:1:110486) 6:58:17 PMAPPINFOat Generator._invoke (file:///android_asset/www/js/bundle.js:1:111625) 6:58:17 PMAPPINFOat Generator.t.(anonymous function) [as next] (file:///android_asset/www/js/bundle.js:1:110665) 6:58:17 PMAPPINFOat i (file:///android_asset/www/js/bundle.js:1:110486) 6:58:17 PMAPPINFOat r (file:///android_asset/www/js/bundle.js:1:110721) 6:58:17 PMAPPINFOat file:///android_asset/www/js/bundle.js:1:111066 6:58:17 PMAPPINFOat new Promise (<anonymous>) 6:58:17 PMAPPINFOat e (file:///android_asset/www/js/bundle.js:1:111040) I also tried to create a MendixObject and on creation of it tried to pass it , but it shows security issue. I am logging in by Admin account. I have already tried the following discussions https://forum.mendixcloud.com/link/questions/8924 https://forum.mendixcloud.com/link/questions/8883 https://forum.mendixcloud.com/link/questions/87255 https://forum.mendixcloud.com/link/questions/9692 https://forum.mendixcloud.com/link/questions/92337   Please Help

Push notifications with multiple mobile apps

$
0
0
Hi, as far as I know you can have one or more mobile apps connected to your Mendix node. However I was wondering if the push notifications module supports multiple mobile apps. Is this use case supported or anyone experience with that?

How to disable the Android back button?

$
0
0
I would like to block the Android back button. I can trap the event and show alerts when the button is pressed, but I have trouble actually stopping the application from navigating back. The default code used for phonegap solutions does not seem to work on a Mendix based application. Does anyone know how to do this?   The following code has been placed in a custom .js file inside the theme folder, which has been added to the components.js file. document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady(){ alert("On Load"); document.addEventListener("backbutton", didPressBackButton, false); } function didPressBackButton(event) { alert("go back!"); // event.preventDefault(); //Does not block the backbutton // event.stopPropagation(); //Does not block the backbutton // return false; //Does not block the backbutton }   p.s: There have been similar questions before on this forum, but they were never conclusively answered. By removing unnecessary info from the question, I am hoping to get an answer that is more to the point. :-) p.p.s: An additional question which I do have: Where do I place and call the javascript code? By placing it in a custom .js file, It is only loaded once. This works if I want the behaviour everywhere. But when I need the behaviour in specific pages, this will not suffice. Using html widgets does not work either, since this results in the 'go back!' alert showing multiple times when entering a page multiple times. The number of alerts shown increases by one every time I press the back button on that page an additional time. Feedback on where to place the code would also be highly appreciated! p.p.p.s: The following code can be found in cordova.js when using remote inspection on an Android device. I suspect Mendix is inserting their own code in between the application and the Cordova event handlers:

User management: Process behind Project Security and Account XPaths interactions?

$
0
0
Hi all, I have a question regarding the process behind Project Security and Account XPaths interactions. I am working on an app that has a user role (functional administrator) that does user management for most user roles but not all. The user role they are not allowed to manage is the technical administrator user role. The technical administrator is allowed to manage all users. In my app I have the entities 'User' (in the System module) and 'Account' (in the Administration module), Account inherits from User. Both functional administrator and technical administrator are set as module role Administrator for both the System and Administration modules. In Project Security the technical administrator is set to 'All' for User management. The functional administrator is set to 'Selected' with the technical administrator checkbox not checked (the checkbox for '(No user roles)' is checked). I currently have 102 users in my local test environment, 1 is technical administrator without other user roles, 1 is technical administrator with other user roles, and the other 100 have one or more other user roles, or even no user roles at all (95 have no user roles at all). In the Administration module the Administrator has Full Read, Full Write access to the Account entity. Below are five different XPath constraints and the results I get on the Account_Overview page (that page is just a datagrid with all Accounts, data source XPath). A. No XPath constraint at all: not as entity access, not on the page. Result A: functional administrator sees 102 Accounts (not all information is visible but what I care about here is inclusion in the list), technical administrator sees 102 accounts. B. Entity access XPath [not(System.UserRoles = '[%UserRole_TechnicalAdmin%]')] on the Account entity. Result B: functional administrator sees 100 Accounts, technical administrator sees 102 accounts. C. Entity access XPath [System.UserRoles != '[%UserRole_TechnicalAdmin%]'] on the Account entity. Result C: functional administrator sees 101 Accounts (only the technical administrator without other user roles is not included, the technical administrator with other user roles is included), technical administrator sees 102 accounts. D. Page XPath [not(System.UserRoles = '[%UserRole_TechnicalAdmin%]')] Result D: functional admin can see 102 Accounts, technical admin can see 100 Accounts. E. Page XPath [System.UserRoles != '[%UserRole_TechnicalAdmin%]'] Result E: functional admin can see 5 Accounts, technical admin can see 6 accounts. So I would like to know how Project Security and Account XPaths (entity access and on the page) interact to produce these results.   Thanks in advance for answering.   (actual Modeler version: 7.19.1) (This is part 2 of this question. For the answers to part 1 on the difference between != and not() see: https://forum.mendixcloud.com/link/questions/92306 )

Updates Made to List in Loop Not Committing

$
0
0
Hello, I have a Microflow that retrieves list objects, loops through the list, and updates the value a particular attribute. No matter what I do, these updates are not reflected in the database. I’ve tried committing the list object all at once after the microflow exits the loop and I’ve tried committing each change one by one in the loop (I know this is not best practice, but the list only has 7 records. If it worked, I’d have taken it). Nothing works. Any ideas here. Thank you.

Grid shows 2 rows when committing instead of 1

$
0
0
Hello all, I have one problem which i cannot find the solution to it. I have one entity called “Alert” with “AlertStatus,AlertContent and the Alert_Customer as Customer.and entity called “Customer”, I linked the Customer to Alert and the association is 1-*. I use one microflow for the following logic. It retrieves the customer by Alert and i create an object of type Alert. In the Alert object I also commit without events, normally it should display 1 row in the data grid instead of 2… If i change the page and i come back it shows 1. Anyone know why is this happening?    Many thanks in advance!

How to create an object along with its associated objects in a single form?

$
0
0
I have this domain model. Devices has-many alerts. I am able to create devices and alerts objects separately using a data view or data grid’s new button with inline editing, but they are not associated to each other. What I want is: 1) How to create a single form to create a device and add alerts to this device (create new alerts) and then save the device object and its associated alerts.  2) Is the foreign key required in alerts table? I see mendix uses a separate table for associations. How to create devices and alerts so that an entry is automatically made to that separate table? A sketch of desired result is below:

How to convert a string to an array of bytes

$
0
0
I need to post some data to a REST API.  I have C# code that works and it takes the string of data and converts to an array of bytes and then sends that in the body.  In my Microflow, I have the string but I cannot find how to convert that string to an array of bytes so I can post it to the REST API.   For example, C# code is: Encoding.ASCII.GetBytes(postData); // postData is just a string of name value pairs, like a query string.   I have searched and have not been able to find a way of converting the string to an array of bytes.

Bootstrap tooltip width

$
0
0
Anyone else having trouble changing the width of the “BootstrapTooltip” widget?  I’m working on a project where I need to show the last 5 “notes” of an object in a list when I hover over it’  The logic works fine and the widget works great, but the tooltip is super skinny (max-width of 200px) and a 3 sentence note takes 20+ lines.  it appears that the tooltip is generating style from an “id” tag rather than a class.  Is it possible to change the width to a set px? Thanks!
Viewing all 83469 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>