0

I am trying to create a kind of registration tool with a Sharepoint list (next step could be to create an app), but I am struggling to get the value of a lookup column. I read a lot of forums and tried a few things but I must be doing something wrong and I can't figure out what it is...

I have a list called "Yoga Schedule", where the goal is to show the dates for the classes and how many slots are still available for registration.

enter image description here

Then I have a second list for registration, where the person will need to enter the date they want to register, which is a lookup column from the list "Yoga Schedule", and their name.

enter image description here

So to show the remaining slots for that date in list "Yoga Schedule", I created a column called "Registered", which is a lookup (Count Related) of the date in list "Yoga Registration"

enter image description here

My next step would be to calculate "Max Slots" minus "Registered", but I know lookup columns can't be used in calculated columns, so I tried to work it out with Microsoft flows by creating a mirror of my "Registered" column that can be used in a calculation for the "Remaining Slots". My flow seems to work but I don't get any value in column "Registered Mirror", it's all empty.

enter image description here

Am I doing something wrong?

  • Why are you not using Powerapps for all these customizations? Powerapps is the best solution to perform calculations on your list forms. – harshal gite Nov 4 '19 at 7:40
1

Sample test demo:

Show Parent item id in lookup column(so you could use it in Flow).

enter image description here

Call SharePoint rest api to get the lookup count so you could use to calculate.

enter image description here

enter image description here

0

Thank you Lee_MSFT, I think you are onto something. Unfortunately I don't have that much experience with programming so even using an API can be tricky for me. I did some reading and it looks like it can work, as you said, but I think I am not doing it 100% right because it still doesn't work even after trying to add the parenting ID in the lookup. Can you see if I am doing something wrong?

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.