connect additional data to user

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
jonko_svk
Posts: 7
Joined: 2015-06-01 18:01

connect additional data to user

Post by jonko_svk » 2015-06-01 20:41

Hi all,

I would like to find a way how to connect data from custom table to certain user.

For example I would like to store info that Joe has very good knowledge of excel. I know how to create "skill excel table" and store those info there but how to assign this info to Joe ?

Is it possible to display membership_*.* tables in appgini ?

Thank you

User avatar
shasta59
AppGini Super Hero
AppGini Super Hero
Posts: 231
Joined: 2013-01-08 19:40
Location: Calgary, Alberta, Canada

Re: connect additional data to user

Post by shasta59 » 2015-06-03 01:50

Can you give more info:

What version of AppGini are you using?
Do you want to have Joe own the record?
Do you want people to be able to search by Joe's name and get this info?
You can look at the membership tables by going to the admin section. Would you want everyone to see the membership info? This is not the best idea but can be done.

Thanks

Alan
Calgary, Alberta, Canada - Using Appgini 5.50 -

jonko_svk
Posts: 7
Joined: 2015-06-01 18:01

Re: connect additional data to user

Post by jonko_svk » 2015-06-03 08:34

At first I would like to thank you for your interest and your time.

I am using Pro - latest version.
I am trying to create, let´s call it, HR management app.
First part is , let´s call it employees section, there I want to assign to Joe some tables, as Skills, More informations and so on, and Joe and his manager would be able to see and edit those records. This is why I need to find a way how to create connections beetween Joe´s user_id login session and those tables.

Second part is, let´call IT HR manager´s section. This HRM user would be able to add, and manage all records in DB.

Yes I want to be able to search by Joe´s name and get his info.
I want to have admin section only to be accessible by app admin.

User avatar
shasta59
AppGini Super Hero
AppGini Super Hero
Posts: 231
Joined: 2013-01-08 19:40
Location: Calgary, Alberta, Canada

Re: connect additional data to user

Post by shasta59 » 2015-06-03 18:03

This is all covered, for the most part under the following help file:

http://www.bigprof.com/appgini/help/wor ... -interface

It may be worth the time to read through the online help as your questions are covered, for the most part, in the help section.

You can allow, based upon group or individual member various rights etc. Who can see, who can edit etc.

No need to add any code as what you need already exists in the generated application.

Alan
Calgary, Alberta, Canada - Using Appgini 5.50 -

jonko_svk
Posts: 7
Joined: 2015-06-01 18:01

Re: connect additional data to user

Post by jonko_svk » 2015-06-03 22:10

I am OK with permissions and all of this. This is not my problem. I have a problem in "Define/customize up to 4 info fields that new members". This is the reason why the user admin part is not enough for me because I need to add additional - more informations for users in another tables. My problem is how to extend or connect another tables/data to user.

pepemont
Posts: 2
Joined: 2015-06-05 17:06

Re: connect additional data to user

Post by pepemont » 2015-06-06 04:48

I had quite the same problem.

I needed to create a single record in a table to link with each username.

This is my approach :
- create a table with a primary key of type vchar (let's call it username for instance)
- select automatic fill of this primary key with "<%%creatorusername%%>"
- make the records of the table only visible/editable by owner.

This will lead to a "cannot leave username empty" error due to the fact that javascript check of empty primary key is performed before automatic fill of the field.

To correct this, make the following change in 'common.js.php' (assuming primary key is "username")


- if($j('#username').val() == ''){ modal_window({ ...

- if($j('#username').val() == ' '){ modal_window({ ...

This will of course validate any empty primary key ... Obviously, it will never be empty after replacing by creatorusername, so we don't really care.

With this approach, there will be a "duplicate key" message error if a user tries to create a second record ..

I also chose to display detail view on the same page as table view.

jonko_svk
Posts: 7
Joined: 2015-06-01 18:01

Re: connect additional data to user

Post by jonko_svk » 2015-06-06 21:02

Just want to ask again, if it is possible, or if I am missing something. thank you

4thstar
Posts: 16
Joined: 2014-06-26 15:39

Re: connect additional data to user

Post by 4thstar » 2015-07-13 22:47

Hi Jonko, how did you get on with this, I too needed something similar, for me I wanted to create a new table set and extend the details for each user.
the issue was how to automate this, so when adding a new user the extra data fields were created and linked to that user only so they could see it.

I know appgini lets us create a new set of fields and assign that new entry to a user manually..

the closest I got so far was to have a new dropdown field populated by all the members names when creating a new entry, and when saved it would automatically via a hook assign ownership to the chosen user in the dropdown..

So where are you at with this now?

Talk soon
Carl

jonko_svk
Posts: 7
Joined: 2015-06-01 18:01

Re: connect additional data to user

Post by jonko_svk » 2015-07-14 09:22

I am sorry, but I have decided to develop this project in another SW. Appgini is still interesting for me, but at this moment only for simplier projects.

4thstar
Posts: 16
Joined: 2014-06-26 15:39

Re: connect additional data to user

Post by 4thstar » 2015-07-14 10:04

Hi Jonko.
I am curious to know what SW you ended up using, would you be able to let me know, I am using Appgini and its great for many things, its helped me jump a little gap in my learning, so I cannot talk highly enough about it.

That said I know there are php programmers on here that would love to see other features added to Appgini, for me though I am finding the biggest gap is between the members system and the rest of the features, they seem to be too disconnected from each other.

For me a real important issue is a loggin system that's secure and that will let me manage members, Appgini does just that :) , with a rock solid login system and security script in place I can then learn my php and add features to this..

I find though I keep stripping back on the appgini features and all the generated pages and using custom built php pages to show what I need from the MySQL, but this then leaves me only with the login system of appgini and my own php pages..

this is just one step away from using an alternative login system and creating my own MySQL database , thus rendering appgini unneeded..

For me I would love to see an update to appgini that joins the login system to new tables and fields, something that will help join our custom new tables to the already generated members area, one step would be able to see tables like membership_users inside the appgini program itself.

currently we need to create our own tables and fields to store more client information, what would be great is if we could see and access and add new fields to membership_users directly from inside appgini..

just a thought :)

in any case, good luck with your projects.

Kind Regards
Carl

jonko_svk
Posts: 7
Joined: 2015-06-01 18:01

Re: connect additional data to user

Post by jonko_svk » 2015-07-14 19:18

Hi Carl,

check your PM.

4thstar
Posts: 16
Joined: 2014-06-26 15:39

Re: connect additional data to user

Post by 4thstar » 2015-07-20 08:23

Hi Jonko.
I checked a couple of times, but I have no PMs from you..
Kind Regards
Carl

Post Reply