PeCour
1
Hello together,
we are migrating our Legacy Apps to VB. Despite the documentation I am struggling with the function “fetch one” Apps – Benutzerdefinierte VB-Funktionen (uipath.com).
Previously, we had the following formula in “default value”:
=Lookup(entity,[entity.field,“=”,variable]).entity.field
How to set up this formula in VB.Apps?
This is what I have tried. But it does not work:
Fetchone(of entity)(createFilterGroup(New QueryFilter(){addFilter(“entity_fieldname”, “=”, variable)}, Nothing, 0), Nothing, Nothing, Nothing, New ExpansionFieldOption(){addExpansionFieldOption(“CreatedBy”, New String(){“Id”,“Name”}), addExpansionFieldOption(“UpdatedBy”, New String(){“Id”,“Name”})}).entity_field
Thank you!
ppr
(Peter Preuss)
2
Hi @PeCour
have send you a PM
PeCour
3
The solution to my problem:
- Save the fetch data in an AppVariable ListSource of entity.
Fetch(of entity)(createFilterGroup(New QueryFilter(){addFilter(“entity_fieldname”, “=”, variable)}, Nothing, 0), Nothing, Nothing, Nothing, New ExpansionFieldOption(){addExpansionFieldOption(“CreatedBy”, New String(){“Id”,“Name”}), addExpansionFieldOption(“UpdatedBy”, New String(){“Id”,“Name”})}).
- Use the App variable to derive the field required.
AppVariable.data.First().Field
system
(system)
Closed
4
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.