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

visualization widget display a local jt file failed

$
0
0
I use visualization widget to display a local jt file,but failed. The url is like this: file:///C:/xxx.jt file, but error occurs like below: Uncaught (in promise) TypeError: Cannot read property 'init' of null at d8b9c9c6-0206-4962-9d2f-a93bfac15d87:31 at new Promise (<anonymous>) at e.createChannel (d8b9c9c6-0206-4962-9d2f-a93bfac15d87:31) at t.<anonymous> (d8b9c9c6-0206-4962-9d2f-a93bfac15d87:31) at d8b9c9c6-0206-4962-9d2f-a93bfac15d87:16 at Object.next (d8b9c9c6-0206-4962-9d2f-a93bfac15d87:16) at d8b9c9c6-0206-4962-9d2f-a93bfac15d87:16 at new Promise (<anonymous>) at u (d8b9c9c6-0206-4962-9d2f-a93bfac15d87:16) at t.processMessage (d8b9c9c6-0206-4962-9d2f-a93bfac15d87:31)

Email Module Templates - How to Use

$
0
0
Hi Everyone! I started recently the use of Mendix through my career and in my first project I have difficulty in use the Email Module templates. ... I have Ldap configureted in my project, it's very simple the settings and widgets but this Email template I can't configure because I don't know to where to start, I have tried setting it up a few times but without succesfull. I already have together with Email template, the Encryption and MxModelReflection. Someone could help me in how I to configure smtp and send emails? I don't have found nothing in Forum about Module 7.11 with focus or details of How-to's this, however, someone know where I can find How-to's or something about this?   Thanks.    

How to dynamically size a Chart widget Pie chart.

$
0
0
Hi, I have a template grid in which I display a Pie chart for each record.  This works great with the Charts widget, except for 1 thing; The total value of each Pie chart differs greatly but it is not visually visual as all Pie charts have the same size.    Does anyone have an idea/trick on how to size a Pie chart dynamically. So that the sizes are in relation with each other?

Upgrade script generated not optimized

$
0
0
Hi Everyone We are planning to upgrade to mendix 8 from 7 and have a lot of float attributes that needs now to be converted to decimal. The upgrade script generated handle each column on its own even if they are in the same table.  The problem with this is we have some very large tables with a few columns on each that mendix upgrade in the scripts. Doing one update per column at a time is very slow. We need to upgrade in a short window of time.  Below is a sample of 2 columns handled separately. Is there a way mendix could generate the script more optimized like for instance see below. Generated: ALTER TABLE "BLAZE$AFFORDABILITYTRACKING" RENAME COLUMN "FIXEDPORTION" TO "5F4B4DCE0C7C49E3AE15492A691265"; ALTER TABLE "BLAZE$AFFORDABILITYTRACKING" ADD "FIXEDPORTION" number(28, 8) NULL; UPDATE "BLAZE$AFFORDABILITYTRACKING"  SET "FIXEDPORTION" = CASE WHEN 1.0E20 > "5F4B4DCE0C7C49E3AE15492A691265" THEN "5F4B4DCE0C7C49E3AE15492A691265" ELSE 0 END; ALTER TABLE "BLAZE$AFFORDABILITYTRACKING" DROP COLUMN "5F4B4DCE0C7C49E3AE15492A691265"; ALTER TABLE "BLAZE$AFFORDABILITYTRACKING" RENAME COLUMN "DISPOSABLEMTHINCOME" TO "D1AE4A062D7F42DF89287C0102B09C"; ALTER TABLE "BLAZE$AFFORDABILITYTRACKING" ADD "DISPOSABLEMTHINCOME" number(28, 8) NULL; UPDATE "BLAZE$AFFORDABILITYTRACKING"  SET "DISPOSABLEMTHINCOME" = CASE WHEN 1.0E20 > "D1AE4A062D7F42DF89287C0102B09C" THEN "D1AE4A062D7F42DF89287C0102B09C" ELSE 0 END; ALTER TABLE "BLAZE$AFFORDABILITYTRACKING" DROP COLUMN "D1AE4A062D7F42DF89287C0102B09C"; Optimised will look like this maybe: ALTER TABLE "BLAZE$AFFORDABILITYTRACKING" RENAME COLUMN "FIXEDPORTION" TO "5F4B4DCE0C7C49E3AE15492A691265"; ALTER TABLE "BLAZE$AFFORDABILITYTRACKING" RENAME COLUMN "DISPOSABLEMTHINCOME" TO "D1AE4A062D7F42DF89287C0102B09C";   ALTER TABLE "BLAZE$AFFORDABILITYTRACKING" ADD "FIXEDPORTION" number(28, 8) NULL; ALTER TABLE "BLAZE$AFFORDABILITYTRACKING" ADD "DISPOSABLEMTHINCOME" number(28, 8) NULL;   UPDATE "BLAZE$AFFORDABILITYTRACKING"  SET "FIXEDPORTION" = CASE WHEN 1.0E20 > "5F4B4DCE0C7C49E3AE15492A691265" THEN "5F4B4DCE0C7C49E3AE15492A691265" ELSE 0 END,       "DISPOSABLEMTHINCOME" = CASE WHEN 1.0E20 > "D1AE4A062D7F42DF89287C0102B09C" THEN "D1AE4A062D7F42DF89287C0102B09C" ELSE 0 END;   ALTER TABLE "BLAZE$AFFORDABILITYTRACKING" DROP COLUMN "5F4B4DCE0C7C49E3AE15492A691265"; ALTER TABLE "BLAZE$AFFORDABILITYTRACKING" DROP COLUMN "D1AE4A062D7F42DF89287C0102B09C";   We can manually update the generated script and run our selves but it could lead to errors in us manually updating it as we have a very large database with many tables. , and we are lazy :)

