Appian Community and Appian Academy are being upgraded. As a part of the upgrade, Appian Community is currently in read-only mode, and user registration is disabled until August 3. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!

The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.

What´s the best way to work this and why does it gives me this error?

Hello, 

I'm not quite sure if  I'm working with this pickerFieldRecord correctly (it is not saving any value in the rule input) and I don't understand why it says that "idSkill" is type Text because it isn't... 





 a!localVariables(
  
  local!Skill,
  
  
 
 (...)
 
 
 
 
 
 a!pickerFieldRecords(
                    label: "Competências",
                    labelPosition: "ABOVE",
                    placeholder: "-- selecione uma ou mais competências --",
                    maxSelections: 3,
                    recordType: 'recordType!{b10f5f28-725c-4c8b-a211-776386be5222}RM_ref_Skill',
                   
                    value: ri!recordCandidateSkills.idSkill,
                    saveInto: {local!Skill, a!save(
                      ri!recordCandidateSkills.idSkill,
                      if(
                        a!isNullOrEmpty(local!Skill),
                        {},
                        a!forEach(
                          local!Skill.idSkill,
                          property(fv!item, "idSkill", null())
                        )
                      )
                    )},
                    
                    

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to joaoc1131

    don't understand why what?

    Your "local!skill" local variable is a simple array of ID (integer).

    But in your a!forEach call, you're trying to iterate over a (nonexistent) "idSkill" property (this is the source of the error message in your screenshot as far as I can tell).  That is, "local!Skill.idSkill" does not exist, but you're calling it using the dot property operator.

    Then, inside your forEach loop, you're trying to reference yet another property of fv!item (despite the fact that even if local!skill DID have the "idSkill" property, fv!item would already just be the simple integer, and would not have its own "idSkill" sub-property).  This wouldn't cause the error in question, but the result of this would only ever be null.

Children
No Data