Help regarding a system i'm working on

Hello Community!

So the following might be something that isn’t complicated, but for some reason I’m struggling.

So what i want to do is on app load check if “user logged in” matches with user in the dataset (screenshot), if the user have more then one customers/customerId I would like to open up a dialog (screenshot function). And it should show all the customers the user have in the dialog. After that if the chosen customer from the select menu in the dialog should be updated in a variable which is ofcourse just an update variable.

I tried to explain to the best of my capabilities, if any other question let me know.

I’m not sure if I’m allowed to ask for this kind of help in here, if not let me know and I’ll remove my post.



I think i might have been able to get somewhere, now i’m able to get a list of all customerIds, but still can’t seem to find a way to only show dialog when a user have more than 1 customerID

Hey!

You´re more than welcome to ask for this kind of help, that is what the Appfarm Community is for :grinning:

What I would recommend doing is to add an “If” action node in the “App Load” action. In the If check, you want to choose “Function” as your “Condition”.

Once you are in the function editor add the data source as a “Function Params”. You can do this by finding your datasource on the left hand side and press the “+” sign. Once it is added as a function params, choose “Filtered selection” in the selection area. Here you want to filter away all datasets where the user is not the current user. Once this is done, add an if check in the function editor (a potential function is shown in the image).

Now that we have an appropriate check, add the “Open Dialog” action node inside the “If” action node.

Does this answer your question? If not let me know what is unclear!

Hello Ulrik!
That was helpful and I’m able to do it now! Thanks alot.

Another thing, So i have a selection where I can later change the customer and it works well customer ID changes and all, but the information doesn’t get refreshed it stays the same from the previous customer, How can i make sure all the information is gone so it can be pulled again for the new customer.

Hey Haider!

Send me a DM with some screenshots of the customer objects you are updating and the flow of your logic :grinning: