cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sharuk
Helper III
Helper III

Getting the output of previous formula

Hi, is it possible to get the values of formula and set it to another variable.

 

i'm using the following formula in gallery items

Sort(Filter(CompanyData,Company.Value = Drp_Company.Selected.Value && Region = Drp_Region.Selected.Result && CEO = Drp_CEO.Selected.Result),Title)

now i want get the output to set to another variable something like 

Set(vOutput, output(previous line formula))

i think, we can set it like by Set(vOutput,Sort(Filter(CompanyData,Company.Value = Drp_Company.Selected.Value && Region = Drp_Region.Selected.Result && CEO = Drp_CEO.Selected.Result),Title))

but is there a way something like
Sort(Filter(CompanyData,Company.Value = Drp_Company.Selected.Value && Region = Drp_Region.Selected.Result && CEO = Drp_CEO.Selected.Result),Title);
Set(vOutput, output(previous line formula))

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User III
Super User III

Hi @Sharuk 

No, there's no formulaic 'keyword' to retrieve the output of the previous line in a formula.

I'm curious as to why you want to do this? What's the use case scenario?

As you say, this is the closest method to achieve what you want.

 

Set(vOutput,
Sort(Filter(CompanyData,Company.Value = Drp_Company.Selected.Value && Region = Drp_Region.Selected.Result && CEO = Drp_CEO.Selected.Result),Title))


It might also be worth noting that when you set the items property of a gallery control, you can access the items in the gallery using the BrowseGallery1.AllItems syntax. Depending on what you want to accomplish, this might provide an alternative to using a variable.

View solution in original post

1 REPLY 1
timl
Super User III
Super User III

Hi @Sharuk 

No, there's no formulaic 'keyword' to retrieve the output of the previous line in a formula.

I'm curious as to why you want to do this? What's the use case scenario?

As you say, this is the closest method to achieve what you want.

 

Set(vOutput,
Sort(Filter(CompanyData,Company.Value = Drp_Company.Selected.Value && Region = Drp_Region.Selected.Result && CEO = Drp_CEO.Selected.Result),Title))


It might also be worth noting that when you set the items property of a gallery control, you can access the items in the gallery using the BrowseGallery1.AllItems syntax. Depending on what you want to accomplish, this might provide an alternative to using a variable.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

Top Solution Authors
Top Kudoed Authors
Users online (90,339)