cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
johnjohn123
Super User
Super User

My Status drop down list will appear empty when we edit the list item

We have a status drop-down field named "Document Approval Process Status", which is disabled and we are setting its value using 2 buttons + variable as follow:-

 

var1.png

 

and we are setting the "Document Approval Process Status" value using 2 buttons as follow:-

 

 

sendforsub.png

 

now the setting is working well in respect that if we click on the "Send for submission" button >> the "Document Approval Process Status" will be set to "Submitted".. but the issue is that when we edit a list item , the "Document Approval Process Status" will always be empty!! any advice on this please?

14 REPLIES 14
v-bofeng-msft
Community Support
Community Support

Hi @johnjohn123 :

Firstly,let me explain why you encountered this problem:

   After you set the default value of the combobox to Var1, the combo box cannot display the real status of this item by default. Especially if the value of Var1 is empty at this time (you did not select the button), then the default value of the combo box will be empty.

 

 

Secondly,please try these solutions:

Solution 1:

1\Set the DefaulSelelctedItem property to:

 

If(ChangeState,Var1,Parent.Default)

 

2\Set the button's OnSelect property to:

 

Set(ChangeState,true);
Set(Var1,FilterXXXXXXXX);
SubmitForm(SharePointForm1);
Set(ChangeState,false);

 

Solution 2:

1\Set the DefaulSelelctedItem property to:

 

If(IsBlank(Var1),Parent.Default,Var1)

 

2\Set the button's OnSelect property to:

 

 

Set(Var1,FilterXXXXXXXX);
SubmitForm(SharePointForm1);
Set(Var1,Blank());

 

 

Best Regards,

Bof

 

@v-bofeng-msft  the following formula:-

 

If(IsBlank(Var1),Parent.Default,Var1)

 

is raising this error; the IF statement has some invalid arguments? any advice?

Hi @johnjohn123 :

Please try:

If(IsBlank(Var1),ThisItem.'Document Approval Process Status',Var1)

Best Regards,

Bof 

@v-bofeng-msftok i tried your formula, but i got an error, as shown below:-

 

errrrrrrrrrrrrrrrrrror.png

 

did it work on your side?

Thanks

v-bofeng-msft
Community Support
Community Support

Hi @johnjohn123 :

I've made a test but it worked well:

1.JPG

Please check weather 'Document Approval Process Status' allows multiple selections.If it do not allow multiple selections the button's OnSelect property should be:

Set(Var1,Lookup(XXXXXXXX));
SubmitForm(SharePointForm1);
Set(Var1,Blank());

Best Regards,

Bof

@v-bofeng-msft  but it is not working , here are the errors on the formula:-

 

errors.png

 

also where you added the formula? inside the Default or the DefaultSelectedItems? as i am adding the formula inside the DefaultSelectedItem.. and my drop-down only allow single selection....

Hi @johnjohn123 :

Please check weather 'Document Approval Process Status' allows multiple selections.If it do not allow multiple selections the button's OnSelect property should be:

 

Set(Var1,Lookup(XXXXXXXX));
SubmitForm(SharePointForm1);
Set(Var1,Blank());

 

Best Regards,

Bof

@v-bofeng-msftthe dropdown does not allow multiple selection.. now let us fix the Default problem before going to the OnSelect...

Hi @johnjohn123 :

The reason for your error is that the data type from the parameter is wrong.And this parameter is set by OnSelelct. So you need to find the root cause of the problem.

In addition, my question is that whether the "Document Approval Process Status" field supports multiple selections, not whether your combobox supports multiple selections.

Best Regards,

Bof

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,038)