Skip to main content
October 17, 2022
Question

creating bulk users and Adding array of bulk users to group through code

  • October 17, 2022
  • 3 replies
  • 0 views

Hi All,

I wanted to write a query which takes input as form of array for each user ("email","firstname","lastname"), and want to map those values to parameters of createUser method, Any suggestions?
I tried to write a code but it seems not working, As I have little knowldege in Appian.
Below is the code I have written, I know it is wrong can anyone help me to get the correct logic/Code? 


3 replies

stefanhelzle0001
Brainy
October 17, 2022

I highly suggest to create a process model to create users and add them to groups.

But first, make yourself familiar with Appian by attending the Appian Academy trainings. Assuming that you are coming from traditional software development, it takes a bit to change your way of problem solving.

tanvirs0003
Inspiring
October 17, 2022

to create user & adding them into group use Process models, in process model there are smart services to create user & add user to Group use them. If you are creating multiple users, then use looping or MNI to achieve it 

amans0009
October 17, 2022

errors in your code->

1. in your  a!foreach there are 6 items , not 2 and the indexes you are accessing doesn't exist in this case.
2. Create a new user, This function will only execute inside a saveInto or a Web API .