Stuck with displaying specific user's data

Stuck with displaying specific user's data

Ok.  I have been trying to wrap my mind around the flow of things in the Agile platform.  I have been struggling for a week trying to figure out how to get each user to see their own data in a specific Entity.

Here's what i am looking to do:

A user logs in.
They are shown only the records that belong to them.

Sound's simple, but I am having a tough time with figuring out how to match their login information to a field in the entity so it only shows their own data.

Any help would be much appreciated.


Hello Bryan.

Regarding your question, just add an attribute to your Entity/Entities that represents a given user. That attribute's type is User Identifier. Whenever you insert a new record in the DB you set the user's id according to the currently logged in user. Then in your queries just filter out the records using the current user's id.

Thanks Joao.

So will this particular setup only work to display new records in a entity?  If so, how would you get it to work if you were looking at a entitiy that already had a bunch of data?

Maybe some additional information would help.  I have an entiy that was created by importing an Excel spreadsheet.  The entity has 3 attributes which were imported:


Basically, I want to match the logged on user with every record that has their user name(in this case their email address) listed in the UserID attribute.

Eventually we will want this to pull up records from an MS SQL database.  I thought I would keep it simpler by attempting the same thing with just the spreadsheet import.

Thanks again,

Bryan -

The User entity contains the email address and user name in it. So, if you want to match EXISTING data, just write an Action to be run by a Timer (give the Timer no schedule, just fire it manually in Service Center once you've deployed, and only once, then remove it), that does the following:

* Find all data in the Entity with User = NullIdentifier()
* ForEach over each record found
* Query the Users Entity by the email address in the data to find the appropriate User record
* Set the User attribute of the current record to the Id attribute of the retrieved User entity record
* Update the current Entity

That should do it!