Skip to main content

Notifications

Announcements

No record found.

Service | Customer Service, Contact Center, Fie...
Unanswered

for,iterate, loop thru,through lookup options powerapps portal javascript

(0) ShareShare
ReportReport
Posted on by 437

here we go...

Is it possible in javascript to iterate the options an Account (customer) lookup?

something like:

$("#customer option").each(
what fields would I access to see the text and the value?

Ugh! i am having a brain fade.

  • urklnme Profile Picture
    urklnme 437 on at
    for,iterate, loop thru,through lookup options powerapps portal javascript
    I changed to another thing.  This gets the selected values and texts of a multi-select control
     
    // Get Array of selected accesses Option Values
        var selectedOptionValues = formContext.getAttribute("access_multi_select").getValue();
       
    //Get Array of selected accesses Option Texts
       var selectedOptionText = formContext.getAttribute("access_multi_select").getText();
        
    // for each access,  
    for (let i = 0; i < selectedOptionValues.length; i++) {    
              // do work here
    }
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,431 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,503 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans