Bulk user update - Igonre empty fields .

88 views
Skip to first unread message

khalid khalifa

unread,
Jan 16, 2017, 11:44:42 AM1/16/17
to GAM for G Suite
Hi Jay,

Thank you for this amazing tool!

I have an issue with bulk update from a csv file. I have a multi valued fields with values in many columns. The problem is that my users don't all have the same number of values.

So I have users with two values and other with only one. This means that for those users the second column is empty. When I execute the update command gam csv,  I specify the two columns as input for the same multivalued field and GAM creates one entry with a value and the second is also created but it contains nothing.

My question is this: is there a way to tell GAM to ignore the filed if it is empty. So for users with only one value I have only one entry created.

Thinks,
Khalid

Ross Scroggs

unread,
Jan 16, 2017, 9:37:03 PM1/16/17
to google-ap...@googlegroups.com
Khalid,

Give me an example of your schema and the command you execute to do the update.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/ecf96dcb-98cc-4c08-a2d4-641c0d9100c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ross Scroggs

unread,
Jan 16, 2017, 11:21:20 PM1/16/17
to google-ap...@googlegroups.com
Khalid,

I've implemented what you want in my version: https://github.com/taers232c/GAM-B/releases
This is a drop-in replacement for Jay's version. I'll pass the enhancement along to Jay.
Install it in a new folder, copy client_secrets.json, oauth2.txt and oauth2service.json from your existing folder to the new folder.
No new projects or authorizations are required.

gam csv users.csv gam update user "~User" Schema.Field multinonempty "~MultiValue1" Schema.Field multinonempty "~MultiValue2"
If columns MultiValue1 or MultiValue2 are empty, they will not be added.

Let me know if this does whjat you want,

On Jan 16, 2017, at 8:29 AM, khalid khalifa <kkha...@gmail.com> wrote:

Reply all
Reply to author
Forward
0 new messages