I'm trying to do some runtime calculations and lookups which is causing me some problems on mobile form.
I have a form which displays employee name (read only) upon item creation. The form needs to automatically lookup the name from another list to get kilometers travelled in the current year. so the lookup needs to be based on 2 conditions where the Employee Name = formEmployeeName and the Year = current year.
Then I have 2 needs for the returned Kilometers value.
1. the KM needs to be displayed on desktop and mobile (which I'm finding that lookups are not supported for Mobile), so I can get away with not displaying it on mobile, but if there is a way. That would be great.
2ndly which I cannot skip is I need the value to be able to pass it to a form variable in runtime. So based on the range of the kilometers, I need to pass a certain mileage factor and do runtime calculations.
I first tried to use a lookup, where the user have to select their Employee ID from a list and then display the KM. which is very non-user friendly, can show other users ID's and also doesn't work on Nintex mobile and is causing the form to break. Totally wrong solution.
Here is what I did:
- I created a list column (single line of text) called "KMTravelled"
- I have a form variable called mileage-factor that should take the KMTravelled and checks the value and returns a certain decimal number. Currently it's getting the information manually.
- I created a calculated field that has the runtime lookup function as below. (Note that this function only looks up based on name but I still need it to check the year as well because this might bring in a previous year's cumulative KM)
Help please!! I need this fixed this week... It seems possible and should have been done before.. Just need the quick "how-to".
Thanks in advance!