Set Value action for People or group field type

Home Forums Modern DFFS Set Value action for People or group field type

Viewing 11 reply threads
  • Author
    Posts
    • #38233
      Amal Vellappillil
      Participant

        Hi, I am trying to use the Set Field Value action available in the rules to set the value of a Person or Group (multi value) field. The rule is getting data from field1 and setting value in field2. When I type in the first person’s name and select that person, field2 value gets populated as expected. When I type in a second person’s name and select that person, field2 does not get updated. I see an error in dev console:
        https://xxxx.sharepoint.com/sites/Intranet/_api/web/siteUsers/getByEmail(‘%20xxxxx@xxxx’) 404 (Not Found)

        As you can see there is a %20 in front of the actual email address and because of that user is not found. So this seems like a bug. Can you look into this?

        I also tried to use the setFieldValue function, but that didnt work either. With this there were no errors in dev console. I tried different ways to use this function from js.
        – setFieldValue(‘field2’, getFieldValue(‘field1’); <– this didnt work at all.
        – I tried using a for loop to iterate over values from ‘field1’ and tried setFieldValue(‘field2’, values[i].email). <– this updated field2 with the first person from field1, but second person was not brought over.
        How do you use this setFieldValue function in this case?

      • #38234
        Amal Vellappillil
        Participant

          I dont know why there is a &#8217 at the end of the url, but the actual url is as follows:
          https://xxxx.sharepoint.com/sites/Intranet/_api/web/siteUsers/getByEmail(‘%20xxxxx@xxxx&#8217;)

        • #38241
          Alexander Bautz
          Keymaster

            Are both Field1 and Field2 multichoice? Can you email me a screenshot of the rule you use to set the values?

            Alexander

          • #38242
            Alexander Bautz
            Keymaster

              No need to send anything – I found the problem and will fix it in the next release (probably sometime next week).

              Alexander

            • #38297
              Amal Vellappillil
              Participant

                Hey Alex, any update on when the next update will be available with these fixes?

              • #38298
                Alexander Bautz
                Keymaster

                  I have a few other issues left before I can release the next version, but hope to get it done during the weekend.

                  Alexander

                • #38299
                  Amal Vellappillil
                  Participant

                    Ok, thank you for the update.

                  • #38315
                    Amal Vellappillil
                    Participant

                      Hi Alex,

                      I see that a fix was provided for this issue in version 1.0.73. However, I feel like its only partially fixed. Here is the behavior I am seeing:
                      – Field1 is people picker field, Field2 is people picker field.
                      – Rule set field value (field1 is changed set the value in field2 from field1)
                      – When people are added to field1, they are getting added to field2
                      – When people are removed from field1, they are not removed from field2 (this feels like a bug)
                      – Only when everyone has been removed from field1, everyone gets removed from field2

                      Right now I am getting around this by running two set field value actions in the rule.
                      – First set field2 to blank
                      – Then set field2 to field1 values.

                      Thank you for all your work on this and I hope a fix will be issued in the next release, so the feature works in the most natural form than going through work arounds.

                    • #38317
                      Alexander Bautz
                      Keymaster

                        Hi,
                        Are both of your people picker fields multichoice?

                        Alexander

                      • #38318
                        Amal Vellappillil
                        Participant

                          Yes they are both people picker fields with multichoice.

                        • #38324
                          Alexander Bautz
                          Keymaster

                            I have added a new option “Clear the previous value before setting new value” to the Set field value action in the rule-builder.

                            Alexander

                          • #38326
                            Amal Vellappillil
                            Participant

                              Thank you so much, this is working as expected now.

                          Viewing 11 reply threads
                          • You must be logged in to reply to this topic.