【发布时间】:2021-06-15 07:08:14
【问题描述】:
伙计们,我正在为此绞尽脑汁,希望电源应用程序大师可以提供帮助。我正在设计一个面试提问应用程序。这将从 10 个不同的类别中抽取 38 个问题,从每个类别中随机选择一个问题,然后随机选择其中的 6 个。那部分很好。
棘手的一点是,我们必须让两名面试官在应用程序中以相同的顺序查看相同的问题。目前的解决方案是一开始就Onselect;
- 将问题列表构建到一个临时集合中。
- 运行 if 语句以查看候选人 ID 是否已在同一日期分配 - 如果是,请提出这些问题(但是它们目前的顺序不正确,无法将它们纳入其中) - 如果否,则将生成的集合放入共享点列表中以供以后检索。
存储的原因是应用程序内部的随机触发,但第二个评估员登录并输入候选人 ID 时,将有相同的问题集。
目前的解决方案行为首先是命中或未命中,有时集合不适用,其次它不会从存储中收到订单ID,这意味着我们可以拉出问题,但它们不在正确的顺序。
因此使用的数据集是:
-
由唯一 ID
Question_ID、问题本身和正在测试的Value索引的问题的静态 Excel 列表 -
一个临时集合
Temp_Q,最终变成Temp_Q_Ordered -
包含
Candidate_ID、Session_date、Order_IF和Question_ID的共享列表Candidate_Q_ID_Storage
这是当前代码和link to some dummy data in the same format that I am using.,如果有帮助,我很乐意尽我所能提供。我希望这是一个明显的逻辑问题。
//Clear existing Collection
Clear(Temp_Q);
Clear(Temp_Q_Sorted;
Clear(Temp_Q_Ordered);
//Build Collection
Collect(Temp_Q,FirstN(Shuffle(Filter(Question_Set,Value = "Analyse Critically")),1));
Collect(Temp_Q,FirstN(Shuffle(Filter(Question_Set,Value = "Collaborative")),1));
Collect(Temp_Q,FirstN(Shuffle(Filter(Question_Set,Value = "Deliver,Support, Inspire")),1));
Collect(Temp_Q,FirstN(Shuffle(Filter(Question_Set,Value = "Emotionally Aware")),1));
Collect(Temp_Q,FirstN(Shuffle(Filter(Question_Set,Value = "Impartiality")),1));
Collect(Temp_Q,FirstN(Shuffle(Filter(Question_Set,Value = "Integrity")),1));
Collect(Temp_Q,FirstN(Shuffle(Filter(Question_Set,Value = "Open-Minded")),1));
Collect(Temp_Q,FirstN(Shuffle(Filter(Question_Set,Value = "Ownership")),1));
Collect(Temp_Q,FirstN(Shuffle(Filter(Question_Set,Value = "Public Service")),1));
Collect(Temp_Q,FirstN(Shuffle(Filter(Question_Set,Value = "Transparency")),1));
//Get list of 6 questions
ClearCollect(
Temp_Q_Sorted,
FirstN(Shuffle(Temp_Q),6));
// Add in the mandatory diversity question
Collect(Temp_Q_Sorted,FirstN(Shuffle(Diversity),1));
// Create row number index
ForAll (Temp_Q_Sorted,
Collect(Temp_Q_Ordered,
Last(FirstN(AddColumns(Temp_Q_Sorted, "RowNumber", CountRows(Temp_Q_Ordered)+1),
CountRows(Temp_Q_Ordered)+1
)
)
)
)
//Where things get iffy (pardon the pun)
If(And(Assessing_Text.Text in Candidate_Q_ID_Storage.Title, Today() in Candidate_Q_ID_Storage.Session_Date),
ClearCollect(Temp_Q_Ordered,
Filter(Question_Set,
Question_ID in
Filter
(Candidate_Q_ID_Storage,
Assessing_Text.Text = Title && Today() = Session_Date
).Question_ID));
// Where is where I cannot get the order to stay the same, I have tried to call the column from retrieval into the new set, but to no avail.
,
ForAll(Temp_Q_Ordered,Patch(Candidate_Q_ID_Storage, Defaults(Candidate_Q_ID_Storage),
{Title: Assessing_Text.Text,
Session_Date: Today(),
Question_ID:Question_ID,
Order_ID:RowNumber}))
)
【问题讨论】:
标签: sharepoint powerapps