cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

If statement to show information in list rather then new

Hello,

 

I am in need of some assistance I have a power apps form that when I click on an existing entry it shows the field as new rather then what has been already entered. I am trying to use the below formula but it doesn't seem to work and gives me a scope error. Any help with this formula would be greatly appreciated.

 

If(SharePointForm1.Mode=FormMode.New,Table1,'Unit Number')

 

Capture.JPG

 

7 REPLIES 7
Highlighted
Super User
Super User

Re: If statement to show information in list rather then new

@J0hn 

You'll need to show more information in the screenshot

  • What property are you entering the info in
  • What control are you entering this info in
  • What type of control is it?

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted
Helper II
Helper II

Re: If statement to show information in list rather then new

Sorry I have tried entering in the Default area and item. the control is a drop down that refences a table on an excel spread sheet.

Highlighted
Super User
Super User

Re: If statement to show information in list rather then new

@J0hn 

The Default property needs you to input a single-value.  I noticed that if a form in New you are trying to put a table there.  What single-value do you want to show if the form is New?  What about its not a New form? 

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted
Helper II
Helper II

Re: If statement to show information in list rather then new

@mdevaney 

If its a new form I want it to look at table 1 and specifically the Column stock numbers. If it's not a new form I want it to look at the column called unit number on the sharepoint list. I have attached 2 screenshots below.

 

Capture.JPG2.JPG

Highlighted
Community Support
Community Support

Re: If statement to show information in list rather then new

Hi @J0hn ,

 

What is the items property of combobox1?

My understanding: you want the dropdown to show stock numbers from Table 1 when form mode is new, and let dropdown show unit number when the form is not in the new mode, right?

I think you should apply the code into Combo box1 Items property:

If(SharePointForm1.Mode=FormMode.New,Table1.'Stock Numbers','SP list'.'Unit Number')

Hope this helps.

Sik

Highlighted
Helper II
Helper II

Re: If statement to show information in list rather then new

Hello @v-siky-msft ,

I think your solution has helped but I am receiving the below warning and I am not receiving and data from table 1. in the Item field if I just put table 1 it pulls the information from the table. My other question is I want all the other field to depend on the Stock number so once selected based on the table it fills in the corresponding Make, Serial number etc.

Capture.JPG

 

Also looks like I am accessing the right table when adding a new form but when I look at an existing form that has been completed i dont see the unit number that was already inputted and saved.

tempsnip.jpg

Highlighted
Helper II
Helper II

Re: If statement to show information in list rather then new

@v-siky-msft 

 

I think I am starting to figure this out. I have made some corrections on my end to better simplify things. Now the issue is that I am not seeing the already submitted information to the sharepoint list. New Items work no problem. When I double click on an existing list item the unit number shows blank even though the information is in the column on the list. If I can get the unit Number to show from existing list items that have been submitted everything will work correctly. I tried using the below but it shows no items from "Table1. Stock number" just show blank list. I inputted the formula in the suggest area "Items". Thanks for all your help!

If(
SharePointForm1.Mode = FormMode.New,
Table1.'Stock Number','Agricultural Equipment Demo Approval'.'Unit Number'
)

Sharepoint list item: 

tempsnip.jpg

 

 

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (7,072)