How to get value of input inside a table record ?


I have a table record with colum Account, Vote get from Database and Column PIN contain an input widget alow user to input PIN.

Please help me a soluton to get value of input in column PIN when click button Change on each record.

I want to pass this value to a Server Action to set condition insert data.

Thanks you.

Bruno Marques wrote:

Hi Dan,

The Change button is related to a screen action, right? 

You should have an input parameter PIN for that screen action and pass the TableRecords.List.Current.EntityName.PIN, where TableRecords is the name of your TableRecords widget and EntityName is the name of the entity that has the PIN attribute. 

Then, in the screen action you can call a server action with the PIN value.

Best Regards!

Hi Bruno

Thanks for your support.

I have an input parameter PIN but I want get value get from input widget entered by the user and pass it to PIN parameter .

There are another way to get it ?

Regards,


Hi Dan,

If you call a Screen Action when clicking the Change button, the Current of the TableRecords.List holds the value that's input. Of course, you should make sure the Input Widget also uses the TableRecords.List.

Sorry Dan, I deleted my answer because when testing your use case on my PE, my suggestion isn't working, which is very strange. 

Nevertheless, as far as I can see, you were right :).

Kilian Hekhuis wrote:

Hi Dan,

If you call a Screen Action when clicking the Change button, the Current of the TableRecords.List holds the value that's input. Of course, you should make sure the Input Widget also uses the TableRecords.List.

Hi Kilian,

How can I make sure the Input Widget also uses the TableRecords.List ?

Thanks you very much :D 

You should set the Input Widget's Variable Property to TableRecordsName.List.Current.EntityOrStructName.Attribute (where TableRecordsName is the name of the Table Records, EntityOrStructName the name of the Entity or Structure that contains the PIN, and Attribute the name of the Attribute that holds the PIN). This is exactly the same as when you would showit in an Expression.

Bruno Marques wrote:

Sorry Dan, I deleted my answer because when testing your use case on my PE, my suggestion isn't working, which is very strange. 

Hi Bruno

No problem, It still working. But I want to get value entered by user instead of get from database.

Regards,

Dan

Hi Dan,

If the PIN is not in the database at all, you need to add a dummy value (either as output of an Aggregate, or as a seperate Structure) to your List that is the Source of the Table Records.

Solution

Hi Dan,

Adding to the above mentioned explanation, I just want to add some practically implemented solution screenshots:

1) I observed that you are binding the TableRecords widget Source Record List with an Aggregate output List which is defined in the Preparation action flow.

In that case, I will introduce one more structure in Aggregate Source along with the main entity.

Text Structure (Available in Text Extension or you can define your own structure with one attribute which is of type Text) - Renamed the structure to PIN



2) Bind the Text (i.e PIN) structure attribute with the PIN input widget which is defined inside the TableRecords widget


As mentioned below you can check whether the Input Widget also uses the TableRecords.List

3) On the Change button action flow, I defined a Feedback Server Action with message as current record/row PIN Value (in your case you will use Assignment Node)


Check this: https://sbsam.outsystemscloud.com/UI_SampleApp/Sample.aspx


Hope this helps you!


Thanks & Regards,

Benjith Sam

Solution

Hi Benjith,

Thanks you very much for your reply. I will try it.

Regards,

Dan

Dan Tran wrote:

Hi Benjith,

Thanks you very much for your reply. I will try it.

Regards,

Dan


Hi Dan,


Happy to hear that it helped you :)


Thanks & Regards,

Benjith Sam