cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jeckard
Level: Powered On

Lookup with Data Connector

I am looking for a way to auto Generate a number I have a Data Source of a sharepoint list with different Truck Types

Truck Type      Number

10,20,30           768

40,60                800

 

In the Form, the user picks which Type   20,   I want the system to get the last number for that Type and add 1 to it.

I thought I could do something like

LookUp(AssetNumb,Title=AssetPre.Value,Number + 1)  However I realize that I have multiple values in the list so  I would need to do a contains or somrthing like Title contains AssetPre.Value

 

Then I want it to make the asset number to be 20- 769

When the item is submitted I want it to save the form to the current list (which I have working) but also Update the Number list with the new number so that the next person will get number 30-770.

I don't know how to do create the look up to the Data source OR how to update the two list on save.

Any help would be great

 

4 REPLIES 4
Community Support Team
Community Support Team

Re: Lookup with Data Connector

Hi @jeckard ,

Where do you pick up the Truck Type within your app? From a Dropdown box?

Could you please share a bit more about the Truck Type field in your data source? Is it a Choice type column?

 

I assume that you pick up the Truck Type within your app from a Dropdown box, is it true?

 

I have made a test on my side, please take a try with the following workaround:

Set the Default property of the Text Input box within the Number field Data card in your Edit form to following:

 

LookUp(AssetNumb, TruckTypeDropdownBox.Selected.Value in 'Track Type'.Value, Number + 1)

 

 

If you could select multiple Truck types within the Dropdown box (a Combobox), please modify above formula as below:

Set the Default property of the Text Input box within the Number field Data card in your Edit form to following:

LookUp(AssetNumb, Concat(TruckTypeComboBox.SelectedItems, Value & ";") in Concat('Track Type'.Value, Value & ";"), Number + 1)

 

In addition, if the Truck Type is a Single text type column in your data source, please consider set the Default property of the Text Input box within the Number field Data card in your Edit form to following:

LookUp(AssetNumb, TruckTypeDropdownBox.Selected.Value in 'Track Type', Number + 1)

or

LookUp(AssetNumb, Concat(TruckTypeComboBox.SelectedItems, Value & ";") in 'Track Type', Number + 1)

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jeckard
Level: Powered On

Re: Lookup with Data Connector

the Prefix for the truck is a Choice field in Sharepoint.  I have tried AssetPre.Selected and this does not appear to work .

jeckard
Level: Powered On

Re: Lookup with Data Connector

I am not sure if this matters but the  Source Data field where the different choices are is in the Title field in a SharePoint list and they are separated by a , I could change if needed.

Community Support Team
Community Support Team

Re: Lookup with Data Connector

Hi @jeckard ,

Do you mean that these Truck Type choices are stored in the Title column in your SP List, separated by a comma (,)?

Could you please share a bit more about the 'AssetPre' that you mentioned?

 

If these Truck Type choices are stored in the Title column in your SP List, please consider modify above formula as below:

Set the Default property of the Text Input box within the Number field Data card in your Edit form to following:

LookUp(AssetNumb, TruckTypeDropdownBox.Selected.Value in Title, Number + 1)

Note: The TruckTypeDropdownBox represents the TruckType Dropdown box within your Edit form, where you could pick up the Type value.

or

LookUp(AssetNumb, TruckTypeDropdownBox.Selected.Value in Split(Title, ",").Result, Number + 1)

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 243 members 5,307 guests
Please welcome our newest community members: