cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Regular Visitor

Use user inputs in lookup formula

Hi,

 

I'm Trying to use lookup formula:

LookUpTableFormula , Column)

 

The Column is an input value that I’m getting from the user (like I’m asking “in which column do you wish to look for”).

The user is selecting the value from a dropdown list – which named Week_Period

The value which the user provides is a week period, like the following: 10/25/2020 – 10/31/2020

The required values should be a rate (a number) which matches to this specific Week_Period

 

I set the formula as follow, 

LookUp('Rates',[formula],Week_Period.SelectedText.Value)

 

But the returned value I’m getting is: 10/25/2020 – 10/31/2020

 

 

If I’m using a constant value in the formula like in below I’m getting the correct value:

LookUp('Rates',[formula],’10/25/2020 – 10/31/2020’)

 

Appreciate your help.

 

Thanks,

YanivLisha

4 REPLIES 4
Super User II
Super User II

@YanivLisha 

I'm afraid that what you want to achieve, dinamically select a column from a list is not possible.

I think you should reconsider your solution and create a column to keep the Week_Period for each record .

 

@gabibalaban thank you for your reply.

I'll need to rethink my data structure in that case.

Hi @YanivLisha ,

If your week period is from a reference list, you could add two extra columns for start and finish date then do something like this

With(
   {
      wDates:
      LookUp(
         YourReferenceList,
         YourPeriodField=YourDropDown.Selected.YourPeriodField
      )
   },
   LookUp(
      YourMainList,
      YourDateField >= wDates.StartDateReference &&
      YourDateField <= wDates.EndDateReference
   )
)

Note that this query will not be Delegable.

 

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 @YanivLisha ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

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.

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (13,324)