Hide panel based on lookup value of list

  • 23 November 2020
  • 11 replies
  • 29 views

Badge +2

Hi Community

 

I'm facing the following situation an I hope somebody has an idea how to manage it to get work.

 

Basically the goal is to have a simple form where users can choose of different time slots (just one slot per user) of when they want to be migrated. We have different locations and each location and time slot has a limited amount of slots. That means location A with time slot 12:00 for example has 10 slots. So if 10 users booked this slot it shouldn't appear any more in the form. As I think it's not possible to hide specific lookup entries I thought I'm creating a column for each time slot and hide this if the maximum of 10 users is reached. That for I created a small workflow which calculates a count always +1 and writes it to the list (each slot has an own column for the count). Now I want to hide the column in the form as soon as we have a list entry for this slot with count 10. Unfortunately I can't manage to get it work. I thought of simply lookup for this value in the list but that doesn't seem to work. 

 

Are there any recommendations how to kind of lookup the list for the specific count of 10 in this example and then hide the column in the form? Or is there maybe an easier way to achieve the goal here? It wouldn't surprise me if I'm thinking a bit too complicated 🙂

 

Thanks & best regards

Markus

 

 


11 replies

Badge +2

A thought which also came to my mind. Is it somehow possible to work with a Nintex Workflow variable in Nintex Forms? As I'm always writing the current count of the item to a variable I already have the necessery information. It probably would be the easiest way to just hide the appropriate column by working with this variable. Unfortunately I can't find any possibility to access this Workflow variable in Forms.

Badge +11

Something quick that I can think of is to work with source views on your list lookup field. 

List A time slots available

column name: Time slot -entry for all 10 items 12:00

column name: Slot number -entry  # 1,#2,#3,#4,$5,...#10

column name: Slot taken-default value No

Create list view Slot taken = No

 

List B- Booking form

On your dropdown configuration settings enter source view Slot taken and have a workflow every time an item is created update List A, Slot taken to value Yes, that way that specific slot # will be removed from the dropdown.

 

 

Badge +2

Thanks a lot for your response. To work with views didn't really came to my mind. I still have some questions with this. If understood correctly with this option I'd create and entry for each time slot and number. So something like this. And in the booking form I'd have a lookup column which points to these time slots. Am I right? 

 

9537iBBBC16BEDDFE60A6.png

How can i define the source view 'Slot taken' in the dropdown configuration? I can't find the created view itself in the configuration settings 'source view'. I just find the colums itself in the Item Properties tab.

 

In my case now the dropdown in die form looks like follows, but each slot should just appear once of course, otherwise this would be a very long and confusing list.

 

9538i760AB9752D6C7CE3.png

 

 

 

Badge +11

@vaanmo In the Form, control settings you can add the source view, also you can create a calculated column on your time slot list so it can display time + slot number and even dates if necessary. 

 

** I meant to say list lookup dropdown, See below

 

9540i484E77995FC6246C.png

 

9539i8A0538B52ECBB321.png

 

Badge +2

@Nunezma Okay got it, that works so far. But now each single time slot is visible in the lookup. So if there are still 10 slots available, all of them can be chosen like on my screenshot above. The goal is to just give the users the option to choose between e.g. the following slots, independently of how many of that slots are available. Just if the last slot of that particular time is booked, it shouldn't be visible any more for the next user. Also we'll have different locations. So in the end it should look something like that. 

 

Paris 01.01.21 12:00

Paris 01.01.21 14:00

London 01.01.21 14:00

London 01.01.21 16:00

Paris 02.01.21 12:00

Paris 02.01.21 16:00

Berlin 05.01.21 08:00

Berlin 05.01.21 10:00

Badge +11

I see your requirements are a little different of what I had in mind so we have to tweak a few things,

You still need 2 lists, one for bookings and one for time slots.

On the booking list, you will need a dropdown choice  for locations Paris, London

and a list lookup dropdown for time slots (source view still the same and add filter based on the dropdown ), you will control the spots taken with a workflow that starts on items created and will do the count down from 10 spots available, once the last spot is taken it will update the time slots list to slot taken value Yes, that will remove the time form the dropdown on your booking list.

Times slot list should have 10 as default for spots available.

 

9552i695534E67689FFE6.png

 

You might have to add a few things but I did a test and it works for your requirements.

 

 

9549i9DD13101170149E1.png

9550iB94C9A96E0CE94F6.png

9551i5AEF5BA5649C913C.png

 

 

 

Badge +2

@claudiaurbanski That's the solution I was looking for, thank you very much. I almost managed it to get work. I'm just struggling with the query at the beginning of the workflow. In my case it always updates all items. The controls look like follows. What am I doing wrong here?

 

9572i8F41249073C7E2D9.png

 

 

 

9571iE5477E41A9E6F79D.png

 

 
 

 

 
 

 

 

 

 

Badge +11

@vaanmo  time would be the dropdown control name, in your case time slot

 

9575i191B778299D426A4.png

And query in the WF would be: Query time slots list  when Title (time slots list column containing Paris, London  city name) = Location (Booking list, dropdown on your form containing city name )

 

and dropdown (time slots list calculated column containing date & time) = time (booking list , in your case time slot control) Hope that helps 

9577i805BB0E95382F7E1.png

 

 

Badge +2

@Nunezma Thanks again. I would say that's exactly what I have at the moment. The only difference I can see is, that on the list lookup in my case 'Text connected to' is not connected to a column. I've no selection there, I could just connect the 'ID connected to' to the column Time slot. Could this be the reason?

9579iD3E2F297FB0EC957.png

 

9578i8D0E23EA3EA8C01F.png

 

 

Badge +11

@vaanmo yeah create a single line text column and then you will be able to connect text to time slot, you can also add log history on the workflow to see exactly where the issue is.

Badge +2

@Nunezma I just build everything new now and managed to get it work. The problem was with the update item control. Honestly I don't really know what this step should do resp. why it's necessery. I now configured the WF without this action, so I just write the slots available back to the list with the previous update multiple items action and everything works like it should. So, thanks again for your help 🙂

 

9585i535C1D22AAD4945E.png

 

Reply