Variables in json

28 views
Skip to first unread message

Joe Faneuf

unread,
Feb 3, 2020, 7:35:56 AM2/3/20
to GAM for G Suite
I am using GAM to edit a google sheet and I am able to pass data to the sheet correctly but I don't understand how to pass variables in the command.  This is what I have so far without variables.

gam user *google username* append sheetranges drivefilename testjoe json '[{\"range\": \"A1:C1\", \"values\": [[\"r\", \"s\", \"t\"]], \"majorDimension\": \"ROWS\"}]' userentered includevaluesinresponse 

but in place of the r,s,t I would like to put variables.

How do I accomplish this?  I have tried everything without success.

Thank you,

- Joe

Ross Scroggs

unread,
Feb 3, 2020, 10:33:08 AM2/3/20
to google-ap...@googlegroups.com
Joe,

What OS are you on? Do you mean variables as in shell/command prompt/powershell?

Ross


NOTICE: The Secretary of the Commonwealth of Massachusetts has determined that email is a public record. Please keep this in mind when writing or responding to any emails. All e-mail messages sent from Narragansett Regional School District are archived in compliance with state and federal public records law.

This communication may contain privileged or other confidential information. If you are not the intended recipient, or believe that you have received this communication in error, please do not print, copy, retransmit, disseminate, or otherwise use the information. Also, please indicate to the sender that you have received this email in error, and delete the copy you received.

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/96e0c2e7-3389-4dcc-8f18-4f9773f3bc99%40googlegroups.com.


--

Joe Faneuf

unread,
Feb 3, 2020, 10:59:05 AM2/3/20
to GAM for G Suite
I actually just figured it out.  This is for powershell and I was having an awful time trying to get variable names into the json string.  

Ross Scroggs

unread,
Feb 3, 2020, 11:02:46 AM2/3/20
to google-ap...@googlegroups.com
Joe,

For all us PowerShell noobs, what does the command look like?

Ross


NOTICE: The Secretary of the Commonwealth of Massachusetts has determined that email is a public record. Please keep this in mind when writing or responding to any emails. All e-mail messages sent from Narragansett Regional School District are archived in compliance with state and federal public records law.

This communication may contain privileged or other confidential information. If you are not the intended recipient, or believe that you have received this communication in error, please do not print, copy, retransmit, disseminate, or otherwise use the information. Also, please indicate to the sender that you have received this email in error, and delete the copy you received.

--
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.


--

+KimNilsson

unread,
Feb 22, 2020, 9:01:30 AM2/22/20
to GAM for G Suite
@Joe, please post how you solved it.
Reply all
Reply to author
Forward
0 new messages