Compute data and insert into database

Hi All,

I am new to outsystem.

I would like to pass some derive value(example: created date, description) and form data and insert into database.

Notice that most of the example is directly get from form record, but i am not able to do so due to derive value.

How can i assign the value into the field of the table structure and insert into database table?

Example: my form has only 1 input field - count.

But i would like to insert additional data such as "In/Out", created date, created time, count and so on into database table.

Thank You.


Ting Xuan Chong wrote:

Hi All,

I am new to outsystem.

I would like to pass some derive value(example: created date, description) and form data and insert into database.

Notice that most of the example is directly get from form record, but i am not able to do so due to derive value.

How can i assign the value into the field of the table structure and insert into database table?

Example: my form has only 1 input field - count.

But i would like to insert additional data such as "In/Out", created date, created time, count and so on into database table.

Thank You.


Hi Ting Xuan Chong,

Expand (click on the + icon) the source property of the operation and you can assign desired values in there.



Manish Jawla wrote:

Hi Ting,

have you gone through the below learning:

https://www.outsystems.com/learn/courses/115/developing-mobile-apps-outsystems-11/

Hi Manish Jawla,

I have gone through the learning.

Thank You.



Joshua Padaoan wrote:

Ting Xuan Chong wrote:

Hi All,

I am new to outsystem.

I would like to pass some derive value(example: created date, description) and form data and insert into database.

Notice that most of the example is directly get from form record, but i am not able to do so due to derive value.

How can i assign the value into the field of the table structure and insert into database table?

Example: my form has only 1 input field - count.

But i would like to insert additional data such as "In/Out", created date, created time, count and so on into database table.

Thank You.


Hi Ting Xuan Chong,

Expand (click on the + icon) the source property of the operation and you can assign desired values in there.


Hi Joshua,

Noted and thank you.

I am aware that we can assign desired values here, just that I am unsure how to assign values into the entity structure by field. I created a variable with the entity structure, then assign the value by entity.fieldname = XXX, then pick this variables in source. Not sure is this is a right way.







Solution

Hi Ting Xuan Chong,

when you call entity data create  action just before assign value which not pass from Form Inputs

just like 

entity.Fieldname="Value" 

and after that assign this entity to create action. this is a write way.

also you can do one thing create a server action for Insert data into Entity and this server action take only input which provide by form value and other value of fields assign in this server action.


Regards

Rahul Sahu

Solution

Hi Ting,


Please see the below might it help.

HI Ting Xuan Chong,

I would like you to understand few things here .

1. Any action like CreateTrans , CreateOrUpdateTranse need an record input parameter of the same entity type and it is not always required that this source can only be get from form record.

You can create a local variable of the entity record type and assign the value to that record , you can also bind the attribute of that record to the widgets like input box , drop-down etc to hold the value directly and than can pass that record to entity actions as required.

Regards,

-PJ-


Thank You for the confirmation.



Rahul Sahu wrote:

Hi Ting Xuan Chong,

when you call entity data create  action just before assign value which not pass from Form Inputs

just like 

entity.Fieldname="Value" 

and after that assign this entity to create action. this is a write way.

also you can do one thing create a server action for Insert data into Entity and this server action take only input which provide by form value and other value of fields assign in this server action.


Regards

Rahul Sahu