Solicitud de aprobación, programación de recordatorio mensual y permisos de edición

MARTIN VALERO Carlota - Contractor 100 Reputation points
2023-09-19T07:58:33.8966667+00:00

Buenos días,

Tengo una lista de Microsoft lists en la que durante los 8 primeros días del mes, todos los meses tienen que introducir un valor:

Mes Valor

Enero 89

Febrero 78

Marzo 98

Abril 78

Mayo

  • Me gustaría realizar un recordatorio mensual el día 1 de cada mes a un responsable, para que introduzca todos los meses el número en la columna valor, que cuanto introduzca ese dato se cree una solicitud de aprobación a otra persona y, si no se aprueba, se borre el número del valor introducido y vuelva a mandar otro recordatorio diciendo que su solicitud ha sido rechazada y debe volver a introducir el dato antes del día 8 de cada mes.
  • También me gustaría que el responsable solo pudiese editar la columna valor, solo tenga permisos de edición durante los 8 primeros días de cada mes y después no pueda volver a editar la lista hasta el próximo mes desde el día 1 al día 8 de ese mes.

¿Cómo podría realizar esto con un flujo de power automate?

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,346 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,716 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,981 questions
SharePoint Workflow
SharePoint Workflow
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Workflow: An orchestrated and repeatable pattern of business activity, enabling data transformation, service provision, and information retrieval.
586 questions
SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,948 questions
{count} votes

Accepted answer
  1. ChengFeng - MSFT 5,020 Reputation points Microsoft Vendor
    2023-10-09T06:54:51.04+00:00

    Hi@MARTIN VALERO Carlota - Contractor

    Here is the complete flow:

    We do not use Filter query to filter the records in get items.

    We use Condition to judge the content obtained by Get items in Apply to each. We judge the date of the Mouth column and obtain the month under Formatdate format and compare it with the month when the flow is started.

    Only when the conditions are met are the permissions assigned.

    User's image

    If you still have questions, please feel free to ask


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best Regards

    Cheng Feng

    1 person found this answer helpful.

4 additional answers

Sort by: Most helpful
  1. ChengFeng - MSFT 5,020 Reputation points Microsoft Vendor
    2023-10-05T08:39:19.0066667+00:00

    Hi@MARTIN VALERO Carlota - Contractor

    Sorry for causing trouble to you, you can try to pause the flow first to avoid the problem of frequent triggers to send you emails.

    User's image

    Or you need to set trigger conditions to avoid loop triggering

    triggerOutputs()?['body/Mes'] Mes is your number column

    @not(equals(triggerOutputs()?['body/Mes'],null))


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best Regards

    Cheng Feng


  2. ChengFeng - MSFT 5,020 Reputation points Microsoft Vendor
    2023-09-20T06:17:30.4066667+00:00

    Hi @MARTIN VALERO Carlota - Contractor

    Regarding the requirements you raised, in my opinion, I need to create two flows to solve it perfectly:

    The first flow is used to control whether the manager has permission to edit this record.

    The second flow is used to approve the values filled in by the user.

    Here is test for your reference:

    Here is list:

    User's image

    Here is first flow:

    Triggered every day through Recurrence,

    Then you need to set the trigger conditions here

    https://www.spguides.com/power-automate-trigger-conditions/User's image

    In this way, the flow will only be executed on the first eight days of each month.

    utcNow('MMM')
    

    User's image

    filter query filters out the records whose month is this month

    User's image

    Condition determines whether the current date is the first day of each month

    dayOfMonth(utcNow())
    

    User's image

    If yes, we share the editing rights of the filtered item with the manager

    Recipients : manager email

    User's image

    If the current date is not the first day, then determine whether it is the eighth day. If it is the eighth day, we will stop sharing this item.

    User's image

    Here is second flow:

    Set the trigger condition. This trigger will only fire when the value is not empty.

    @not(empty(triggerOutputs()?['body/Value']))
    

    User's image

    User's image

    User's image


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best Regards

    Cheng Feng


  3. MARTIN VALERO Carlota - Contractor 100 Reputation points
    2023-09-28T07:51:17.13+00:00

    I have a problem with flow 2,

    Sending the approval request goes into a loop and sends me 10 requests every minute, how can I change this?


  4. MARTIN VALERO Carlota - Contractor 100 Reputation points
    2023-10-03T07:37:50.9733333+00:00

    En el segundo flujo, al hacer todo como me dices, se agrega un bucle infinito. ¿Cómo puedo modificarlo para que no me mande 10 correos cada minuto?


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.