web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Survey question once a...
Power Apps
Answered

Survey question once a week by one user

(0) ShareShare
ReportReport
Posted on by 219

Hi,

I was hoping that someone can assist me. I have 3 queries.

Query 1: I need to create a survey question that would only be responded to once a week by one user so let's say they answered the survey Monday, and in the following days Tuesday or until Friday, it would no longer ask for a survey to avoid multiple responses from the same user.

Query 2: There are multiple categories for the survey questions. Would it be possible that every week the categories would change every week?

Query 3: What would be the best way to collect the data from the responses? Should it be lists, collections etc?

Categories:
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    For Query 1:

    Power Automate flow that gets the latest record  for each user and check if it has a week ago or not. If yes, send an email reminding the people to answer.

    You can also send every Monday or something (that would be easier to make but your users had to vote on that day).

    To check if the record has 7 days in power apps you can use date diff:

     

    If(DateDiff(DateValue(Today), DateValue(Created), Days) = 7,

    //YOU CAN ANSWER,

    //YOU CAN NOT ANSWER

    )

     

    Query 2:

    I think that you should think on your database model but it should be possible.

     

    Query 3:

    Best way depends on you and your licences.. Collections is a bad idea because collections would only work for a single user and if you save data locally...

    Shaprepoint is a good idea if you do not have a large data set... 

    Otherwise, I recommend SQL or Dataverse

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,

    Gonçalo Nogueira

    Check my LinkedIn!

    My website!

  • RLSid17 Profile Picture
    219 on at

    Thanks for the response! For Query 1, would it be possible there would be no input required from users or send an email reminder to them? Like once they answered the survey they would no longer response twice in the same week. And if there is a way to detect automatically if they have answered.

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Sure.

     

    Just do something like:

     

    If(

      IsBlank(LookUp(Sort(DataSource, Created, Descending), 'Created by'.Email = User().Email)),

      //FIRST RESPONSE, LET USER ANSWER,

      If(DateDiff(Today(),LookUp(Sort(DataSource, Created, Descending), 'Created by'.Email = User().Email).Created,Days) = 7,

          //It has 7 days, let answer,

       )

    )

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,

    Gonçalo Nogueira

    Check my LinkedIn!

    My website!

  • RLSid17 Profile Picture
    219 on at

    I have tried this and nothing is happening.

     

    I tried to submit from a form and it does nothing. My last created item was from last Sept 16. Would it be possible that it would not count the difference in days for when they answer the survey? Like every week it would reset the count. Because it is possible they might for example answer the survey Friday, then the next week starts they should not wait until 7 days have passed. 

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Okay. So you only want to be a different week..

     

    Try this:

     

    If(

      IsBlank(LookUp(Sort(DataSource, Created, Descending), 'Created by'.Email = User().Email)),

      //FIRST RESPONSE, LET USER ANSWER,

      If(WeekNum(Today()) <> WeekNum(LookUp(Sort(DataSource, Created, Descending), 'Created by'.Email = User().Email).Created),

          //It was a different week, let answer,

       )

    )

     

    https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-weeknum

  • RLSid17 Profile Picture
    219 on at

    I've tried what you suggested and nothing is happening.

    RLSid17_0-1663683853897.png

    This is the one that is in my formula. The form is just a test. I think I may have missed something.

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    If(

      IsBlank(LookUp(Sort(DataSource, Created, Descending), 'Created by'.Email = User().Email)),

      SubmitForm();

      Notify();

      ResetForm();

      Navigate(),

      If(WeekNum(Today()) <> WeekNum(LookUp(Sort(DataSource, Created, Descending), 'Created by'.Email = User().Email).Created),

      SubmitForm();

      Notify();

      ResetForm();

      Navigate(),

      Notify("You have already submitted this week);

       )

    )

     

    And now?

  • RLSid17 Profile Picture
    219 on at

    Still, nothing is happening, but it did notify me saying 'You have already submitted this week' and navigated back to the main screen. I'm trying to test if I can submit the form and then try it for the second time but it wouldn't be able to submit.

  • RLSid17 Profile Picture
    219 on at

    I have tried this bit and it seems to be working:

    If(WeekNum(Today()) <> WeekNum(LookUp(Sort(DataSource, Created, Descending), 'Created by'.Email = User().Email).Created),

      SubmitForm();

      Notify();

      ResetForm();

      Navigate(),

      Notify("You have already submitted this week);

       )

    )

     

    How do I put in the notify function where it is successfully saved and if they tried again for a second time it says they have already submitted this week?

  • Verified answer
    Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    If(WeekNum(Today()) <> WeekNum(LookUp(Sort(DataSource, Created, Descending), 'Created by'.Email = User().Email).Created),

      SubmitForm();

      Notify("SUCCESS");

      ResetForm();

      Navigate(),

      Notify("You have already submitted this week)

       )

    )

     

    You can do only that but if it is the first time the user answers, it will not allow you to submit the form.

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,

    Gonçalo Nogueira

    Check my LinkedIn!

    My website!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 383 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 356

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard