Entity Primary Key identifier assignment to Local Variable issue

Entity Primary Key identifier assignment to Local Variable issue

  

Hi All, 

I have a query about how to assign an output parameter (Identifier) in Run Server Action in OutSystem database to a local variable. 

Below debug mode show the output parameter "CreateJobApplication.Id" stored 18 and after the assignment process "ApplicationID" as "LVApplicationID = CreateJobApplication.Id", the result found that Local variable LVApplicationID still got 0. 


Any step I was missing ?  I would like to pass this master table Identifier to a variable and used by another form to create the master & details table relationship.  





Hi pwktommy,

Can you share a print or something to see your code?


Thanks1


Best regards,

Ricardo

Ricardo Pereira wrote:

Hi pwktommy,

Can you share a print or something to see your code?


Thanks1


Best regards,

Ricardo


Please find for below debug information for your reference.


Hi pwktommy,


As your code is you are assign 'false' to LVApplicationID. 

You don't need to put LVApplicationID = CreateJobApplication.Id. On second line put only CreateJobApplication.Id.






Solution

Plácido Miranda wrote:

Hi pwktommy,


As your code is you are assign 'false' to LVApplicationID. 

You don't need to put LVApplicationID = CreateJobApplication.Id. On second line put only CreateJobApplication.Id.

Thanks for your help, it's really an assignment issue and was fixed.







Solution

Plácido Miranda wrote:

Hi pwktommy,


As your code is you are assign 'false' to LVApplicationID. 

You don't need to put LVApplicationID = CreateJobApplication.Id. On second line put only CreateJobApplication.Id.


Hi Miranda, 

Thanks for your guidance, I have another question about the control of display container or table in web screen by click on a button.  Please help to check if there any step or reference doc I need to go through. Thanks again~!

1. Table default set to disable 

1

2. I would like to click a save button and turn the table enable to true

3. The logic of the save button as below





Hi pwktommy,

To do that you can use a local variable e.g. EnableForm. 

On save button ( with ajax method ) set the flag to true and then refresh the form. 

Something like this:


But if the form is Disable how user will set information to save?

I advise you to see the online courses

https://www.outsystems.com/learn/courses/15/developing-outsystems-web-applications/





Plácido Miranda wrote:

Hi pwktommy,

To do that you can use a local variable e.g. EnableForm. 

On save button ( with ajax method ) set the flag to true and then refresh the form. 

Something like this:


But if the form is Disable how user will set information to save?

I advise you to see the online courses

https://www.outsystems.com/learn/courses/15/developing-outsystems-web-applications/





Thanks Miranda, 


Can this method be apply to a container ?  I Would like to create a button for control to display the container that allow user to input the data of a editable table inside it.  Below is my idea using the javascript, is it possible to do so, thanks again~ You are really kind and helpful !