Use XPath query based on variable

$
0
0
Hi, I’m quite the newbie in Mendix, and I have a problem and a hard time solving it. I have created a published REST service that queries a database, retrieves a list based on a parameter, and returns it. The entire API works, but I got stuck trying to implement a filter.   There’s a query parameter that can be provided with the GET call. This parameter is in an XPath query in my Retrieve from Database action. I got the filter to retrieve based on the parameter, but I want an ‘GET ALL’ function, where it completely disregards that specific XPath filter. So currently, my filters look like this: [vehicle=$vehicle] [status=$status] I can retrieve specific statuses when providing it as a parameter in my GET call. I have also set it to a default value in case it’s not provided. However, what I can’t seem to figure out, is how to retrieve ALL events for a vehicle, so leaving out the [status=$status] when the parameter ‘status=all’ is provided in the GET call.   Any pointers would be great, I’m here to learn!  

GROUP BY OQL Function DATEPART throws ConnectionBusRuntimeException

$
0
0
Hi there, I’m currently developing an abstract data layer. I use a custom Java Action for the data retrieves. I’m not sure if this issue is connected to the one I already created an issue for, but since I turned security off for the project I assume this must be something different.  We use a PostgreSQL database. I’d like to perform the following (working) query in postgres to be used in OQL in Mendix to retrieve the same data. This is the working PostgreSQL query: select date_part('WEEK', state_leaves_draft) as category, State as subcategory, count(State) as value from "requestfulfilment$request" group by category, subcategory and yields: [{ "category" : 45, "subcategory" : "Initiated", "value" : 3 }] This is correct and expected. Here an example OQL I performed which worked: select * from RequestFulfilment.Request yields [ { "Number": 97, "State_Leaves_Draft": "Tue Nov 05 22:17:25 CET 2019", "State": "Initiated", ... }, { "Number": 98, "State_Leaves_Draft": "Wed Nov 06 10:09:13 CET 2019", "State": "Initiated", ... }, { "Number": 102, "State_Leaves_Draft": "Fri Nov 08 09:49:58 CET 2019", "State": "Initiated", ... } ] There are more columns, but those are not relevant for this example. The data returned is correct. Here another OQL query which works select DATEPART(WEEK, State_Leaves_Draft) as category, State as part from RequestFulfilment.Request yields: [ { "part": "Initiated", "category": 45 }, { "part": "Initiated", "category": 45 }, { "part": "Initiated", "category": 45 } ] I also tested the `COUNT` function as well: select COUNT(State) as value from RequestFulfilment.Request yields [{"value":3}] Now, if I put this all together and use the group by the query looks like this: SELECT DATEPART(WEEK, State_Leaves_Draft) as category, State as subcategory, COUNT(State) as value FROM RequestFulfilment.Request GROUP BY category, subcategory   This query throws a warning and an exception: DataStorage_QueryHandling: - Executing query with old implementation due to detected exception in new implementation: No access rights for expression [category] An error occurred: com.mendix.connectionbus.ConnectionBusRuntimeException Message: 'requestfulfilment$request' is not a valid entity type. Stacktrace: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.connectionbus.ConnectionBusRuntimeException: An exception has occurred for the following request(s): InternalOqlTextGetRequest (depth = -1): select DATEPART(WEEK, State_Leaves_Draft) as category, State as subcategory, COUNT(State) as value from RequestFulfilment.Request group by category, subcategory at com.mendix.basis.component.InternalCoreBase.execute(InternalCoreBase.java:386) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.connectionbus.ConnectionBusRuntimeException: An exception has occurred for the following request(s): InternalOqlTextGetRequest (depth = -1): select DATEPART(WEEK, State_Leaves_Draft) as category, State as subcategory, COUNT(State) as value from RequestFulfilment.Request group by category, subcategory at com.mendix.basis.actionmanagement.ActionManagerBase.executeSync(ActionManagerBase.java:156) Caused by: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.connectionbus.ConnectionBusRuntimeException: An exception has occurred for the following request(s): InternalOqlTextGetRequest (depth = -1): select DATEPART(WEEK, State_Leaves_Draft) as category, State as subcategory, COUNT(State) as value from RequestFulfilment.Request group by category, subcategory at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:36) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.connectionbus.ConnectionBusRuntimeException: An exception has occurred for the following request(s): InternalOqlTextGetRequest (depth = -1): select DATEPART(WEEK, State_Leaves_Draft) as category, State as subcategory, COUNT(State) as value from RequestFulfilment.Request group by category, subcategory at com.mendix.basis.actionmanagement.ActionManagerBase.executeSync(ActionManagerBase.java:156) Caused by: com.mendix.connectionbus.ConnectionBusRuntimeException: An exception has occurred for the following request(s): InternalOqlTextGetRequest (depth = -1): select DATEPART(WEEK, State_Leaves_Draft) as category, State as subcategory, COUNT(State) as value from RequestFulfilment.Request group by category, subcategory at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:36) Caused by: An exception has occurred for the following request(s): InternalOqlTextGetRequest (depth = -1): select DATEPART(WEEK, State_Leaves_Draft) as category, State as subcategory, COUNT(State) as value from RequestFulfilment.Request group by category, subcategory at com.mendix.connectionbus.RequestAnalyzer.doRequest(RequestAnalyzer.java:63) Caused by: 'requestfulfilment$request' is not a valid entity type., exception occurred on mapping the following query: SELECT DATEPART(WEEK, requestfulfilment$request.state_leaves_draft, sun.util.calendar.ZoneInfo[id="Etc/GMT+1",offset=3600000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null]), State AS subcategory, COUNT(requestfulfilment$request.state AS subcategory) AS value FROM requestfulfilment$request GROUP BY category, subcategory at com.mendix.connectionbus.retrieve.query.mapping.QueryMapper.getMappedQueries(QueryMapper.java:276) Caused by: 'requestfulfilment$request' is not a valid entity type. at com.mendix.connectionbus.util.LegacyModel.$anonfun$getMetaObject$1(LegacyModel.scala:43) at scala.Option.getOrElse(Option.scala:189) at com.mendix.connectionbus.util.LegacyModel.getMetaObject(LegacyModel.scala:43) at com.mendix.connectionbus.DomainModelUtilImpl.getPersistableMetaObject(DomainModelUtil.scala:67) at com.mendix.connectionbus.DomainModelUtil$.getPersistableMetaObject(DomainModelUtil.scala:32) at com.mendix.connectionbus.DomainModelUtil.getPersistableMetaObject(DomainModelUtil.scala) at com.mendix.connectionbus.retrieve.query.mapping.MetaObjectInfo.getMetaObject(MetaObjectInfo.java:144) at com.mendix.connectionbus.retrieve.query.mapping.SelectColumnsMapper.getColumnLocation(SelectColumnsMapper.java:315) I also tried to GROUP BY column number instead of name, but this also didn’t work: SELECT DATEPART(WEEK, State_Leaves_Draft) as category, State as subcategory, COUNT(State) as value FROM RequestFulfilment.Request GROUP BY 1, 2 throws this: An error occurred: org.postgresql.util.PSQLException Message: ERROR: column "requestfulfilment$request.state_leaves_draft" must appear in the GROUP BY clause or be used in an aggregate function Position: 27 Stacktrace: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.basis.connectionbus.ConnectionBusException: An exception has occurred for the following request(s): InternalOqlTextGetRequest (depth = -1): SELECT DATEPART(WEEK, State_Leaves_Draft) as category, State as subcategory, COUNT(State) as value FROM RequestFulfilment.Request GROUP BY 1, 2 at com.mendix.basis.component.InternalCoreBase.execute(InternalCoreBase.java:386) ---   A GROUP BY on a regular column works. A GROUP BY with multiple columns works as well. A COUNT works. … it seems everything by itself works, but you cannot GROUP BY an OQL Function column?   (using Mendix v8.4.1)

