Set Field from sessionStorage

I am new to Radzen and tried to look for ths answer without much luck.

My goal is to set a field property on a table called UserId, which is the logged user id (guid).

What I have done so far is to add an hanlder after login (Then > Execute) and set a property called UserId,as per below. But my question is how do I set a field on a particular page/table using sessionStorage.getItem("UserId").

sessionStorage.setItem("UserId",event.Id);

Thank you
Paul.

Could you elaborate on your requirement? What exactly are you trying to do? You should be able to use a Set property action and set the Value to sessionStorage.getItem("UserId").

All I am trying to do is set the UserId column of the logged in UserId so that I can track who created/updated a record.

What is the UserId column? You probably need to pass that as a parameter of the method you use to create / update a record. Radzen's built-in security already does that by providing the current user.

I have a table called Orders, in this table I have a UserId column. When I create a new record, I want to insert the UserId (not the name/email) from the logged-in user.

I am able to user "${security.user.name}" but this contains the email address, not the UserId.

You can probably use ${sessionStorage.getItem("UserId")} instead of ${security.user.name}

However if you are using Radzen's built-in security there are better and more secure ways to do that:

Here is how this is used in the Complete application tutorial:

Finally you can check this thread which shows how to persist such history for more than one table:

I might be doing something wrong here, but I keep getting the following error:
ng-cli:
ERROR in src/app/add-inspection/add-inspection-generated.component.ts(54,8): error TS1005: ';' expected.
src/app/add-inspection/add-inspection-generated.component.ts(54,14): error TS1005: ';' expected.

I am using the Set Property on Submit, Name = event.value.UserId, Value = ${sessionStorage.getItem("UserId")};