web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Suggested Answer

Look Up

(0) ShareShare
ReportReport
Posted on by 185
Hello All - I have one SP list that has multiple columns. 2 colums in my SP List 1 has a choice column and another is currency column. The same is linked to a form and when submitted, there are no issues. 
There is another SP list (SP List 2) is used to mirror some of the details from the SP List 1 via a Power apps form.
I am using a Form in Power apps where based on a unique ID, look up the details fro SP List and fetch the details from SP List 1. While all other fields which are text fields from SP list 1 are coming in, the Choice column and currecny column is not showing up.
 
When the unique ID is entered in field, there is a on change code where it looks up the detals from SP LIst 1 via a variable and value in each field is tagged as VarDetails. Tracking Number.Value
How can I ensure that the details poplulate and when the form is submitted, the details are being captured.
Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,323 Most Valuable Professional on at
     Hi @sankhlay,
    Some code (in Text please) would be useful here (how you set VarDetails ) and also how are your writing the data to the List (SubmitForm or Patch ).
     
    Assuming (for example), you have the correct value in VarDetails, is your question how to write it to the other SP list ? The easiest way (if you are using Patch ) is to simply include it in the code. If you are using SubmitForm (which I suspect), then the question is whether you are writing new records only on the Form, or also need it to display existing records. If only New and the target field is Text, then add the field to the Form and make the Default 
    VarDetails.'Tracking Number'.Value
    If however you also need to display / edit existing records, the Default would be 
    Coalesce(
       VarDetails.'Tracking Number'.Value,
       ThisItem.YourFieldName
    )
    Also if you do this, be sure to make VarDetails blank after you have finished with it.
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog
    Practical Power Apps    LinkedIn  
  • sankhlay Profile Picture
    185 on at
    For my on change property of Text Input in form, I have set the following code:
    Set(
        VarDetails,
        LookUp(
            SPList,
            Title = UniqueID.Value
        )
    );
    The other fields in the form are like this:
    VarDetails.TrackingNumber (Text Format)
    VarDetails.Code.Value (Drop Down in my first SP List, but here not showing up - I have made this drop down and also text - Still not working)
    VarDetails.Amount (Currency format in my first SP List, but here not showing up even though I have changed it to currency or text or number)
    For this scenario, the form will only be a new form and will not be edited by the user. 
  • Suggested answer
    WarrenBelz Profile Picture
    153,323 Most Valuable Professional on at
    OK - you have a Record in your Variable, so all is good there. You are also describing the control types, not the field types, however I will assume that the fields in the Variable are the same name and type as what you are writing to, so you have a Single Line of Text (TrackingNumber), a Number (Amount) and a Choice column (Code). If the user does not interact with any of these and the Form is for new records only, you actually do not need any controls in the relevant Data Cards.
     
    Add these fields to the Form as usual, but delete everything inside of them and hide them (although do this after you put the code below in). You can ignore the error you get as it will be fixed by the code below - all you need then is the Update property of each Data Card. This is far simpler than setting a control Default and then setting the Data Card Update to the correct output format of the control.
     
    TrackingNumber
    VarDetails.TrackingNumber
    Amount 
    VarDetails.Amount
    I need to assume here that the field in both your lists is a numeric - forget about the Currency for the moment - SharePoint stores it as a Number
     
    Code
    VarDetails.Code
    This is a tricky one (as above) both fields need in the lists needs to be of the same type - Text or Choice. You can go from one to the other but it is far simpler to make them the same.
     
    Also (this is important) if you change a field type in SharePoint, you need to delete and re-insert the relevant Data Card in the form as some settings that are done by Power Apps will be different.
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog
    Practical Power Apps    LinkedIn  

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 468 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 223 Super User 2025 Season 2

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 206 Super User 2025 Season 2

Last 30 days Overall leaderboard