Error is shown while cancelling changes

$
0
0
Hi, When trying to cancel the page to cancel the changes, an error is popped up as in the second snapshot.       However, the record is saved in the overview even if the page is closed (the page can be closed only by refreshing the browser) The canceled entry is however, saved as mentioned above (also refer to the yellow highlight in the snapshot below)     The error captured in the console is as below (When clicked on the cancel button)   Kindly assist.

Anonymous users created with diffrent language than project default.

$
0
0
In our project we have these language settings: As you can see nl_NL is set as the default. After upgrading from mendix 7.23.6 to 8.1.1 we noticed our anonymous users are being created with their language set to en_GB which is the secondary project language. Anyone else experienced this after upgrading?

Sending email from my application

$
0
0
Hi, I would like to send an email with the activation link to the users from my application. I tried to configure the MxModelRefelction and EmailTemplate based on the link, https://world.mendix.com/display/howto50/Send+Custom+Emails+From+Your+App But, the documentation seems to be outdated and I am not able to achieve what I want to. Any suggestions on how to send emails from the application? Please guide. Thanks in advance.

Get Current account in Microflow creating object

$
0
0
Hi I’m trying to create an object (registration) in an entity (Registration) where the attributes are the account that is now connected and the course (given via listvieuw).   To explain it other wise: I have a listvieuw with all my courses and as a Account holder you van register on them. I’am able to store the registration per course but unable to give the account name…   So: any ideas?

XAS error executing microflow; undefined

$
0
0
Hi, i’m having an issue with a boolean attribute with the attribute radiobutton list https://appstore.home.mendix.com/link/app/20 The app’s logs do not show anything but the browser console does, has anyone seen these errors before?  

Pluggable widgets within pluggable widgets

$
0
0
I try to build a custom pluggable widget with goal of stacking another custom pluggable within its body content. I scaffolded the widgets and have it up and running like so:     I then try to place other existing Mendix Widgets within it. I get the follwoing exception: Widget Stepper Slot 'stepperSlot3' cannot contain widgets of type data view This happens for different widgets like Label and Data View.   Any way I can allow this/make this work? I couldn’t find any references in the docs (section 3.3. Widgets) regarding this issue.   Thanks   (using Mendix version 8.4.0)

How to display selected data in drop down from reference selector?

$
0
0
I have a reference selector displaying as a dropdown, and the values in the dropdown are being generated by a microflow, which is creating a list of a particular entity , and then returning the list to the reference selector, and the reference selector is displaying one attribute of this entity. Is there a way in this situation to have the drop down from reference selector to display the selected value (i.e.already selected  data )in drop down as selected the next time i open the popup.  below are the images attached..here i want to display selected data(i.e. already selected )reason in reason drop down . Thanks for your help!

