How to change the initial value of a textbox?

0
  Hi,   How to change the "initial" value of a textbox? For example, if the source value is 'Hello' and I want to capitalize it, append some other text...etc.   Note: the text-box belongs to a data-view that listens to a data-grid selection within the same page. Therefore, the text-box value is dynamically filled when the data-grid selection changes.   Thanks
asked
4 answers
0

Hayder,

You can open the page that the textbox is on using a microflow.  In the microflow, before opening the window, use a Change Object action to change the value of the attribute the text box points to.

Mike

 

**Edit**

OK, so for the case you describe, I don't think you can use the out of the box Listen functionality, because the developer doesn't have access to any of the events that take place when a row in the grid is selected and displayed in the dataview.  One idea is to enclose the datagrid in a dataview of a helper entity.  Give the helper entity an association to 1 of the datagrid objects.  Then when you click on a row in the datagrid, execute a microflow (via an action button on the grid), that sets the association of the helper entity to the selected object in the datagrid.  Also in this microflow, you can change the value of any attributes that you want to.

answered
0

Maybe you can add another attribute to the same entity and put a calculated value in the new attribute? In the microflow used for the calculated value you can add text to the "initial" value.

answered
0

If the only reason for changing the content of the text is for display purposes, you may consider just adding some css to the element which contains the text.

For example : css class -> .Uppercase{ text-transform: uppercase;}

 

If the text transformation needs to be applied to the data itself then i would consider using a micro-flow to set the data before it is saved, so that when you view the data it is already in the correct format.

 

answered
0

Hi Hayder,

Are you sure you want to alter the actual data of the selected object? if thats the case, in the listening dataview, you can put a dataview with a datasource microflow, which has the selected (listening) object as input parameter, where you do your changes, and feed this to the dataview.

Alternatively, when you do not want to alter the actual contents of the object, you could take a similar approach, but let the datasource return a np object, which you create and fill in the datasource. 

I would go for the latter. If you opt for the first, inconsistencies would occur across objects on how their data is formatted. You'd have to 'select' all of them to have them end up the same way. Unless this is your actual usecase, there are better ways to make this happen (standard 'Format and Commit' microflow, or beforeCommit action).

 

answered