Hi, I need to show a delete button only if the current user is the entity’s owner or he’s the administrator. I know “[%CurrentUser%]=$currentObject/System.owner “ is a solution to the first part, but I don’t know what to do regarding the second one.
↧
Show delete button and delete an entity by role
↧
Pull to refresh widget
Hi all, In our Hybrid mobile app we want to use the Pull to refresh widget which works great if you simply want to refresh the page. However, we would like to make a new call after refreshing the page. Can I tweak the code in such a way that instead of a page refresh (resetDom) it will click a button? If yes, how? Thanks in advance! Sophie
↧
↧
Problem Calculations in Microflow
Hi all, I'm quite new to Mendix so I hope you can easily help me with the following problem: I am building in application in which a group of people can keep track of the payments they do for each other. So for example: Person A pays a dinner for person B for €20,00. Person A now has a balance of +20 and Person B a balance of -20. This part I have working correctly and I created an overview page with the balances of all users in the app. Form here i want to create a datagrid (or something else) that would show, to who every user has to pay to get his balance to zero, in the least amount of transactions. To do this I have created 3 entities: User (Name & CurrentBalance), Payment (amount, description), report (giver, receiver, amount). The last one is currently not used and was created for the problem described above. I'm a little stuck here so I hope you can help me on my way!
↧
Web Push Notifications error "Compilation of Java actions failed"
I get the error "Compilation of Java actions failed” when i run locally after adding Web Push Notifications module from appstore https://appstore.home.mendix.com/link/app/114331/ I have made a specialization of System.User in MyModule.TenantUser and made the replacement in my forms and microflows Buildfile: C:\Active\Q-SMART-Development_Ajit_20200827\deployment\build_core.xml compile: [javac] Compiling 31 source files to C:\Active\Q-SMART-Development_Ajit_20200827\deployment\run\bin [javac] C:\Active\Q-SMART-Development_Ajit_20200827\javasource\webpushnotifications\actions\SendNotification.java:90: error: incompatible types: User cannot be converted to TenantUser [javac] if ( ! Microflows._UserHasAtLeastOneSubscription(getContext(), User_) ) [javac] ^ [javac] Note: C:\Active\Q-SMART-Development_Ajit_20200827\javasource\webpushnotifications\actions\SendNotification.java uses or overrides a deprecated API. [javac] Note: Recompile with -Xlint:deprecation for details. [javac] Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output [javac] 1 error BUILD FAILED C:\Active\Q-SMART-Development_Ajit_20200827\deployment\build_core.xml:29: Compile failed; see the compiler error output for details. Total time: 3 seconds
↧
Conditions to show delete button
Hi, I need to show a delete button only if the current user is the entity’s owner or he’s the administrator. I know “[%CurrentUser%]=$currentObject/System.owner “ is a solution to the first part, but I don’t know what to do regarding the second one.
↧
↧
Google Admob Integration
Does anyone have a solution for implementing Admob (Google) for monetization?’ (Native Only)
↧
Entity access out of date
I keep getting the error message “Entity access is out of date. Please open this project in Studio Pro and update security using the button in the domain model editor.” I downloaded studio pro and updated the security, but i keep getting the same message every time i try to preview the app. I'm using version 8.13.0 Does anyone know how to solve this?
↧
How to display a Yes/No popup within a Microflow and branch based on the user clicking on Yes or No?
I seem to be spinning my wheels on this and am probably making this way more complicated, but have been unable to figure it out. In short, I’m looking for a way to display a popup dialog to the user, within my microflow, to get the user to click either Okay or Cancel, and based on what they click, branch my microflow logic accordingly. For example, I have a microflow triggered from a button onclick on a page. It simply updates a boolean in an object. I’d like to be able to display a message to the user “You are about to change this flag, are you sure you want to proceed?”, and then using a Decision in the microflow to either change the boolean in the object or not. It seems this simple yes/no dialog is really tripping me up. Thank you in advance for any help.
↧
Consuming THIRD PARTY Rest web services
Hi all, Can you please tell me that how to consume the THIRD PARTY Rest web services and to integrate in my application? And please tell me the connectors that I have use and connection procedure. Thanks in Advance
↧
↧
3D Visualization in Mendix
Hi there! I’d like to visualize 3D in a Mendix app. Is it possible to display STEP or JT or Part files? Or to draw a 3D cylinder? What “components” can be used to do this? So long and thanks… Markus
↧
In HTML-widget my sozi presentation keeps spinning
Sozi is a tool that generates an html-file containing everything it needs to run in any browser. So I decided to try this in the html-widget, but unfortunately, it shows the first 30px, and then just keeps spinning waiting for the rest. Browsing through the browser console, I see no logs of any error. So I need some help: Does anyone know how I can get the sozi-presentation running inside my app? This is the setting of my html-widget: You can see the app here: https://app8339-sandbox.mxapps.io/ You can see the standalone presentation here: https://tieka.nl/sozi/sozipre.sozi.html#frame7706 Running on version 8.12.1
↧
Where does NativeMobileResource's PlaySound get it's mp3?
The PlaySound-action of nativeMobileResources should be able to play a sound on my mobile, but how to pass a sound file to PlaySound-action's only parameter, ‘Audiofile’? It has to be a specialization of FileDocument, so I created an entity FeedbackSound for storing an audio file. I uploaded an audio file to the runtime using Dropzone, made sure synchronization was set to 'All objects’, but the javascript source is apparently not able to find that audio-file by Retrieve from database with [Name='Beep.mp3'] Also adding the file to any project-directory (/resources, /theme, /theme/resources) does not make the javascript able to find the audio file. Checking PlaySound's javascript code and reading https://github.com/zmxv/react-native-sound do not make it clear how to feed the audio file to the action. Can anyone explain how to feed the audio file to the PlaySound action?
↧
Unique constraint on combination of two attributes
Hi, I want to place unique constraints on combination of two attributes in database, Like i have a coupon code and a 4 digit number as an attributes, So now i want the unique constraints on combination of Coupon code and last a 4 digit number, just like UNIQUE(column1, column2); in SQL. Thanks
↧
↧
AnyChart widget "Unexpected token in JSON" error
Hi, I am using the Anychart object to build some simple charts but keep getting the error as shown below, I tried multiple examples from the plotly website Error message: Unexpected token v in JSON at position 4 SyntaxError: Unexpected token v in JSON at position 4
at JSON.parse ()
at Object.t.getData (http://localhost:8080/widgets/com/mendix/widget/custom/AnyChart/AnyChart.js?637348994916306061:17:112133)
at t.renderChart (http://localhost:8080/widgets/com/mendix/widget/custom/AnyChart/AnyChart.js?637348994916306061:17:3049)
at t.render (http://localhost:8080/widgets/com/mendix/widget/custom/AnyChart/AnyChart.js?637348994916306061:17:2958)
at ca (http://localhost:8080/mxclientsystem/mxui/mxui.js?637348994916306061:62:65448)
at ua (http://localhost:8080/mxclientsystem/mxui/mxui.js?637348994916306061:62:65243)
at Ns (http://localhost:8080/mxclientsystem/mxui/mxui.js?637348994916306061:62:99313)
at xs (http://localhost:8080/mxclientsystem/mxui/mxui.js?637348994916306061:62:83663)
at ws (http://localhost:8080/mxclientsystem/mxui/mxui.js?637348994916306061:62:80695)
at ds (http://localhost:8080/mxclientsystem/mxui/mxui.js?637348994916306061:62:78210) plotly Data (source: https://plotly.com/javascript/pie-charts/) [{ values: [19, 26, 55], labels: ['Residential', 'Non-Residential', 'Utility'], type: 'pie'}] I tried mutiple other JSONs from the plotly examples like the one below (https://plotly.com/javascript/indicator) [
{
type: "indicator",
mode: "number+gauge+delta",
gauge: { shape: "bullet" },
delta: { reference: 300 },
value: 220,
domain: { x: [0, 1], y: [0, 1] },
title: { text: "Profit" }
}
] I keep getting the same kind of error message: “Unexpected token X in JSON at position Y”. Thank you, Seb
↧
Conditional visibility for a button based on association - not supported, so how then?
Wow, lots of questions and posting on this subject over the years, as I searched for an answer, but I’ve still not found how to accomplish this. I have an entity (DocInfo) which stores information about a document (like title, description, whether it’s public, the author/owner, etc..) I have another entity (DocAccess) which is a join table between DocInfo and the System.User entities. In this DocAccess table stores the access type (using a enumeration of ‘Read’ or ‘Write’), and then it is associated to a User and to a DocInfo record. So, for a given DocInfo record, a user may or may not have an entry in the DocAccess, and if they do, it will either specify the user has “Read” access or “Write” access. Within my page, based on the DocInfo object, I have a button titled “Edit”. This button should only be visible if the current user is either the ‘owner’ of the DocInfo record OR if the user has ‘Write’ access defined in the DocAccess entity for this DocInfo record. I’m clear on the “if the user is the owner” portion of my criteria (I have “Store ‘owner’” set on the entity, and then my visibility expression includes “($currentObject/System.owner=[%CurrentUser%]”. Where I’m struggling is the portion of the expression that says “or the current user has a record in the DocAccess entity with the value of ‘Write’ access for this DocInfo record”. The issue I seem to be bumping up against is that associations are not allowed within Visibility expressions, so I am stumped on how to get a peek at the DocAccess entity to look for this user and then look at the AccessType value. I thought maybe a microflow that returned a boolean or something of that sort, but Visibility expressions for buttons don’t support calling a microflow. Below is my domain model to help, and includes the other entities in my project. I thought I was getting the hang of this, and then I seem to smash right into another wall. Thank you in advance for any help.
↧
How to pass attachment from one entity to another?
Hello, I have “MyFile” entity with generalization from the ”file” entity, so the user can upload attachments and store them with “MyFiile” entity objects. I need to pass this attachment file to the. “MyFile_2” entity via a microflow. How can I do it? I tried to pass the “MyFile” entity to the microflow, but there I can access only a few attributes like. “name”, “size”, but I can’t access the attribute where the file is stored.
↧
Display similar records based on attribute matching percentage
Hi, I need to find similar records based on string attribute in an object. Eg; Str1: This is a wonderful place Str2: This is a beautiful place Str1 matches str2 by 80% and vice versa Similarly, I need to find the maximum similar records by percentage and show it on a page. I have used java action(Jaro and Jaro-Winkler similarity algorithm) to display similar records. If a new string(object) is created I have to update all the records with the percentage and I should display the record with the maximum percentage Issue: If I have 1000 objects, when a new object is created I have to loop through all the 1000 objects to update all the percentage which makes a performance issue on the page. Is there is any workaround for this? Thanks in advance
↧
↧
How to get the user id of current user into the microflow
Hi, How to get the Id of the current user into the microflow as a variable. Thanks.
↧
how to use merge in microflow
how to use merge in microflow. Couldn’t connect two flows to merge element
↧
Excel Importer Error "An error occurred, please contact your system administrator"
Dear Mendix Community, I am currently working on my first big application using excel importer in order to import a deliverable list for different launch phases. Now I just launched my prototype application and Excel Importer runs into an error, whenever I try to upload my Excel sheet. Which reasons can this have/how can I solve my problem? Kind Regards, David
↧