E-mail widget and reference selector

$
0
0
Dear all, do we have anyone I could contact in regards to references in Mendix and email-sending? In the logs, we find two errors in regards to this: emails cannot be sent due to no email address is found (though there is always an email address linked through a reference) sending email failed to mail server I believe that catching the references within the object is not done in time and therefore, sending the email causes an error. Does anyone have experience with this specific problem or knows how to tackle it? The App was built with Mendix Pro 8.3 and with the Siemens Layout available in the private section of the App Store. Thank you in advance, Sabrina

dynamic browser page title

$
0
0
Currently I am having an issue with a page where the Admins can choose which title the page should have.   So this page title is saved in an entity and thus I am able to retrieve it via MF, However it seems it is not possible to use a variable in the override page title to set the correct page title in the browser tab when calling the show page.   Is there any way to accomplish getting this user chosen title in the browser tab so it would look like ‘AppName – Dynamic PageTitle’    

XPath retrieve sometimes slow when sorted

$
0
0
Situation: a table with 2.5M records. We do a sorted retrieve on all objects (in this case: around 130 of them) that are associated to a certain helper object. We do that in a java action like this: Core.retrieveXpathQuery(getContext(),//Module.Person[Module.HelperObject_Person='349113150827176554'],-1,0,{PersonDateTimeAttribute=ASC}) Core.retrieveXpathQuery(getContext(),//Module.Person[Module.HelperObject_Person='349113150827176554'],-1,0,{PersonAutoNumberAttribute=ASC}) These queries take around 35 seconds, while there is a table index on both PersonDateTimeAttribute and PersonAutoNumberAttribute. Now consider the following, doing a similar retrieve but sorted on several attributes of an associated object: Core.retrieveXpathQuery(getContext(),//Module.Person[Module.HelperObject_Person='349113150827176554'],-1,0,{Module.Person_Address/Module.Address/Zipcode=ASC, Module.Person_Address/Module.Address/Street=ASC, Module.Person_Address/Module.Address/HouseNr=ASC}) This (more complex, it seems) query takes 54 milliseconds. Why are the first queries so slow? How can we improve these?

Make it native on Android Virtual Device?

$
0
0
Hi, is it possible to install the “Make it native” on emulated Android started from “Android Studio” via the “Android Virtual Device Manager” I tried to do that – unfortunately the “Make it native” app is not shown via PlayStore… Unknown why the app is not visible and therefore not installable  …

Make button invisible if row exists in a entity

$
0
0
Hi! Because the forum is working great today I thought of asking this question to :) So, I have a registration entity where I register who is joining what course. This is how the (registerd account) vieuws it (so here it should only be the unregister button) How can I make the button register visible ONLY when in the entity Registration the row exists with the course and current account?   Gracias!

Get unique, and random integers

$
0
0
Hi guys, I want to make random integers for a list of objects. I found this function: Math.floor(Math.random() * (max-min)) + min; The problem I have is that the integers in the list needs to be unique from the other objects in that list. If I loop over the list of objects, I cannot control that the integer is unique.   Who can help me solve this puzzle?   Thanks, Jacob

Timestamp convert

$
0
0
Hello, I have some time data in database in mendix(domain model) with the type of timestamp(long int). But now I want to show time data in page with the type which people can understand, how do I implement this in mendix? 
Viewing all 83469 articles
Browse latest View live


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