How to create a data entity object from local variables
Question
Application Type
Reactive
Service Studio Version
11.10.22 (Build 42083)

Hi there

I like to store additional data to the current user, so I created a new database entity "UserData" with two attributes "User Identifier" and some date attribute.

Next I created a "save" button which is supposed to create a new entry in UserData with my UserID and the current date. Therefore I created a server-action calling "CreateUserData". But this needs a "UserData" record as input variable. My problem is now: how do I get a data record from local variables like CurrDate()?

Thanks a lot for helping me out!

Andreas

Test.oml

Champion
Solution

Hi Andreas,

José's answer is right, you should define a UserData type local variable, and assign input parameters to the variable.

Modified oml attached. Please refer to it.

Regards



Test.oml

Hi Andreas,

to create a UserData entity record you need to declare a variable of that data type. Then you should assign each value of the record and finally assign the UserData record to the server action "CreateUserData".

Regards

Champion
Solution

Hi Andreas,

José's answer is right, you should define a UserData type local variable, and assign input parameters to the variable.

Modified oml attached. Please refer to it.

Regards



Test.oml

Thanks a lot, José and Tom!

works fine :-)


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.