Hi! I am trying to change the currently set userid in my user's espace. Originally what we do is that we wait for the userid in our outsystems user espace and create a table in influx with the said userid so that we don't have to bind separate ids for the one in our database and the one in outsystems. What happened was we already created an influx database with a userid that was different from the user's id in outsystems. Is there an easier to change this? Without us having to add another query to access the influx userid associated witht the logged in account? It's fairly easier to use GetUserId() for all our queries. Thank you and I appreciate the help!

Hi Ray,

why not use the external_id attribute in the users entity to store the user id of your influx database? 

Regards,

Daniel

Does updating the reference in influx works, but would be tedious.

Daniël Kuhlmann wrote:

Hi Ray,

why not use the external_id attribute in the users entity to store the user id of your influx database? 

Regards,

Daniel

Hi thank you so much replying! I found what you're referring to, but I can't seem to edit what's inside or add value to it. Thank you! 


Swatantra Kumar wrote:

Does updating the reference in influx works, but would be tedious.


Yeah! We already thought of that approach, we're trying to find an alternate solution that does not require altering our influxdb. Thank you for the suggestion tho!

Ray Mart Montesclaros wrote:

Daniël Kuhlmann wrote:

Hi Ray,

why not use the external_id attribute in the users entity to store the user id of your influx database? 

Regards,

Daniel

Hi thank you so much replying! I found what you're referring to, but I can't seem to edit what's inside or add value to it. Thank you! 



You can reference the users entity from the systems Espace and use it as any other entity. Default CRUD actions are available.

Daniël Kuhlmann wrote:

Ray Mart Montesclaros wrote:

Daniël Kuhlmann wrote:

Hi Ray,

why not use the external_id attribute in the users entity to store the user id of your influx database? 

Regards,

Daniel

Hi thank you so much replying! I found what you're referring to, but I can't seem to edit what's inside or add value to it. Thank you! 



You can reference the users entity from the systems Espace and use it as any other entity. Default CRUD actions are available.

Thank  you for the swift response! I get what your mean but I am relatively new to this environment. Once I made fetched data from the database, how do i update or add my external ids to each user? Do i make a server action?


Solution

You can fetch the user you want to update using an aggregate.

Assign the External_Id and then then use the Users entity CRUD action UpdateUser to update the current record of the aggregate.

Solution

Daniël Kuhlmann wrote:

You can fetch the user you want to update using an aggregate.

Assign the External_Id and then then use the Users entity CRUD action UpdateUser to update the current record of the aggregate.


Thank you so much! This worked for me. 

Hi Ray,

Your welcome, glad.i could help.

Regards,

Daniel