AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
DAX
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 14.09.2018, 17:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
palleagermark: Timing in PowerApps
Источник: http://www.agermark.com/2018/09/timi...powerapps.html
==============

Just for fun I tried to build a PowerApp, to be embedded in D365 FinOps, that would show some PDFs for at particular item.

I keep the PDFs in a SharePoint document library and use ItemId as a key.



And resulting the app looks like this:



Of course I need to filter the SharePoint list to only show entries related to the current item, and I added the following to OnStart of the app, like described on docs:

If(!IsBlank(Param("EntityId")), Set(FinOpsInput, Param("EntityId")), Set(FinOpsInput,""));

And here is what I have put in Items of the Gallery showing the SharePoint data:

If(!IsBlank(FinOpsInput),SortByColumns(Filter(ProductPDFs,ItemId=FinOpsInput),"ItemId",Ascending),SortByColumns(ProductPDFs,"ItemId",Ascending))

A problem I have spent hours on, was that the filtering was very flaky. Sometimes it would flicker, showing all my items and then apply the filter, and sometimes it just didn't apply the filter until I manually refreshed the list.

It seems like things run i parallel when you open an app, so it would actually start to load data from SharePoint before or while the OnStart trigger is executed. And in some cases it wouldn't know about the FinOpsInput variable yet when applying my filter.

A solution could be to add a variable to OnStart, letting you know if that is finished, and make a bogus filter until it is done. Like this:

If(!IsBlank(Param("EntityId")),Set(FinOpsInput,Param("EntityId")),Set(FinOpsInput,""));Refresh(ProductPDFs);Set(AppIsStarted, true)

If (AppIsStarted, If(!IsBlank(FinOpsInput),SortByColumns(Filter(ProductPDFs,ItemId=FinOpsInput),"ItemId",Ascending),SortByColumns(ProductPDFs,"ItemId",Ascending)), Filter(ProductPDFs,ItemId="BOGUS"))

This video explains what you need to know to build the app
https://www.youtube.com/watch?v=s3PC7tqqoI4


Источник: http://www.agermark.com/2018/09/timi...powerapps.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
Теги
power apps

 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
palleagermark: Коллекция ссылок на интеграцию D365FO и PowerApps Blog bot DAX Blogs 0 10.09.2018 11:11
powerobjects: When to use Dynamics 365 Connector or Common Data Services in PowerApps Blog bot Dynamics CRM: Blogs 0 21.08.2018 02:59
powerobjects: Want to Learn More About PowerApps? Blog bot Dynamics CRM: Blogs 0 13.06.2018 02:40
survivingcrm: Exploring CDS for Apps Platform Licensing (PowerApps) Blog bot Dynamics CRM: Blogs 0 10.05.2018 23:12
stoneridgesoftware: What Can Microsoft PowerApps Do For You? Blog bot DAX Blogs 0 12.04.2017 02:30
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 20:16.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.