cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JHS2020
Resolver II
Resolver II

Dropdown patch value and subtract amount

Hi, I have made a overview of an order. An admin should choose what computer the employee should have, which will be a look-up column. When the computer is choosing from a dropdown, when pushing a button the computer should be subtracted from the lookup. But I cannot seem to get this to work. :S

 

This is the item of an order, where an Screen have been chosen and the amount that fits to that item

The overview of orders.PNG

The Lookup list 

 

TheStockWhereTheOverviewHasIt'sLookupFrom.PNG

This is the code that I am trying to patch to the list of number two picture

OverviewOfTheOrder.PNG

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @WarrenBelz 

Thank you so much for you help!! I am grateful! 😄 

I used this code 

SubmitForm(Form1_6); 
Navigate(Screen1); 
SubmitForm(Form2_5); 
SubmitForm(Form3); 

Patch(
   Stock,
   LookUp(
      Stock, HardwareType in DataCardValue7.Selected.Value
   ), 
   {Amount:Value(Label6.Text)-1}
)

View solution in original post

5 REPLIES 5
WarrenBelz
Super User III
Super User III

HI @JHS2020 ,

I am assuming HardwareType has unique values and DataCardValue7 is the drop-down containing these values. Assuming HardwareType is a Lookup column, the below is some syntax guidance and may not be quite right, but try this 

SubmitForm(Forml_6); 
Navigate(Screenl);
SubmitForm(Form2_5);
SubmitForm(Form3); 
Patch(
   Stock,
   LookUp(
      Stock,
      HardwareType.Value=DataCardValue7.Selected.Value,
   ), 
   {Amount:Value(DataCardValue37.Selected.Value)-1}
)

 

Please click Accept as solution 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 giving it Thumbs Up.

 

Hi @WarrenBelz 

Thank you so much for you help!! I am grateful! 😄 

I used this code 

SubmitForm(Form1_6); 
Navigate(Screen1); 
SubmitForm(Form2_5); 
SubmitForm(Form3); 

Patch(
   Stock,
   LookUp(
      Stock, HardwareType in DataCardValue7.Selected.Value
   ), 
   {Amount:Value(Label6.Text)-1}
)

View solution in original post

@JHS2020 ,

You have marked your own post as the solution?

@WarrenBelz Yes, is that wrong? There was some minor details in your solution which did not was correct. If you look at the codes there are some differences

Hi @JHS2020 ,

If my code guided you to the solution, then you have the option of also marking this.

I can only respond to the information you provide and I believe I did this. If this helps you to do the last bit from your own knowledge, then my solution may be the answer for someone else with a similar question.

 

 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (58,385)