How to insert member in a list in between an order using actions?
I have several lists which are needed to be updated by users. So, I have created a module with a flat list (contains numbers 1,2,3.....100) and line items with these lists names. Created saved views with one column (i.e. List named line item) and imported this column data in the list. Added a "Run import" action button so that user inputs the list members, run the process and the list gets populated.
To delete, I have one "SYS List Module" which has a "delete?" boolean, it gets triggered if the row number in user input module doesn't match with a list property (a number given to every member, it is given sequentially). Added this delete action button. If the member changes its place in the column, the delete boolean turns true.
To understand the problem, Let's assume a flat list with members 1,2,3,4,5,6
Now the user wants to input a new member between 3 and 4. If he cut 4,5,6 and paste down one cell and then enter 7 like 1,2,3,7,4,5,6 and run import process then "delete" boolean turns true for 7,4,5,6 because their row number doesn't match with the list property. Earlier it was like
Row number Earlier | List Property | List member | Delete Boolean |
1 | 1 | 1 | False |
2 | 2 | 2 | False |
3 | 3 | 3 | False |
4 | 4 | 4 | False |
5 | 5 | 5 | False |
6 | 6 | 6 | False |
After 7 is typed between 3 and 4
Row Number Now | List Property | List member | Delete Boolean |
1 | 1 | 1 | False |
2 | 2 | 2 | False |
3 | 3 | 3 | False |
4 | 7 | 7 | True |
5 | 4 | 4 | True |
6 | 5 | 5 | True |
7 | 6 | 6 | True |
How should I setup my modules and delete boolean so that user can add and delete members wherever he/she wants in the order without turning delete indicator true for any other members.
Thanks!
- Shubham
Answers
-
Considering you already have an import process in place to update the list, you could add the Order List action to that process to reorder the items in the list in the order you need. Would this satisfy your requirement?
0 -
@ryan_kohn
Hi Ryan,
It'll definitely satisfy my requirements but in Order List Action, I need one module with the list and one line item according to which the list will be ordered. Currently if I add anything in between the order and run import action, the new member goes in the end of the list. I want a line item to know where I have inserted the new member. I am unable to get to the solution. I already have a SYS List Module. This new line item should be in this module. How do I code it?
- Shubham0 -
Hi @ShubhamCh
I am not sure if there is any way to add the item in-between. There is a create action to add in the end of each list(list should be a numbered list or subset).
If any duplicate item added then we can put a logic to sort for boolean. I understand the logic you are asking but as I mentioned I am not sure of any way to add the item in-between to start with the logic.
Thanks,
Manjunath0 -
Ok, no problem. Thanks Manjunath!0