Need to extract the text input data from a page

0
Greetings, I have 2 textboxes labelled A, and B and on a button press need to call a microflow that copies the data of A and displays on B. How would i get the value contained in A using the microflow?   What I actually need is to be able to extract the value that has been entered into A and print the same in B on a button click. If i were to do the same in JS with onclick and button: function getInputValue() { // Selecting the input element textBox A and get its value var inputVal = document.getElementById("textBoxA").value; //Assigning value to textBox B document.getElementById("textBoxB").value = inputVal; } Is it possible to do this without having any entities and simply extracting the data from the UI and assigning to the UI as I have done with JS? The main requirement for me is to obtain the value entered in an input before it is being saved. How can I do this with mendix?   Thanks, Anirudh Mendix version 8.12.0
asked
3 answers
1

If you have an entity called X and if you have attributes A and B in entity X, then you can get the attribute A from entity X like $X/A.

If this does not answer your question, then provide more details. 

As an addition, please go through the Rapid application developer course and also probably the crash course from academy to avoid basic questions on the forum.

answered
1

Hi Anirudh,

Depending on your situation:

if both textboxes display attributes from the same entity and are in the same dataview/listview/etc you can pass that entity into your microflow als an input parameter and from there you'll have access to the attribute displayed in textbox A and can very simply set it als the value of the attribute in textbox B.

Otherwise, if your button will be placed somewhere on the page where you cannot directly pass the entity of the attribute displayed in textbox A into the microflow, you'll have to retrieve it in the microflow, either directly over association or from the database. After the entity is retrieved you can set the value for the other attribute.

 

I hope this helps you to implement what you need,

Yves

answered
1

Hi Anirudh, 

In Mendix, entity is the basic building block. You cannot do this without entity. 

Data view in pages always need an entity. 

If you do not want to a Persistable entity, then you can work with non-persistable.

answered